:root{--ink:#354e42;--muted:#738274;--green:#557c61;--cream:#fbf8ee;--line:#dde3d3;--peach:#f1d6bd;--lilac:#e5deec;--gold:#eac577;font-family:'Trebuchet MS',ui-rounded,system-ui,sans-serif;color:var(--ink);background:#f3f1e7;font-synthesis:none}*{box-sizing:border-box}body{margin:0;padding-bottom:100px}button,input,select{font:inherit}button,a.button{min-height:44px;border:1px solid var(--line);border-radius:15px;padding:10px 16px;background:var(--cream);color:var(--ink);font-weight:700;cursor:pointer;touch-action:manipulation}button:hover{background:#e8eedf}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #c9a953;outline-offset:3px}button:disabled{opacity:.48;cursor:default}button.primary,.primary{background:var(--green);border-color:var(--green);color:#fffdf5}button.peach{background:var(--peach)}button.active{background:#dce7d6;border-color:#8da585}a{color:#426c51}h1,h2,h3,p{margin-top:0}h1{font-family:Georgia,serif;font-size:clamp(21px,2.5vw,32px);font-weight:500;margin:0;letter-spacing:-1px}h2{font-family:Georgia,serif;font-size:28px;font-weight:500;margin-bottom:12px}h3{font-size:17px;margin-bottom:8px}p{line-height:1.55}small,.muted{color:var(--muted);font-size:13px;line-height:1.5}header{max-width:1440px;margin:auto;padding:20px 28px 12px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:12px;margin-right:auto}.brand img{width:55px;height:55px;border-radius:17px}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:10px;font-weight:800;color:var(--muted);margin-bottom:3px}.wallet{background:#fff9df;border:1px solid #e6d6a7;border-radius:17px;padding:10px 17px;font-weight:800}.level{min-width:95px;font-size:12px;font-weight:bold}.level progress{display:block;width:100%;height:5px;margin-top:5px;accent-color:var(--green)}main{max-width:1440px;margin:auto;padding:0 28px}.welcome{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:15px 0}.welcome p{margin:0;font-size:14px}.locations{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:15px}.locations button{font-size:13px;padding:8px 13px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:18px}.world-card{background:#e9e6d6;border:1px solid #d4d9c5;border-radius:28px;overflow:hidden;position:relative;box-shadow:0 12px 35px #344d3810}.scene-heading{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;background:#fbf8eee8;gap:10px}.scene-heading strong{font-family:Georgia,serif;font-size:21px;font-weight:500}.scene-heading small{display:block}.canvas-wrap{position:relative;height:clamp(330px,50vw,550px);overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none}.camera{position:absolute;bottom:14px;left:14px;display:flex;gap:5px}.camera button{min-width:44px;padding:6px 10px;background:#fffaf0eb}.camera button.photo{margin-left:6px}.world-hint{position:absolute;top:12px;left:16px;right:16px;pointer-events:none;text-align:center;font-size:12px;color:#5f735c}.side{display:flex;flex-direction:column;gap:15px}.panel{background:#fbf8ee;border:1px solid var(--line);border-radius:23px;padding:20px}.care-row{margin:14px 0}.care-row label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:6px}.care-row progress{display:block;width:100%;height:7px;border:0;border-radius:8px;accent-color:#87a27c}.pet-chips{display:flex;gap:7px;flex-wrap:wrap}.pet-chips button{padding:8px 12px;font-size:12px;background:#eee7d6}.little-card{background:#eee7dc;border-radius:15px;padding:12px;font-size:13px;line-height:1.5}.little-card p{margin:0}.toolbox{margin-top:15px;background:#fbf8ee;border:1px solid var(--line);border-radius:23px;padding:15px 18px;display:flex;gap:9px;flex-wrap:wrap;align-items:center}.toolbox button{font-size:13px}.tool-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1.5px;margin-right:3px}.toolbox [hidden]{display:none}.selected-tools{display:flex;gap:7px;flex-wrap:wrap}.status-line{padding:12px 2px;font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:12px}.bottom-nav{position:fixed;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;background:#fffcf1f5;box-shadow:0 8px 35px #243c3423;border:1px solid #d7dfcd;border-radius:23px;padding:6px;gap:4px;z-index:10;max-width:calc(100% - 24px);backdrop-filter:blur(12px)}.bottom-nav button{border:0;background:transparent;min-width:90px;font-size:12px;padding:8px 14px}.bottom-nav button span{display:block;font-size:21px;margin-bottom:2px}.bottom-nav button.active{background:#dfe9d8}dialog{border:1px solid #d4dec9;border-radius:27px;padding:0;background:var(--cream);color:var(--ink);width:min(760px,calc(100% - 24px));max-height:calc(100dvh - 34px);box-shadow:0 25px 100px #20392e33}dialog::backdrop{background:#213d3480;backdrop-filter:blur(4px)}.dialog-head{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--cream);z-index:2}.dialog-head h2{font-size:25px;margin:0}.dialog-head button{padding:6px 14px;font-size:23px}.dialog-body{padding:23px;overflow-wrap:anywhere}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.tile{border:1px solid var(--line);background:#fffdf6;border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:9px;min-width:0}.tile p{font-size:13px;margin:0;color:var(--muted)}.tile button{margin-top:auto}.tile-icon{font-size:34px}.item-thumb{height:90px;background:#eeeadd;border-radius:12px;width:100%}.row{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin:12px 0}.row>*{max-width:100%}.stack{display:flex;flex-direction:column;gap:14px}.notice{padding:14px 17px;background:#e5ebdc;border-radius:15px;font-size:13px;line-height:1.6;margin-bottom:16px}.notice.warm{background:#f5e5ce}.notice.warning{background:#f3dacf}label.field{display:block;font-weight:700;font-size:13px;margin:14px 0}label.field input,label.field select{display:block;width:100%;margin-top:6px;border:1px solid #c8d5be;background:#fffdf7;border-radius:12px;padding:12px;color:var(--ink);min-height:44px}.checks{display:flex;gap:10px;flex-wrap:wrap}.checks label{padding:13px;background:#eee9df;border-radius:14px}.checks input{width:20px;height:20px;vertical-align:middle;margin-right:7px;accent-color:var(--green)}.word-slots{font-size:clamp(22px,6vw,37px);font-weight:800;letter-spacing:8px;text-align:center;margin:25px 0;min-height:48px}.letters{display:flex;justify-content:center;gap:7px;flex-wrap:wrap}.letters button{font-size:22px;min-width:48px;background:var(--peach)}.scrap-photo{width:100%;aspect-ratio:1.6;object-fit:contain;background:#e8eadc;border-radius:14px}progress{accent-color:var(--green)}.mission progress{width:100%;height:9px}.mission{padding:17px;background:#fffdf5;border:1px solid var(--line);border-radius:18px}.mission .row{justify-content:space-between;margin-bottom:0}#toast{position:fixed;bottom:108px;left:50%;transform:translateX(-50%);padding:13px 20px;border-radius:17px;background:#365b47;color:#fffdf3;box-shadow:0 8px 20px #18342222;max-width:calc(100% - 30px);z-index:100;text-align:center;font-size:14px;pointer-events:none}#toast:empty{display:none}.save-warning{background:#f3dacf;color:#703f30;padding:12px 18px;border-radius:15px;margin-bottom:12px}.hide{display:none!important}footer{font-size:11px;color:#84917e;padding:10px 0 18px;text-align:center}a.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.pet-preview{height:130px;background:#e6ead9;border-radius:18px;width:100%}#loading{padding:20px;text-align:center}.spin{font-size:28px}.full{width:100%}@media(max-width:1000px){.game-layout{grid-template-columns:minmax(0,1fr) 190px}.panel{padding:15px}.canvas-wrap{height:460px}}@media(max-width:740px){header{padding:14px 14px 4px;gap:9px}.brand img{width:43px;height:43px}.brand{gap:8px}.brand .eyebrow{font-size:8px}h1{font-size:22px}.level{min-width:70px}.wallet{padding:9px 12px}.game-layout{display:flex;flex-direction:column;gap:12px}main{padding:0 12px}.welcome{margin:10px 2px}.welcome p{font-size:12px}.welcome .muted{display:none}.locations{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.locations button{padding:8px 4px;font-size:11px}.side{display:grid;grid-template-columns:1fr 1fr;gap:10px}.side .care-panel{grid-column:1/-1;padding:12px 15px}.care-bars{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.care-row{margin:8px 0}.care-row label{font-size:10px}.care-panel h3{font-size:13px;margin-bottom:4px}.side .panel{padding:14px}.canvas-wrap{height:390px}.scene-heading{padding:11px 15px}.scene-heading strong{font-size:18px}.scene-heading small{font-size:11px}.toolbox{padding:11px;gap:6px}.toolbox button{font-size:12px;padding:8px 11px}.bottom-nav{width:calc(100% - 24px);justify-content:space-around;gap:0;bottom:max(8px,env(safe-area-inset-bottom))}.bottom-nav button{min-width:0;flex:1;padding:6px;font-size:10px}.grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.dialog-body{padding:17px}.dialog-head{padding:13px 17px}.status-line{font-size:10px}.world-hint{font-size:10px}.tool-label{font-size:9px}.care-row progress{height:6px}.grid{gap:9px}.tile{padding:13px}#toast{bottom:95px}.side .little-card{font-size:12px}}@media(max-width:390px){.brand img{display:none}.canvas-wrap{height:340px}.grid.three{grid-template-columns:1fr 1fr}.care-bars{gap:6px}.wallet{font-size:13px}.level{font-size:10px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#hay{touch-action:none;user-select:none;-webkit-user-select:none}

/* Zoo play puts the park first, with a small set of child-friendly actions. */
.at-zoo .game-layout{grid-template-columns:1fr}.at-zoo .side{display:none}.at-zoo .canvas-wrap{height:clamp(450px,65dvh,740px)}.at-zoo .world-card{border-radius:28px;background:#d4e1c2;box-shadow:0 16px 50px #304d3720}.at-zoo .scene-heading{background:#f9f6e8}.at-zoo .welcome{margin:8px 0}.at-zoo .world-hint{background:#fff9e5dd;left:50%;right:auto;transform:translateX(-50%);padding:8px 15px;border-radius:20px;white-space:nowrap}.at-zoo .camera{width:calc(100% - 28px);align-items:center}.at-zoo #wholeZoo{margin-left:auto;background:#fdf5d8;border-color:#c7b779;box-shadow:0 3px 9px #455b2815}.zoo-tools{margin-top:13px;border:1px solid #d6dfc9;background:#fbf8ec;border-radius:24px;overflow:hidden}.zoo-quick{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-bottom:1px solid var(--line);gap:7px;padding:11px}.zoo-quick button{display:flex;align-items:center;justify-content:center;gap:9px;background:#f0efdf;border:0;padding:11px;font-size:13px}.zoo-quick button span{font-size:25px}.zoo-quick button.active{background:#d8e5ca;box-shadow:inset 0 0 0 1px #a1b78d}.zoo-focus{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 23px}.zoo-focus h3{font-family:Georgia,serif;font-size:24px;font-weight:500;margin:3px 0}.zoo-focus p{font-size:13px;margin:0;color:#71816b}.zoo-focus .row{flex-shrink:0}.habitat-hero{background:linear-gradient(135deg,#e5ecd6,#f4e9cc);border-radius:20px;display:flex;align-items:center;padding:12px;gap:15px;margin-bottom:19px}.habitat-hero h2{margin:5px 0}.habitat-hero p{margin:0;font-size:13px}.animal-preview{width:150px;height:140px;flex-shrink:0}.needs-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:17px 0 24px}.needs-list>div{background:#ebeede;border-radius:15px;padding:14px 10px;font-size:13px;text-align:center}.needs-list span{display:block;color:#6f8b5e;font-size:22px;margin-bottom:5px}.more-tools{position:relative}.more-tools summary,details>summary{cursor:pointer;padding:12px 15px;border-radius:13px;background:#ebe9db;font-size:13px;font-weight:700;min-height:44px}.more-tools .selected-tools{position:absolute;bottom:55px;left:0;z-index:5;min-width:270px;background:#fffaf0;border:1px solid #c9d5bf;box-shadow:0 5px 25px #30433222;border-radius:18px;padding:13px}.parent-tools{margin-top:17px}.parent-tools>.grid{margin-top:15px}.simple-settings .tile{border:0;padding:0;background:none}.simple-settings .tile>h3,.simple-settings .tile>p{display:none}.simple-settings .tile{display:grid;grid-template-columns:1fr 1fr;gap:10px}.simple-settings button{min-height:57px}.at-zoo .status-line{font-size:11px}
@media(max-width:740px){.at-zoo .canvas-wrap{height:clamp(370px,56dvh,590px)}.at-zoo .world-hint{font-size:10px;padding:6px 10px}.zoo-quick{gap:4px;padding:8px}.zoo-quick button{flex-direction:column;gap:3px;padding:8px 2px;font-size:10px;line-height:1.25}.zoo-quick button span{font-size:23px}.zoo-focus{padding:13px 15px;flex-wrap:wrap;gap:8px}.zoo-focus h3{font-size:22px}.zoo-focus p{font-size:12px}.zoo-focus .row{width:100%;margin:3px 0}.zoo-focus .row button{flex:1}.animal-preview{width:105px;height:125px}.habitat-hero{gap:5px;padding:8px}.habitat-hero h2{font-size:23px}.needs-list>div{font-size:11px;padding:12px 5px}.at-zoo .scene-heading strong{font-size:22px}.at-zoo .scene-heading small{font-size:11px}.at-zoo .camera button{min-width:39px;padding:6px 9px;font-size:12px}.at-zoo #wholeZoo{font-size:12px}.at-zoo .camera{gap:4px}.at-zoo .welcome .muted{display:none}.simple-settings .tile{grid-template-columns:1fr 1fr}}
/* Storybook play: the world is the screen, controls are large picture toys. */
:root{--ink:#534237;--green:#49a57f;--cream:#fff9ed;--line:#efdfc5;--peach:#ffd294;font-family:'Trebuchet MS',ui-rounded,system-ui,sans-serif;background:#8cd4cf}body{height:var(--game-height,100dvh);padding:0;overflow:hidden;display:flex;flex-direction:column;background:#b8e3ce}header{width:100%;max-width:none;min-height:62px;flex-shrink:0;padding:7px 16px;gap:8px;background:linear-gradient(100deg,#fff7d2,#fff9ea 55%,#f9e7f1);border-bottom:3px solid #efc993;z-index:3;box-shadow:0 3px 12px #5b65421a}.brand img{width:42px;height:42px;border-radius:15px}.brand .eyebrow{display:none}h1{font:900 clamp(16px,2.6vw,27px) 'Trebuchet MS',sans-serif;letter-spacing:-.7px;color:#6d4d3d}.brand{gap:8px}.wallet{background:#ffe18b;border:2px solid #edb94a;box-shadow:0 3px 0 #dca743;border-radius:20px;padding:7px 14px;font-size:15px}.level{font-size:10px;min-width:65px;color:#8b6842}.level progress{height:5px;accent-color:#f2b643}header>button{border-radius:50%;width:42px;height:42px;min-height:42px;padding:6px;font-size:21px;border:2px solid #ecd9ba;background:#fffaf0}main{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;padding:0;position:relative}.welcome,.locations,.side,.status-line,footer{display:none!important}.game-layout,.at-zoo .game-layout{display:flex;flex:1;min-height:0;gap:0}.game-layout>section{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}.world-card,.at-zoo .world-card{flex:1;min-height:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;position:relative}.canvas-wrap,.at-zoo .canvas-wrap{position:absolute;inset:0;height:100%!important;overflow:hidden}.scene-heading,.at-zoo .scene-heading{position:absolute;top:12px;left:12px;right:12px;z-index:2;background:none;padding:0;pointer-events:none}.scene-heading strong,.at-zoo .scene-heading strong{font:800 17px 'Trebuchet MS',sans-serif;background:#fffae9ed;padding:10px 17px;border:2px solid #ead7ae;border-radius:20px;box-shadow:0 4px 0 #83623816}.scene-heading small{display:none}.scene-heading>button{pointer-events:auto;background:#fff5cbe8;border:2px solid #eac975;border-radius:18px;font-size:12px;min-height:42px;padding:8px 13px}.world-hint,.at-zoo .world-hint{top:67px;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:85%;white-space:normal;background:#fff7dedb;padding:5px 13px;border-radius:15px;font-size:11px;color:#70543e;text-shadow:0 1px #fff}.camera,.at-zoo .camera{position:absolute;bottom:108px;left:12px;width:calc(100% - 24px);display:flex;gap:6px;align-items:center;z-index:1}.camera button,.at-zoo .camera button{width:42px;min-width:42px;height:42px;min-height:42px;border:2px solid #edcf8f;border-radius:15px;box-shadow:0 3px 0 #a179431f;background:#fff8e5ed;font-size:19px;padding:4px}.camera #wholeZoo,.at-zoo #wholeZoo{width:auto;min-width:0;margin-left:auto;font-size:11px;padding:7px 10px;background:#ffe6a5}.camera .photo{margin-left:auto}.at-zoo .camera{bottom:150px}.at-zoo .camera .photo{margin-left:0}.toolbox{position:absolute;left:12px;right:12px;bottom:12px;z-index:2;margin:0;padding:7px;gap:5px;border:2px solid #f0d7ae;border-radius:25px;box-shadow:0 5px 0 #8a6d3a20;background:#fff9e8e8;display:flex;justify-content:center;backdrop-filter:blur(8px)}.tool-label{display:none}.toolbox#careTools button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;flex:1;min-width:0;height:70px;padding:5px 2px;font-size:11px;border:0;background:#fff0cd;border-radius:17px;line-height:1.1}.toolbox#careTools button:nth-of-type(2n){background:#e2f2d1}.toolbox#careTools button:nth-of-type(3n){background:#ffe3e8}.toolbox button img{width:45px;height:42px;object-fit:contain;pointer-events:none}.action-symbol{font-size:31px;line-height:39px}#buildTools{justify-content:flex-start;flex-wrap:wrap;max-width:900px;margin:auto}#buildTools button{min-height:44px;border-radius:15px}.bottom-nav{position:relative;bottom:auto;left:auto;transform:none;width:100%;max-width:none;margin:0;min-height:77px;border-radius:0;border:0;border-top:3px solid #efc992;box-shadow:0 -2px 15px #704d2a15;padding:5px 10px max(5px,env(safe-area-inset-bottom));background:linear-gradient(100deg,#fff8da,#fff4e5);display:flex;justify-content:space-evenly;flex-shrink:0;backdrop-filter:none}.bottom-nav button{flex:1;max-width:150px;min-width:0;font-size:11px;color:#735a3b;padding:3px 6px;border-radius:18px;min-height:59px;border:0}.bottom-nav button span{font-size:27px;line-height:31px;margin:0 0 3px}.bottom-nav button.active{background:#ffe09a;box-shadow:inset 0 -3px #ecc06c}.zoo-tools{position:absolute;z-index:2;bottom:10px;left:12px;right:12px;margin:0;border:0;border-radius:23px;background:#fff7e5e8;box-shadow:0 4px 0 #b4834322;backdrop-filter:blur(7px);max-width:800px;margin:auto}.zoo-quick{display:grid;grid-template-columns:repeat(5,1fr);border:0;gap:4px;padding:5px}.zoo-quick button{padding:3px;gap:0;flex-direction:column;background:transparent;border-radius:17px;font-size:9px;min-height:68px}.zoo-quick button img{width:56px;height:49px;object-fit:contain;pointer-events:none}.zoo-quick button.active{background:#ffe3a0;box-shadow:none}.zoo-focus{padding:0 8px 6px;display:block}.zoo-focus>div:first-child{display:none}.zoo-focus .row{margin:0;width:100%;gap:6px}.zoo-focus .row button{flex:1;min-height:36px;padding:5px 9px;font-size:12px;border:0;border-radius:12px;background:#d8edc7}.zoo-focus .row button.primary{background:#56b58b;color:white}.simple-scene-actions{position:absolute;left:12px;right:12px;bottom:12px;z-index:2;display:flex;justify-content:center;gap:10px}.simple-scene-actions button{min-width:88px;min-height:83px;font-size:32px;background:#fff5dbe8;border:3px solid #eecb8d;box-shadow:0 4px 0 #91733c22;border-radius:22px;display:flex;flex-direction:column;align-items:center}.simple-scene-actions button span{font-size:13px;margin-top:3px}dialog{border:4px solid #e7be74;border-radius:30px;background:linear-gradient(160deg,#fff7df,#fff8ef);max-height:calc(100dvh - 22px);width:min(650px,calc(100% - 20px));box-shadow:0 16px 60px #4c4b3750}dialog::backdrop{background:#294d4060;backdrop-filter:blur(3px)}.dialog-head{background:#ffe5ad;border-bottom:2px solid #efc987;padding:12px 18px}.dialog-head h2{font:800 23px 'Trebuchet MS',sans-serif;color:#735033}.dialog-head button{border:2px solid #d8b777;min-width:42px;border-radius:50%;background:#fff5d6;box-shadow:0 3px 0 #b58b4420}.dialog-body{padding:18px}.pet-hero{height:230px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse,#fff6d0,#fce6bb00 70%);margin-bottom:10px}.pet-hero img{height:100%;max-width:100%;object-fit:contain;filter:drop-shadow(0 10px 8px #9d70452c)}.big-choices{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.big-choices button{flex:1;min-width:100px;min-height:55px;font-size:17px;border-radius:20px;border:2px solid #e9cc91;box-shadow:0 4px 0 #bc93512a}.big-choices .primary{background:linear-gradient(#69c898,#42a97c);border-color:#459f78;box-shadow:0 4px 0 #277653;color:#fff}.picture-places{display:grid;grid-template-columns:1fr 1fr;gap:13px}.picture-places button{padding:0;overflow:hidden;border:3px solid #edcc8d;border-radius:23px;background:#fff1ca;box-shadow:0 4px 0 #d5ae6740}.picture-places img{display:block;width:100%;height:145px;object-fit:cover}.picture-places span{display:block;padding:12px 5px;font-size:18px}.hear-choice{margin:18px auto 0;display:block;background:#deedce}.coat-choices{display:flex;justify-content:center;gap:7px}.coat-choices button{width:75px;height:68px;padding:6px;border-radius:20px;background:#f7e4ba;border:2px solid #ebc989}.coat-choices button.active{background:#d5edc6;border-color:#75b789}.coat-choices img{width:100%;height:100%;object-fit:contain}.one-line,.one-step{font-size:21px;text-align:center;font-weight:800;color:#795337;margin:13px 0 22px}.needs-pictures{display:flex;justify-content:center;gap:15px;margin-bottom:20px}.needs-pictures img{width:85px;height:80px;object-fit:contain}.quiet-options{margin-top:22px}.step-dots{display:flex;justify-content:center;gap:12px}.step-dots span{width:35px;height:35px;border:2px solid #e3c285;border-radius:50%;background:#f2dfb4;display:grid;place-items:center;font-weight:800;color:#ac8e62}.step-dots span.active{background:#80c79c;border-color:#5ba779;color:#fff}.rescue-hero{height:210px}.parent-tools>summary{background:#e8e7d5}.tile{border:2px solid #eedab7;background:#fffaf0}.item-thumb{background:radial-gradient(#ffebbd,#f6e9ce);height:110px}.save-warning{position:absolute;top:0;left:5px;right:5px;z-index:9;margin:0;padding:10px;font-size:12px}.more-tools .selected-tools{bottom:58px}.simple-settings .tile{grid-template-columns:1fr 1fr}.simple-settings button{font-size:15px}
@media(max-width:740px){header{min-height:58px;padding:6px 9px;gap:5px}.brand img{width:34px;height:34px;display:block}.brand{gap:5px}h1{font-size:17px;max-width:125px;line-height:1.05}.level{display:none}.wallet{font-size:13px;padding:7px 10px}header>button{width:37px;height:37px;min-height:37px;font-size:18px}.scene-heading strong,.at-zoo .scene-heading strong{font-size:14px;padding:9px 12px}.scene-heading>button{font-size:10px;min-height:36px;padding:7px 10px}.camera,.at-zoo .camera{gap:4px}.camera button,.at-zoo .camera button{width:37px;height:37px;min-width:37px;min-height:37px;font-size:17px}.toolbox#careTools button{height:66px;font-size:10px}.toolbox button img{width:43px;height:40px}.bottom-nav{min-height:72px;padding-left:4px;padding-right:4px}.bottom-nav button{min-height:56px;font-size:10px}.bottom-nav button span{font-size:25px}.zoo-quick button img{width:48px;height:44px}.zoo-quick button{min-height:63px;font-size:9px}.zoo-focus .row button{min-height:35px;font-size:11px}.at-zoo .camera{bottom:140px}.picture-places img{height:115px}.picture-places span{font-size:16px;padding:10px 4px}.pet-hero{height:210px}.dialog-head h2{font-size:21px}.big-choices button{font-size:15px;min-height:52px}.dialog-body{padding:15px}.simple-scene-actions button{min-width:83px}.needs-pictures img{width:65px;height:65px}.rescue-hero{height:185px}}
@media(max-height:630px){header{min-height:49px;padding:4px 12px}.brand img{width:32px;height:32px}.scene-heading{top:6px}.world-hint{top:49px}.bottom-nav{min-height:58px;padding:3px 8px}.bottom-nav button{min-height:45px}.bottom-nav button span{font-size:23px;line-height:25px}.toolbox#careTools button{height:56px}.toolbox button img{height:33px}.camera{bottom:96px}.pet-hero{height:130px}.picture-places img{height:95px}.big-choices button{min-height:45px}.zoo-quick button img{height:35px}.zoo-quick button{min-height:49px}.at-zoo .camera{bottom:126px}.rescue-hero{height:120px}}
.picture-item{padding:10px;gap:7px;text-align:center}.picture-item>img{width:100%;height:110px;object-fit:contain}.picture-item h3{font-size:13px;margin:0;line-height:1.25}.picture-item button{min-height:44px}.shop-tabs{display:flex;gap:10px;margin-bottom:17px}.picture-job{display:flex;align-items:center;gap:12px;padding:13px;border:2px solid #eddbb3;border-radius:21px;background:#fff8e9}.picture-job>img{width:70px;height:70px;object-fit:contain}.picture-job>div{flex:1;min-width:0}.picture-job h3{font-size:16px;margin:0 0 9px}.picture-job progress{display:block;width:100%;height:10px}.picture-job small{display:block;margin-top:5px}.picture-job button{min-width:68px;font-size:15px}.big-choices .peach{background:#ffd48d}.notice{border-radius:18px}.simple-settings button{background:#ecf2d7}.simple-settings .tile{gap:9px}.simple-settings button:nth-child(2n){background:#ffe3b0}@media(max-width:390px){.picture-item>img{height:90px}.picture-job{gap:8px;padding:10px}.picture-job>img{width:52px;height:58px}.picture-job h3{font-size:14px}.picture-job button{min-width:57px;padding:8px}.toolbox#careTools{gap:6px}}
.crew-pet{width:100%;height:145px;object-fit:contain}.village-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.village-choices button{background:#fff0c9;border:2px solid #ecc686;padding:10px;border-radius:23px}.village-choices img{width:100%;height:130px;object-fit:contain}.village-choices span{display:block;font-size:18px;margin-top:8px}.checks{justify-content:center;margin:22px 0}.checks label{font-size:20px;min-height:65px;background:#e9edcd;border:2px solid #cbd3a0;display:flex;align-items:center}.checks input{width:24px;height:24px}.checks input:checked{accent-color:#43a57c}.tile p:empty{display:none}@media(max-width:450px){.village-choices{gap:7px}.village-choices img{height:100px}.village-choices button{padding:7px}.village-choices span{font-size:16px}.checks label{font-size:17px;padding:10px}.crew-pet{height:125px}}

#artLoading{position:absolute;inset:0;z-index:5;background:linear-gradient(#c1e9db,#fff1c4);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;color:#805a34}#artLoading img{width:170px;height:170px;object-fit:contain;animation:happy-hop 1.1s ease-in-out infinite}#artLoading strong{font-size:20px}@keyframes happy-hop{50%{transform:translateY(-12px) rotate(3deg)}}@media(prefers-reduced-motion:reduce){#artLoading img{animation:none}}
/* Relaxed animal care. The map chooses a pen; every pen shares the cottage controls. */
header .wallet,header .level,#mode{display:none!important}.world-hint{display:none!important}.is-building .world-hint,.is-cleaning .world-hint{display:block!important}.at-zoo .zoo-focus{display:none}.in-pen .camera{bottom:108px}.in-pen .zoo-tools{display:none!important}.friend-choice{display:flex;flex-direction:column;align-items:center;background:#fff2d0;border:2px solid #edce94;border-radius:23px;padding:12px}.friend-choice img{width:100%;height:175px;object-fit:contain}.friend-choice span{font-size:19px;margin-top:8px}.at-zoo:not(.in-pen) .camera{bottom:105px}.at-zoo:not(.in-pen) #buildTools~.status-line{display:none}.in-pen .scene-heading strong{max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand{margin-right:auto}header{justify-content:space-between}.zoo-quick button{min-height:75px}.zoo-quick button img{height:54px}.in-pen #careTools{display:flex}.in-pen #careTools.hide{display:none!important}@media(max-width:740px){.zoo-quick button{min-height:68px}.zoo-quick button img{height:48px}.in-pen .camera{bottom:105px}.at-zoo:not(.in-pen) .camera{bottom:104px}.friend-choice img{height:145px}}@media(max-height:630px){.in-pen .camera{bottom:96px}}

/* Landscape is a habitat with floating controls, not stacked website panels. */
@media(orientation:landscape) and (max-height:1100px){
 body{position:relative;height:var(--game-height,100dvh);width:100%;padding:0;overflow:hidden}
 main{position:absolute;inset:0;width:100%;height:100%;display:block}
 /* Explicit height keeps the canvas alive when main stops being a flex column. */
 .game-layout,.at-zoo .game-layout{position:absolute;inset:0;width:100%;height:100%;min-height:0}
 .game-layout>section{width:100%;height:100%;min-height:0}
 .world-card,.at-zoo .world-card{position:absolute;inset:0;width:100%;height:100%}
 .world-card{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0}
 header{position:absolute;top:max(7px,env(safe-area-inset-top));right:max(9px,env(safe-area-inset-right));width:auto;min-height:0;padding:0;border:0;background:none;box-shadow:none;gap:6px}
 header .brand{display:none}header>button{width:40px;height:40px;min-height:40px;background:#fff7dce8}
 .scene-heading,.at-zoo .scene-heading{top:max(8px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:108px}
 .scene-heading strong,.at-zoo .scene-heading strong{font-size:14px;padding:8px 12px}.scene-heading>button{min-height:38px}
 .bottom-nav{position:absolute;transform:none;left:max(10px,env(safe-area-inset-left));bottom:max(8px,env(safe-area-inset-bottom));width:250px;min-height:58px;padding:3px;border:2px solid #efd3a1;border-radius:22px;background:#fff6dce8;z-index:4}
 .bottom-nav button{min-height:46px;padding:2px;font-size:9px}.bottom-nav button span{font-size:22px;line-height:24px;margin:0}
 .toolbox,.in-pen .toolbox{left:auto;right:max(10px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:350px;padding:5px;gap:4px;border-radius:21px}
 .toolbox#careTools button{height:54px;font-size:10px}.toolbox button img{width:32px;height:30px}.action-symbol{font-size:25px;line-height:29px}
 .camera,.at-zoo .camera,.in-pen .camera,.at-zoo:not(.in-pen) .camera{left:max(10px,env(safe-area-inset-left));right:auto;top:62px;bottom:auto;width:auto;gap:5px}
 .camera button,.at-zoo .camera button{height:36px;min-height:36px;width:36px;min-width:36px}.camera #wholeZoo{margin-left:8px}
 #buildTools{max-width:calc(100% - 290px);width:auto}.zoo-tools{left:auto;right:10px;bottom:8px;width:390px}
 .simple-scene-actions{left:auto;right:10px;bottom:10px}.simple-scene-actions button{min-height:65px}
}
@media(orientation:landscape) and (min-width:1100px){.toolbox,.in-pen .toolbox{width:420px}.bottom-nav{width:300px}}

/* Big picture choices update each animal immediately. */
.look-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.look-choices button{padding:6px;border:3px solid #ead4aa;background:#fff3d7;min-width:0}.look-choices button.active{border-color:#359468;background:#def2c9}.friend-look{width:100%;height:90px;object-fit:contain;pointer-events:none}.friend-hero{width:100%;height:100%;object-fit:contain}.look-choices span{display:block;font-size:13px}.look-choices button:focus-visible{outline:3px solid #359468}

.family-button{margin-top:14px}.on-walk #careTools button:not(#hay){display:none}.on-walk #careTools{width:130px;left:auto}.on-walk .scene-heading strong{font-size:14px}.on-walk .camera #wholeZoo{margin-left:auto}

.outfit-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.outfit-choices button{padding:7px 2px;border:2px solid #ead4aa;min-width:0}.outfit-choices button.active{border-color:#359468;background:#def2c9}.outfit-choices span{display:block;font-size:28px}.outfit-choices small{display:block;font-size:10px;color:inherit}.wardrobe-title{margin:16px 0 10px}.on-walk .toolbox#careTools{right:12px}

.pet-care-panel{position:absolute;right:12px;top:72px;z-index:5;display:flex;flex-direction:column;align-items:center;gap:7px;background:#fff5dedf;border:2px solid #eacb94;border-radius:22px;padding:10px;max-width:180px}.pet-care-panel strong{font-size:13px}.pet-care-panel #careTool{font-size:39px;min-width:75px;min-height:72px;touch-action:none;user-select:none;-webkit-user-select:none}.pet-care-panel #vetTools{display:flex;flex-direction:column;gap:6px}.pet-care-panel #vetTools button{font-size:12px}.keeper-preview{width:100%;height:180px;object-fit:contain;background:#e8f0d9;border-radius:22px}.keeper-choices{display:flex;gap:9px;justify-content:center}.keeper-choices button{padding:5px;border:3px solid #ead4aa}.keeper-choices button.active{border-color:#359468}.keeper-choices button span{display:block;background:var(--choice);width:38px;height:38px;border-radius:50%}.care-choice-icon{display:block;font-size:45px;padding:15px}.item-sizing{display:flex;gap:5px;flex-wrap:wrap}.toolbox#careTools{flex-wrap:wrap}.toolbox#careTools button{flex:1 0 12%;min-width:38px}.on-walk #careTools button:not(#hay){display:none}@media(orientation:landscape){.bottom-nav{width:300px}.toolbox#careTools{width:400px}.pet-care-panel{top:65px;right:12px;max-height:calc(100dvh - 130px);overflow:auto}.item-sizing button{padding:5px 9px;font-size:11px}}
.zoo-quick{grid-template-columns:repeat(9,minmax(0,1fr));overflow-x:auto}.zoo-quick button{min-width:58px}#putDown{min-width:90px;width:auto}.keeper-preview{height:230px}.keeper-choices{flex-wrap:wrap}.outfit-choices{grid-template-columns:repeat(4,minmax(0,1fr))}#fishFoodJar{touch-action:none;user-select:none;-webkit-user-select:none;font-size:15px}#aquariumTools{width:min(420px,calc(100% - 24px));left:auto;right:12px}#aquariumTools button{flex:1;min-height:55px}#aquariumTools #fishBrush.active{background:#d5efbb}@media(orientation:landscape) and (max-width:760px){.bottom-nav{width:260px}.toolbox#careTools{width:320px}}

.name-suggestions{margin:10px 0 18px}.name-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding-top:10px}.name-options button{font-size:12px;padding:9px 4px}.resize-preview{width:100%;height:190px;object-fit:contain;background:#edf1d9;border-radius:20px}#itemScale{width:100%;accent-color:#49a57f;min-height:48px}.item-sizing #resizeDecoration{background:#ffdf92;border-color:#d8b15d}

.fish-catalog{grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:12px}.fish-catalog button{min-height:150px}.fish-catalog img{height:90px;object-fit:contain}.fish-catalog small{display:block;color:#617c70;margin-top:6px}.treasure-album{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.treasure-gift{font-size:54px}#aquariumTools{width:min(520px,calc(100% - 24px));flex-wrap:wrap}#aquariumTools button{font-size:14px;min-width:95px}.zoo-quick{display:flex;gap:8px}.zoo-quick button{flex:0 0 70px}

#houseTools{top:74px;bottom:auto;right:12px;left:auto;width:auto;max-width:calc(100% - 24px);flex-wrap:wrap;gap:5px;padding:6px}#houseTools button{font-size:14px;min-height:42px;padding:6px 9px}@media(orientation:landscape){#houseTools{top:56px}}

header>#keeperDressUp{width:76px;border-radius:16px;font-size:20px;display:flex;align-items:center;justify-content:center;gap:4px}#keeperDressUp small{font-size:10px;color:inherit;line-height:1.05;max-width:30px}.wardrobe-stage{position:sticky;top:0;z-index:1;background:#fff7e9;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:20px;border:2px solid #eace9f;margin-bottom:16px}.wardrobe-stage .keeper-preview{width:210px;height:210px;background:radial-gradient(ellipse,#fff7cd,#e9eedb)}.wardrobe-stage button{margin-right:12px;white-space:nowrap}.wardrobe-grid button{border:3px solid #e7d6b5;background:#fff1d9;min-height:80px}.wardrobe-grid button.active{border-color:#359468;background:#def2c9}.wardrobe-grid button>span{display:block;font-size:31px}.appearance-options{margin-top:20px}@media(orientation:landscape){.scene-heading,.at-zoo .scene-heading{right:200px}.wardrobe-stage{float:left;position:sticky;top:70px;width:200px;flex-direction:column;margin:0 15px 15px 0}.wardrobe-stage .keeper-preview{width:180px;height:185px}.wardrobe-stage button{margin:0 0 10px}.wardrobe-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wardrobe-grid button{min-height:65px}.keeper-choices button{padding:4px}.keeper-choices button span{width:32px;height:32px}}

#adventureTools{position:absolute;bottom:105px;left:50%;right:auto;transform:translateX(-50%);width:min(540px,calc(100% - 24px));max-width:calc(100% - 24px);flex-wrap:nowrap;overflow-x:auto;z-index:4;padding:7px;gap:6px;scrollbar-width:thin}#adventureTools button{flex:0 0 auto;min-width:70px;min-height:54px;font-size:13px}.at-play .camera{bottom:180px}.story-canvas{height:auto;aspect-ratio:1.6;width:100%;background:#fff2d3;border-radius:18px;border:3px solid #eac894;touch-action:none}.sticker-choices{display:flex;flex-wrap:wrap;gap:6px}.sticker-choices button{font-size:25px;padding:7px;min-width:45px}.story-photos{display:flex;overflow-x:auto;gap:8px;margin-top:15px}.story-photos button{flex:0 0 100px;padding:3px}.story-photos img{width:94px;height:65px;object-fit:cover;border-radius:12px}@media(orientation:landscape){#adventureTools{bottom:8px;left:auto;right:10px;transform:none;width:calc(100% - 340px);max-width:600px}.at-play .camera{top:62px;bottom:auto}#adventureTools button{min-height:47px;font-size:12px}}

/* Controls occupy their own rows; no menu covers the interactive canvas. */
body{display:flex;flex-direction:column;height:var(--game-height,100dvh);min-height:0;overflow:hidden;position:relative;width:100%}
header{position:relative!important;inset:auto!important;flex:0 0 auto;width:100%!important;min-height:46px;padding:5px 10px!important;display:flex;flex-wrap:nowrap;gap:6px;background:#fff6df!important;border-bottom:2px solid #ead3ab!important}
header .brand{display:flex!important;flex:1;min-width:0;margin:0}header .brand img{width:28px;height:28px}header h1{font-size:16px;max-width:150px;line-height:1.05}header>button{flex:0 0 auto;width:37px!important;height:37px!important;min-height:37px!important;padding:4px!important}header>#keeperDressUp{width:74px!important}header .wallet,header .level{display:none!important}
main{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column;flex:1 1 0;min-height:0;height:auto!important;width:100%;padding:0!important}
.game-layout,.at-zoo .game-layout{position:relative!important;inset:auto!important;display:flex!important;flex:1 1 0;height:auto!important;min-height:0;width:100%;gap:0}
.game-layout>section{position:relative;display:flex;flex-direction:column;flex:1 1 0;height:auto!important;min-height:0;min-width:0;width:100%}
.world-card,.at-zoo .world-card{position:relative!important;inset:auto!important;display:flex;flex-direction:column;flex:1 1 0;height:auto!important;min-height:0;width:100%;border:0;border-radius:0}
.scene-heading,.at-zoo .scene-heading{position:relative!important;inset:auto!important;display:flex;flex:0 0 auto;min-height:40px;width:100%;padding:4px 9px!important;gap:8px;background:#fff7e8!important;pointer-events:auto}
.scene-heading>div{min-width:0;flex:1}.scene-heading strong,.at-zoo .scene-heading strong{display:block;max-width:100%!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;padding:4px 7px;border:0;box-shadow:none;background:none}
.scene-heading>button{flex:0 0 auto;min-height:32px!important;max-width:45%;padding:5px 9px;font-size:12px}
.canvas-wrap,.at-zoo .canvas-wrap{position:relative!important;inset:auto!important;flex:1 1 0;height:auto!important;min-height:0;width:100%;overflow:hidden}
.canvas-wrap>#world{position:absolute;inset:0;width:100%;height:100%;z-index:0;touch-action:none}
.camera,.at-zoo .camera,.in-pen .camera,.at-zoo:not(.in-pen) .camera,.at-play .camera{position:relative!important;inset:auto!important;flex:0 0 auto;display:flex;align-items:center;gap:5px;overflow-x:auto;width:100%!important;max-width:100%;height:41px;padding:3px 8px;margin:0;background:#fbf4e5;transform:none}
.camera button,.at-zoo .camera button{flex:0 0 auto;width:34px;min-width:34px;height:34px;min-height:34px;padding:3px;font-size:17px}.camera #wholeZoo,.camera #putDown{width:auto;min-width:92px;margin-left:0;font-size:12px}
.toolbox,.in-pen .toolbox,#houseTools,#aquariumTools,#adventureTools,#buildTools,.toolbox#careTools{position:relative!important;inset:auto!important;flex:0 0 auto;display:flex;flex-wrap:nowrap!important;align-items:center;width:100%!important;max-width:100%!important;min-height:54px;height:auto;padding:5px 7px!important;margin:0!important;border-radius:0!important;gap:6px;overflow-x:auto;overflow-y:hidden;transform:none!important;background:#fff6df;border:0;border-top:1px solid #ead3ab;z-index:2}
.toolbox>button,.toolbox#careTools button,#houseTools button,#aquariumTools button,#adventureTools button{flex:0 0 auto;min-width:58px;min-height:43px!important;height:auto!important;max-height:58px;font-size:12px!important;padding:5px 8px!important}.toolbox#careTools button img{width:25px;height:25px}.toolbox .action-symbol{font-size:22px;line-height:25px}.tool-label{display:none!important}.toolbox#careTools button{flex-direction:column}.toolbox .more-tools .selected-tools{position:fixed;bottom:125px;left:10px;z-index:20;overflow:auto}
.zoo-tools{position:relative!important;inset:auto!important;flex:0 0 auto;width:100%!important;max-width:100%;margin:0;border-radius:0}.zoo-quick{padding:4px;gap:5px}.zoo-quick button{min-height:57px;min-width:64px;flex:0 0 72px;padding:3px;font-size:10px}.zoo-quick button img{height:34px;width:38px;object-fit:contain}
.pet-care-panel{position:relative!important;inset:auto!important;display:flex;flex:0 0 auto;flex-direction:row;flex-wrap:nowrap;max-width:100%;max-height:95px;overflow-x:auto;gap:6px;padding:4px 8px;border-radius:0;margin:0}.pet-care-panel #careTool{font-size:26px;min-height:43px;min-width:48px}.pet-care-panel #vetTools{flex-direction:row}.pet-care-panel strong{font-size:12px}
.bottom-nav{position:relative!important;inset:auto!important;flex:0 0 auto;transform:none!important;display:flex;justify-content:space-around;width:100%!important;max-width:100%!important;min-height:62px;height:auto;padding:3px 4px max(3px,env(safe-area-inset-bottom));gap:2px;border-radius:0;overflow-x:auto;background:#fff6df;z-index:4}
.bottom-nav button{flex:1 0 0;min-width:38px;min-height:50px;padding:3px 2px;font-size:10px}.bottom-nav button span{font-size:23px;line-height:25px;margin-bottom:2px}
.simple-scene-actions{position:relative!important;inset:auto!important;display:flex;flex:0 0 auto;width:100%;justify-content:center;margin:0;background:#fff6df}.simple-scene-actions button{min-height:45px!important}
.save-warning{position:relative;flex:0 0 auto;z-index:15;margin:0;padding:7px 12px;border-radius:0;max-height:100px;overflow:auto;font-size:12px}#artLoading{pointer-events:none}#toast{bottom:75px;font-size:13px;padding:8px 14px}
@media(orientation:landscape){header{min-height:40px;padding:2px 9px!important}header h1{font-size:15px}.scene-heading,.at-zoo .scene-heading{min-height:34px;padding:2px 8px!important}.camera,.at-zoo .camera,.in-pen .camera,.at-play .camera{height:36px;padding:1px 8px}.camera button,.at-zoo .camera button{min-height:32px;height:32px}.toolbox,.in-pen .toolbox,#houseTools,#aquariumTools,#adventureTools,#buildTools,.toolbox#careTools{min-height:48px;padding:3px 7px!important}.toolbox#careTools button{flex-direction:row;gap:4px}.bottom-nav{min-height:51px}.bottom-nav button{min-height:43px}.bottom-nav button span{font-size:21px;line-height:23px}.world-hint{display:none!important}.zoo-quick button{min-height:45px}.zoo-quick button img{height:28px}}

#buildTools .more-tools{display:contents}#buildTools .more-tools>summary{display:none}#buildTools .more-tools .selected-tools{position:static!important;inset:auto!important;display:flex;flex-wrap:nowrap;min-width:0;padding:0;border:0;background:none;box-shadow:none;gap:6px}#buildTools .item-sizing{flex-wrap:nowrap}#buildTools .selected-tools button{flex:0 0 auto;white-space:nowrap}

#controlDock{position:relative;display:flex;flex:0 0 auto;flex-direction:column;min-height:0;max-height:35dvh;overflow:auto;background:#fff6df;z-index:3}
/* A dedicated landscape sidebar keeps full-height artwork and touch targets separate. */
@media(orientation:landscape){body{display:grid!important;grid-template-columns:200px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:0}body>header{grid-column:1;grid-row:1;min-width:0;width:200px!important;min-height:42px;justify-content:center}body>header .brand{display:none!important}body>main{grid-column:2;grid-row:1 / 4;width:100%;height:100%!important;min-height:0;border-left:2px solid #ead3ab}#controlDock{grid-column:1;grid-row:2;max-height:none;min-height:0;overflow-y:auto;overflow-x:hidden}body>.bottom-nav{grid-column:1;grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:end;min-height:0;max-height:none;width:200px!important;gap:3px;padding:4px 5px max(4px,env(safe-area-inset-bottom))}.bottom-nav button{min-height:38px;display:flex;align-items:center;justify-content:center;gap:4px;font-size:11px;padding:4px}.bottom-nav button span{display:inline;font-size:21px;line-height:22px;margin:0}#controlDock .toolbox,#controlDock #houseTools,#controlDock #aquariumTools,#controlDock #adventureTools,#controlDock #buildTools,#controlDock .toolbox#careTools{flex-wrap:wrap!important;justify-content:flex-start;height:auto;min-height:0;overflow-x:hidden;padding:6px!important;gap:5px}#controlDock .toolbox>button,#controlDock .toolbox#careTools button,#controlDock #houseTools button,#controlDock #aquariumTools button,#controlDock #adventureTools button{flex:1 0 82px;min-width:0;min-height:39px!important;max-height:none;font-size:11px!important;padding:5px!important}#controlDock .toolbox#careTools button{flex-direction:row;gap:3px}#controlDock .toolbox#careTools button img{width:22px;height:22px}#controlDock #buildTools .item-sizing{flex-wrap:wrap;width:100%}#controlDock #buildTools .selected-tools{flex-wrap:wrap;width:100%}#controlDock .zoo-quick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;overflow:hidden}#controlDock .zoo-quick button{min-width:0;flex-direction:column;gap:1px;font-size:10px;min-height:50px}.scene-heading strong,.at-zoo .scene-heading strong{font-size:13px}.scene-heading>button{font-size:11px}}

/* Keep everyday actions visible and wrapping instead of hiding them beyond the edge. */
@media(orientation:portrait){#controlDock{max-height:40dvh}#controlDock .toolbox,#controlDock #adventureTools,#controlDock #houseTools,#controlDock #aquariumTools{flex-wrap:wrap!important;overflow-x:hidden;overflow-y:visible}#controlDock .toolbox>button,#controlDock #adventureTools>button,#controlDock #houseTools>button,#controlDock #aquariumTools>button{flex:1 0 82px;min-width:0;min-height:44px!important;max-height:none;white-space:normal;overflow-wrap:break-word}}
dialog{max-width:calc(100vw - 20px);max-height:calc(var(--game-height,100dvh) - 20px);box-sizing:border-box;overflow:auto}dialog button{overflow-wrap:break-word}#modalBody{min-width:0}

.clinic-tools{display:flex;flex-wrap:wrap;gap:6px;padding:7px;background:#fff6df;border-top:1px solid #e5d5ac}.clinic-tools .clinic-hint{flex-basis:100%;font-size:12px;text-align:center;color:#79684c}.clinic-tools button{flex:1 0 78px;min-height:52px;border:1px solid #e5d5ac;border-radius:15px;background:#fffaf0;font-family:inherit;font-weight:700;font-size:13px;touch-action:none}.clinic-tools button span{display:block;font-size:25px;line-height:1.1}.clinic-tools button[aria-pressed="true"]{background:#ffe4a2;border-color:#d5ac51}

/* Native scrolling must work even when a swipe starts on an animal preview. */
dialog[open]{display:flex;flex-direction:column;overflow:hidden;max-height:calc(var(--game-height,100dvh) - 20px);padding:0}
dialog .dialog-head{position:relative;flex:0 0 auto;min-height:56px}
#modalBody{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:30px}
dialog canvas,dialog .pet-hero,dialog .look-choices,dialog .friend-choice{touch-action:pan-y!important}
#penGrooming{gap:6px;padding:6px;background:#fff6df;border-top:1px solid #e5d5ac;flex:0 0 auto;display:flex;flex-wrap:wrap;justify-content:center}
#penGrooming button{touch-action:none;flex:1 0 78px;min-height:44px}.groom-hint{font-size:11px;align-self:center}

/* Keep the game anchored to the screen when Safari rotates or rubber-bands.
   Scrolling belongs to the action dock and dialogs, never the page itself. */
html{height:100%;margin:0;padding:0;overflow:hidden;overscroll-behavior:none;background:#fff6df}
body{position:fixed;top:0;left:0;margin:0;padding:0;height:var(--game-height,100dvh);overscroll-behavior:none;background:#fff6df}
body>header,body>main{margin:0}

dialog.visit-dialog{width:min(1120px,96vw);max-width:96vw}dialog.visit-dialog .dialog-body{padding:12px}#zooFriends{white-space:nowrap}@media(max-width:600px){#zooFriends{font-size:12px;padding:8px 10px}}

/* Keep every header action inside narrow phones and the landscape sidebar. */
@media (orientation:portrait) and (max-width:740px){
 body>header{gap:4px!important;padding-left:max(7px,env(safe-area-inset-left))!important;padding-right:max(7px,env(safe-area-inset-right))!important;min-width:0;box-sizing:border-box}
 body>header .brand{flex:1 1 0;min-width:0;gap:4px;margin-right:0}
 body>header .brand img{flex:0 0 26px;width:26px;height:26px}
 body>header h1{min-width:0;max-width:none;font-size:14px;line-height:1.12;white-space:normal;overflow-wrap:normal}
 body>header>#keeperDressUp{flex:0 0 60px;width:60px!important;font-size:18px;gap:2px}
 body>header>#hear,body>header>#settings{flex:0 0 37px;width:37px!important}
 body>header>#zooFriends{flex:0 0 76px;width:76px!important;min-width:0;height:40px!important;white-space:nowrap;font-size:12px;padding:4px!important;box-sizing:border-box}
}
@media (orientation:landscape){
 body>header{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px!important;padding:5px 7px!important;box-sizing:border-box;align-content:start}
 body>header>button,body>header>#keeperDressUp,body>header>#zooFriends{width:100%!important;min-width:0;max-width:100%;height:38px!important;min-height:38px!important;box-sizing:border-box}
 body>header>#zooFriends{font-size:12px;white-space:nowrap;padding:4px!important}
}
