:root{
  --green:#77bf3f;
  --green-dark:#4b8e2c;
  --lime:#b9ec5c;
  --gold:#ffd75b;
  --brown:#6f451f;
  --soil:#8a5b2e;
  --cream:#fff8df;
  --ink:#3f321f;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;color:var(--ink)}
button,input{font:inherit}
button{cursor:pointer}

/* Mantém a escala da interface fixa: sem pinch/double-tap zoom do navegador. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}
body {
  overscroll-behavior: none;
}
input, textarea, select, button {
  touch-action: manipulation;
}

/* LOGIN */
body.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(#9be0ff 0 32%,#8fc95d 32% 100%)}
.auth-shell{width:min(1000px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:24px}
.hero-card,.auth-card{background:rgba(255,253,242,.96);border:3px solid rgba(112,70,28,.18);border-radius:28px;box-shadow:0 12px 35px rgba(69,48,19,.16)}
.hero-card{padding:52px;background:linear-gradient(145deg,#fff9df,#ecffd9)}
.logo-badge{font-size:72px}.eyebrow{font-size:12px;font-weight:900;letter-spacing:2.4px;color:#4f8f2f}
.hero-card h1{font-size:58px;line-height:.95;margin:8px 0 18px;color:#4a7a2b}.hero-card p{font-size:20px;line-height:1.5}
.hero-farm{font-size:48px;display:flex;gap:18px;align-items:end;margin-top:34px}
.auth-card{padding:32px}.tabs{display:flex;background:#efe6ca;border-radius:16px;padding:5px;margin-bottom:24px}
.tab{flex:1;border:0;background:transparent;padding:12px;border-radius:12px;font-weight:800;color:#6b5a3e}.tab.active{background:white;color:#4f8f2f}
.auth-form{display:none;gap:16px}.auth-form.active{display:grid}label{display:grid;gap:7px;font-weight:800;font-size:14px}
input{width:100%;border:2px solid #e1d8bc;border-radius:13px;padding:13px 14px;background:#fffef8;outline:none}.primary-btn{border:0;border-radius:14px;padding:13px 16px;font-weight:900;background:linear-gradient(#79bd4d,#4f8e30);color:white}
.alert{padding:12px 14px;border-radius:12px;margin-bottom:14px;font-weight:700}.alert.error{background:#ffe1df;color:#8f2b28}.alert.success{background:#e4f7d7;color:#417226}

/* Cenário clássico: um único plano SVG mantém a perspectiva em qualquer tela. */
.game-page{background:#e7eed8;color:#655135;font-family:Arial,Helvetica,sans-serif}.page-shell{width:min(1124px,calc(100% - 40px));margin:22px auto}.page-heading{height:54px;display:flex;align-items:center;gap:22px;margin-bottom:12px}.brand{text-decoration:none;color:#618e37;font:bold 31px Georgia,serif;letter-spacing:-1.5px}.brand b{color:#b88332}.brand-flower{color:#dfa936;font-size:38px;vertical-align:middle}.tagline{font-size:12px;color:#83936d}.page-heading nav{display:flex;align-items:center;gap:22px;margin-left:auto;font-size:12px}.page-heading nav a,.page-heading nav button{color:#6d7f58;text-decoration:none;background:none;border:0;padding:8px}.game-frame{border:3px solid #8b9d57;border-radius:14px;overflow:hidden;box-shadow:0 10px 26px #5c723527;background:#f9f4dc}.hud{display:flex;align-items:center;gap:16px;height:82px;padding:8px 17px;background:linear-gradient(#fff9df,#e8ddb2);border-bottom:3px solid #aa985c;position:relative;z-index:2}.player{display:flex;align-items:center;gap:8px;min-width:250px}.avatar{width:52px;height:56px;border:3px solid #fff4ce;outline:1px solid #a4a06f;background:linear-gradient(#b4d691,#7ca657);display:grid;place-items:center;color:#fff8db;font:bold 32px Georgia;border-radius:6px;box-shadow:0 2px 2px #0002}.player-copy{width:143px}.player-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;margin-bottom:7px}.xp-track{height:16px;border:1px solid #899754;background:#c4ce95;border-radius:10px;position:relative;overflow:hidden;box-shadow:inset 0 1px 3px #58713e40}.xp-track i{position:absolute;inset:0 auto 0 0;background:linear-gradient(#a7d456,#73a034);width:0}.xp-track span{position:relative;font-size:10px;display:block;text-align:center;color:#fff;text-shadow:0 1px 2px #314a20;line-height:14px}.level-badge{background:linear-gradient(#ffe486,#e5b83d);border:2px solid #b7963f;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;font-weight:bold;color:#836125}.balances{display:grid;gap:5px;font-size:14px;min-width:122px}.coins,.popularity{display:flex;align-items:center;gap:8px}.coins i{width:25px;height:25px}.popularity{color:#c27369;font-size:19px}.popularity b{font-size:12px;color:#7f7451}.farm-nav{display:flex;justify-content:flex-end;gap:16px;margin-left:auto}.farm-nav button{background:none;border:0;display:grid;justify-items:center;color:#78623d;font-size:10px;gap:1px;min-width:59px;padding:0}.farm-nav i{width:42px;height:42px;display:block}.farm-nav button:hover{filter:brightness(1.1);transform:translateY(-2px)}.art-icon{display:block;width:100%;height:100%;overflow:visible}.scene-viewport{overflow:auto}.scene-wrap{position:relative;width:100%;aspect-ratio:1100/620;isolation:isolate}#farmScene{width:100%;height:100%;display:block}.farm-label{position:absolute;top:17px;left:18px;display:flex;gap:7px;align-items:center;background:#fff9dbe6;border:1px solid #839d4e;border-radius:20px;padding:7px 12px;font-size:11px;box-shadow:0 2px 3px #35551720}.online-dot{width:7px;height:7px;background:#74a649;border-radius:50%}#backHome{background:none;border:0;font-size:10px;color:#588d31;text-decoration:underline}.side-actions{position:absolute;right:13px;top:80px;display:grid;gap:12px}.side-actions button{width:49px;height:52px;border:2px solid #a28843;border-radius:10px;background:linear-gradient(#fff6cd,#e3cd89);box-shadow:0 3px 0 #77904380;font-size:24px;color:#8a7346;display:grid;place-items:center;padding:2px}.side-actions small{font-size:8px;font-weight:bold}.side-actions i{display:block;width:33px;height:29px}.toolbar{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:4px;align-items:center;border:2px solid #9c793e;border-radius:14px;padding:8px 10px 7px;background:linear-gradient(#fff1b5,#e7c876);box-shadow:0 4px 0 #53682e50,inset 0 0 0 2px #fff5c9}.toolbar button{width:57px;height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:linear-gradient(#fff9dc,#efdfa8);border:1px solid #c5ab68;border-radius:8px;color:#755d34;font-size:9px;position:relative;padding:4px}.toolbar button i{width:32px;height:36px;display:block}.toolbar button.active{background:linear-gradient(#dceda4,#acd16b);border:2px solid #668d39;box-shadow:inset 0 0 0 1px #e9f4bd}.toolbar button:hover{border-color:#718e39;transform:translateY(-2px)}.toolbar .hand-icon{height:36px;font-size:38px;line-height:30px;color:#9b753e}.tool-divider{height:39px;width:1px;background:#bea36a;margin:0 3px}.tool-hint{position:absolute;top:57px;left:50%;transform:translateX(-50%);background:#446c2bd9;color:#f9ffdc;border-radius:15px;padding:6px 14px;font-size:10px;white-space:nowrap;pointer-events:none}.plot{cursor:pointer;outline:none}.plot .soil-top{stroke:#79552c;stroke-width:2}.plot:hover .soil-top,.plot:focus .soil-top{stroke:#ffe996;stroke-width:4}.plot.locked .soil-top{fill:#88b94d;stroke:#6d9a3b;stroke-dasharray:5 5;opacity:.6}.plot.locked:hover .soil-top{stroke:#fff0b1}.plot-ready{filter:drop-shadow(0 0 2px #ffe268)}.plant-art{pointer-events:none}.plot-tip{position:absolute;z-index:3;pointer-events:none;max-width:240px;background:#fff9e8f5;border:2px solid #a49b60;border-radius:9px;padding:10px 13px;font-size:12px;box-shadow:0 4px 12px #36581f40;line-height:1.6}.neighbors{border-top:3px solid #9ca856;padding:11px 17px 14px;background:linear-gradient(#f6f3d9,#e7e7c2)}.neighbor-heading{display:flex;align-items:center;gap:12px;font-size:12px;margin-bottom:10px}.neighbor-heading small{color:#94916a;font-size:10px}.neighbor-heading button{margin-left:auto;border:0;background:none;color:#6d8a37;font-size:11px}.neighbor-list{display:flex;gap:10px;overflow:auto;min-height:67px}.neighbor{flex:0 0 105px;border:1px solid #c0c591;border-radius:7px;background:#fffcec;padding:7px;display:flex;gap:7px;align-items:center;text-align:left;color:#7a7250}.neighbor .face{width:34px;height:38px;display:grid;place-items:center;background:#abc679;color:#fff;font:bold 22px Georgia;border:2px solid #e4edc6;border-radius:5px}.neighbor span:last-child{font-size:10px;min-width:0}.neighbor b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:49px}.neighbor small{display:block;font-size:9px;margin-top:4px;color:#a39156}.empty-neighbors{display:flex;align-items:center;gap:12px;color:#8d916d;font-size:12px;padding:8px 0}.page-footer{display:flex;gap:16px;align-items:center;justify-content:space-between;font-size:10px;color:#899772;padding:15px 2px}.page-footer button{border:0;background:none;color:inherit;font-size:10px;margin-left:auto}#connection.error{color:#b65e41}dialog{padding:0;border:3px solid #a98a4a;border-radius:15px;background:#fff9e6;color:#725a37;width:min(680px,calc(100% - 28px));max-height:86vh;box-shadow:0 18px 70px #22361170}dialog::backdrop{background:#263b245c}.modal-head{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(#ffedb4,#e6ce87);padding:13px 19px;border-bottom:2px solid #c3a567;z-index:3}.modal-head h2{font:bold 21px Georgia;margin:0}.modal-head button{border:1px solid #bd9554;border-radius:50%;background:#fff2c5;color:#99733b;width:29px;height:29px;font-size:23px;line-height:23px}#modalBody{padding:19px;line-height:1.5;font-size:13px}.modal-sub{color:#98815a;margin:0 0 15px}.shop-tabs{display:flex;gap:7px;margin-bottom:18px;flex-wrap:wrap}.shop-tabs button,.green-action,.small-btn{border:1px solid #7d9d48;border-radius:6px;background:linear-gradient(#aeca74,#88ab50);color:#fff;padding:8px 13px;font-size:12px;font-weight:bold;box-shadow:0 2px 0 #60802f20}.shop-tabs button{background:#ece3bf;color:#8d784a;border-color:#cfbd84}.shop-tabs button.active{background:#8fab57;color:white;border-color:#6e9145}.shop-grid,.seed-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.shop-card,.seed-card{border:1px solid #d7c69b;background:linear-gradient(#fffef1,#f3e9c7);border-radius:10px;padding:13px 10px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;color:#745c38}.shop-card .art-icon,.seed-card .art-icon{width:65px;height:74px;margin-bottom:4px}.shop-card b,.seed-card b{font-size:13px}.shop-card small,.seed-card small{color:#97835d;font-size:10px}.shop-card button{margin-top:auto;width:100%}.shop-card.locked{opacity:.55}.shop-card input{padding:5px;width:60px;border:1px solid #d8c899;border-radius:5px;font-size:12px}.buy-row{display:flex;gap:5px;width:100%;margin-top:5px}.buy-row button{flex:1}button:disabled{opacity:.45;cursor:not-allowed}.depot-row,.animal-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid #e3d8b8;padding:10px 0}.depot-row .art-icon,.animal-row .art-icon{width:48px;height:52px}.depot-row strong{margin-left:auto}.depot-row button,.animal-row button{margin-left:auto}.animal-row .copy{display:grid;gap:3px;flex:1}.animal-row small{font-size:11px;color:#9b865b}.modal-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}.modal-actions button{flex:1}.danger{background:#d49576;border-color:#b37958}.notice{padding:12px;background:#efe9ce;border-radius:8px;color:#88774e;font-size:12px}.instructions{padding-left:20px}.instructions li{margin-bottom:10px}.event{padding:10px 0;border-bottom:1px solid #e4d8b7}.event small{display:block;color:#a08e66;font-size:10px}.search-row{display:flex;gap:8px;margin-bottom:15px}.search-row input{padding:9px;border-radius:6px;font-size:12px}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,15px);background:#ffffef;color:#627e37;border:2px solid #85a250;padding:12px 22px;border-radius:10px;box-shadow:0 5px 25px #1f341e30;z-index:20;opacity:0;pointer-events:none;transition:.2s;max-width:calc(100% - 32px);font-size:13px}#toast.show{opacity:1;transform:translate(-50%,0)}#toast.bad{color:#a45c3e;border-color:#bc8868}.zoomed .scene-wrap{width:1400px}.zoomed .scene-viewport{max-height:75vh}.modal-crop{width:105px;height:110px;margin:0 auto 15px}.loading-panel{padding:24px;border:1px solid #d8b59a;background:#fff0dd;border-radius:8px}.loading-panel button{margin-top:10px}.farm-actor{cursor:pointer}.farm-actor:focus{outline:3px solid #ffe293}.flower-deco{pointer-events:none}@media(min-width:1400px){.page-shell{margin-top:32px}}@media(max-width:800px){.page-shell{width:calc(100% - 16px);margin:8px auto}.page-heading{gap:10px;margin-bottom:7px}.brand{font-size:24px}.brand-flower{font-size:29px}.tagline{display:none}.page-heading nav{gap:8px}.hud{height:auto;min-height:80px;padding:9px;gap:8px;flex-wrap:wrap}.player{min-width:195px}.player-copy{width:110px}.avatar{width:41px;height:45px}.balances{margin-left:auto;min-width:83px}.farm-nav{width:100%;justify-content:space-around;border-top:1px solid #d7c895;padding-top:5px;gap:4px}.farm-nav button{display:flex;align-items:center;gap:5px;font-size:9px}.farm-nav i{width:25px;height:27px}.scene-wrap{min-width:760px}.scene-viewport{max-height:72vh}.scene-wrap .toolbar{bottom:12px}.neighbor-heading small{display:none}.neighbors{padding:10px}.page-footer span:first-child{display:none}.shop-grid,.seed-grid{grid-template-columns:repeat(2,1fr)}.auth-shell{grid-template-columns:1fr}.hero-card{display:none}.auth-card{padding:24px}.toolbar button{width:58px;height:61px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
