:root{--ink:#2b482e;--ink-soft:#60765c;--leaf:#367f43;--grass:#7fbd67;--deep:#24633c;--cream:#fffaf0;--paper:#fffef9;--line:#e5e7d2;--gold:#cf7e21;--shadow:0 5px 0 #c6d6af,0 12px 28px #446d3930;font-family:Trebuchet MS,Tahoma,Arial,sans-serif;color:var(--ink)}
*{box-sizing:border-box}html{min-width:320px;background:#e5efcd}body{margin:0;min-height:100vh;background:radial-gradient(ellipse 850px 300px at 20% 0%,#f8f7db,transparent),linear-gradient(#d4edb1,#ebf0d6 45%,#edf2dc);font-size:14px}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,canvas:focus-visible,.scene-scroll:focus-visible,input:focus-visible{outline:3px solid #e8a72c;outline-offset:3px}.hidden{display:none!important}.app{width:min(1670px,100%);margin:auto;padding:14px 18px 10px}.panel{border:2px solid #e8dfb7;border-radius:16px;background:var(--paper);box-shadow:0 3px 0 #d9e0bb,0 7px 18px #658d5530}.topbar{min-height:88px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:4px 7px 15px}.brand{display:flex;align-items:center;gap:11px}.brand-mark{display:grid;place-items:center;width:60px;height:60px;border:3px solid #fff1b0;border-radius:18px;box-shadow:0 4px 0 #9d863f;background:linear-gradient(140deg,#74be67,#2d9159);font-size:36px;transform:rotate(-4deg)}.brand strong{font-family:Trebuchet MS,Tahoma,sans-serif;color:#2f743e;font-size:clamp(21px,2vw,29px);font-weight:900;letter-spacing:-1px;line-height:1.2;text-shadow:1px 2px 0 #fff}.brand strong em{font-style:normal;color:#d48e20}.brand small{display:block;margin-top:4px;color:#53754a;font-size:12px;font-weight:700;letter-spacing:.6px}.topstats{display:flex;align-items:center;gap:13px;flex-wrap:wrap}.stat-gold{display:flex;align-items:center;gap:6px;padding:10px 14px;border:2px solid #f6d581;border-radius:24px;background:linear-gradient(#fff8d7,#ffedb0);color:#8e5b12;box-shadow:0 3px 0 #dfbf73}.stat-gold span{font-size:23px}.stat-gold b{font-size:20px}.stat-gold small{font-weight:700}.stat-level{display:flex;align-items:center;gap:9px;min-width:175px}.level-pill{border-radius:10px;background:#76b64d;color:#fff;border:3px solid #e8f5ca;text-shadow:0 1px #44782f;padding:9px 7px;font-size:14px;font-weight:800}.level-meta{min-width:106px}.level-meta strong{display:block;font-size:13px;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.xp-track{height:10px;border-radius:12px;background:#c5d9b8;border:1px solid #a6c69b;overflow:hidden;margin-top:8px}.xp-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#f2b43b,#ffdd61);border-radius:12px;transition:width .2s}.profile-btn{border:2px solid #d5dcb8;border-radius:12px;background:#fffdf5;color:#547548;font-weight:800;padding:10px 12px;min-height:44px}.noticebar{margin:0 0 13px;background:linear-gradient(90deg,#3e984e,#5ca85a);border-radius:13px;padding:10px 16px;min-height:42px;display:flex;align-items:center;gap:12px;color:#fff;box-shadow:0 4px 0 #2d7540;font-weight:700}.blink-sun{font-size:22px}.noticebar>span:nth-child(2){flex:1}.online-pill{padding:6px 10px;border-radius:20px;background:#e0f5ce;color:#2e7138;font-size:11px;white-space:nowrap}.main-shell{display:grid;grid-template-columns:96px minmax(0,1fr) 285px;gap:13px;align-items:start}.tools{padding:10px 8px;display:flex;flex-direction:column;gap:9px;align-items:stretch;background:#faf6de}.tools-heading{text-align:center;font-size:11px;letter-spacing:1.4px;color:#8b7545;font-weight:900;margin:2px 0 4px}.tool{border:2px solid #e2dbc3;border-radius:13px;min-height:75px;background:linear-gradient(#fffef5,#f5f0d9);color:#497344;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:0 3px 0 #cfddba;transition:transform .1s}.tool span{font-size:30px}.tool small{font-size:11px;font-weight:800}.tool:hover{transform:translateY(-2px)}.tool.active{border-color:#83bb54;background:linear-gradient(#e9ffce,#cdf0a8);box-shadow:0 3px 0 #75ad4d;color:#2e6735}.stage-col{min-width:0;display:flex;flex-direction:column;gap:12px}.stage-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 15px;min-height:66px;background:linear-gradient(90deg,#fffef6,#f2f8dc)}.stage-title{display:flex;align-items:center;gap:10px}.stage-sun{font-size:28px}.stage-title b{font-size:18px}.stage-title small{display:block;font-size:11px;color:#738b65;margin-top:4px}.stage-actions{display:flex;align-items:center;gap:7px}.icon-btn,.small-btn{display:inline-flex;align-items:center;justify-content:center;border:2px solid #dfdfbe;background:#fff;min-width:42px;min-height:42px;border-radius:11px;color:#4b7043;font-weight:900}.small-btn{padding:5px 9px}.scene-wrapper{position:relative;overflow:hidden;padding:6px;background:linear-gradient(#a7d3e1,#92cdb0);border:3px solid #b9d3a9;border-radius:20px}.scene-scroll{width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b4d08d #edf5db;border-radius:13px}.scene-scroll canvas{display:block;width:100%;height:auto;min-width:690px;touch-action:pan-x pan-y;cursor:pointer;user-select:none}.scene-corner{position:absolute;top:17px;left:18px;padding:7px 13px;color:#326f39;background:#fff9d9ed;border:2px solid #e9daa5;border-radius:18px;font-size:12px;font-weight:900;pointer-events:none;box-shadow:0 2px 4px #143b2520}.scene-tip{position:absolute;left:50%;bottom:19px;transform:translateX(-50%);max-width:calc(100% - 22px);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;background:#fffaf1e8;color:#547449;border:1px solid #fff;border-radius:22px;padding:9px 16px;pointer-events:none;box-shadow:0 3px 13px #2a604b35;font-size:12px;font-weight:800;text-align:center}.scene-mobile-tip{display:none;position:absolute;top:18px;right:15px;background:#ffffffdd;padding:5px 8px;border-radius:12px;font-size:10px;color:#3d6944;pointer-events:none}.quick-bar{padding:10px 11px 11px}.quick-head,.side-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.quick-head{padding:2px 4px 10px;color:#668149;font-size:12px;letter-spacing:.4px}.inline-link{background:none;border:0;padding:7px;color:#398645;font-weight:900;white-space:nowrap}.inline-link span{font-size:18px}.seed-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(88px,1fr);overflow-x:auto;gap:9px;padding:2px 2px 6px;scrollbar-width:thin}.seed-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:88px;min-height:91px;border:2px solid #e6e5d5;background:#fffcf1;border-radius:13px;padding:9px 5px;color:#466743}.seed-card.selected{border-color:#6eaf52;background:#ecffdf;box-shadow:0 0 0 2px #c3eeb3}.seed-card .seed-icon{font-size:32px;line-height:1.1}.seed-card strong{font-size:12px;white-space:nowrap}.seed-card small{font-size:11px;color:#829272}.seed-card .seed-count{position:absolute;right:-4px;top:-5px;border:2px solid #fff;background:#d09a39;color:#fff;border-radius:10px;min-width:26px;font-weight:900;padding:1px 4px;font-size:11px}.farm-menu{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.menu-btn{min-height:77px;border-radius:15px;border:2px solid #d0dfba;background:linear-gradient(#fffdf4,#f3f7de);box-shadow:0 3px 0 #c3d5a6;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;color:#3a7543;font-size:21px}.menu-btn b{font-size:12px}.menu-btn small{font-size:10px;color:#77946a}.menu-btn:hover,.small-btn:hover,.profile-btn:hover,.inline-link:hover{filter:brightness(.97)}.sidebar{display:flex;flex-direction:column;gap:12px}.sidebar .panel{padding:14px 14px 13px}.side-heading{font-size:14px;font-weight:900;color:#4e7747;border-bottom:1px dashed #d7dabb;padding-bottom:12px}.task-day{font-size:10px;color:#9a9a75}.task{display:flex;align-items:center;gap:9px;padding:11px 0;border-bottom:1px solid #f2efe4}.task:last-child{border-bottom:0;padding-bottom:1px}.task-icon{font-size:22px}.task-info{flex:1;min-width:0}.task-info b{display:block;font-size:12px}.task-info small{font-size:10px;color:#809078}.task-progress{height:6px;background:#e6e8d6;border-radius:9px;overflow:hidden;margin-top:6px}.task-progress i{display:block;height:100%;border-radius:9px;background:#79bf5c}.task-reward{border:0;padding:7px 9px;min-height:36px;min-width:46px;border-radius:10px;background:#f6e7bc;color:#996617;font-weight:900;font-size:11px}.task-reward.claim{background:#76b95c;color:#fff}.task-reward:disabled{opacity:.55;cursor:default}.dog-row{display:flex;align-items:center;gap:11px;margin-top:14px}.dog-portrait{font-size:44px;padding:9px;background:#f0f5d7;border-radius:18px}.dog-info{flex:1;min-width:0}.dog-info b,.dog-info small{display:block}.dog-info b{font-size:12px}.dog-info small{font-size:10px;color:#768b69;margin-top:3px}.dog-feed{margin-top:8px;border-radius:8px;border:1px solid #edcf8a;background:#fff2cc;padding:7px 9px;font-size:11px;font-weight:900;color:#936123;min-height:36px}.neighbor-mini{display:flex;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #f2f1e2}.neighbor-mini:last-child{border:0}.neighbor-mini .avatar{display:grid;place-items:center;width:37px;height:37px;background:#eef5d2;border:2px solid #dce9bf;border-radius:13px;font-size:20px}.neighbor-mini strong{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.neighbor-mini button{border-radius:8px;border:1px solid #d5e6bf;background:#edf8e0;color:#438347;padding:7px;font-size:11px;font-weight:900;min-height:36px}.nostalgia-panel{background:#fff7df!important;border-color:#e4d7ac!important}.old-sign{text-align:center;color:#a57a24;font-size:13px;font-weight:900;letter-spacing:1px}.nostalgia-panel p{font-family:Georgia,serif;font-style:italic;color:#8e702e;font-size:13px;line-height:1.5;text-align:center}.nostalgia-panel small{font-size:10px;line-height:1.4;color:#92805b;display:block}.footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:22px 8px 8px;color:#6f8b5a;font-weight:700;font-size:10px}.game-dialog{max-width:760px;width:min(calc(100vw - 24px),760px);max-height:90dvh;padding:0;border:3px solid #fff5d4;border-radius:22px;box-shadow:0 18px 0 #394b2970,0 26px 70px #10231791;overflow:auto;background:#fffcf3;color:var(--ink)}.game-dialog::backdrop{background:#142b21a8;backdrop-filter:blur(3px)}.dialog-header{background:linear-gradient(120deg,#4d9c4c,#80ba5d);min-height:82px;display:flex;align-items:center;justify-content:space-between;padding:16px 18px;color:white;border-bottom:5px solid #e3e9a6}.dialog-header>div{display:flex;align-items:center;gap:12px}.dialog-header span{font-size:32px}.dialog-header h2{margin:0;font-size:24px;text-shadow:0 2px 0 #3c743e}.close-btn{border:2px solid #fff9e0;background:#fff3d0;border-radius:12px;color:#64773b;font-size:29px;min-width:44px;min-height:44px;line-height:1}.dialog-content,.auth-body{padding:17px;min-height:165px}.dialog-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:15px}.tab-btn{min-height:40px;padding:8px 13px;border:1px solid #dce8c9;border-radius:12px;background:#eff5e8;color:#57794d;font-weight:900}.tab-btn.active{background:#3e914f;border-color:#3e914f;color:white}.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.shop-item{border:2px solid #e4e6d2;background:white;border-radius:15px;padding:12px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-height:177px}.shop-icon{font-size:39px;line-height:1.15}.shop-item strong{font-size:13px}.shop-item small{font-size:11px;color:#859477;line-height:1.4}.shop-item button{margin-top:auto;width:100%;border:0;border-radius:10px;background:#e9ad40;color:#fff;font-weight:900;padding:9px;min-height:40px;box-shadow:0 3px 0 #ba882a}.shop-item button:hover{filter:brightness(.98)}.shop-item button:disabled{opacity:.58;box-shadow:none}.stock-badge{font-size:11px;color:#60884c;background:#edf7df;border-radius:20px;padding:4px 8px}.barn-list,.animal-list,.friend-list{display:flex;flex-direction:column;gap:10px}.barn-item,.animal-item,.friend-item{background:white;border:1px solid #e3e8d4;border-radius:13px;padding:12px;display:flex;align-items:center;gap:12px;min-height:76px}.barn-item-icon,.animal-item-icon,.friend-avatar{font-size:31px;display:grid;place-items:center;min-width:49px;width:49px;height:49px;border-radius:11px;background:#f3f5e7}.barn-item-info,.animal-item-info,.friend-item-info{flex:1;min-width:0}.barn-item-info strong,.animal-item-info strong,.friend-item-info strong{display:block}.barn-item-info small,.animal-item-info small,.friend-item-info small{display:block;color:#83937b;margin-top:4px}.dialog-action{min-height:40px;padding:8px 12px;border:0;border-radius:10px;background:#70a84a;color:white;font-weight:900}.dialog-action:disabled{background:#b2c5a1;color:#f9fbf0}.dialog-action.secondary{background:#e9b45c;color:#634914}.dialog-note{background:#f7f4df;border:1px solid #eadfbf;padding:12px;border-radius:12px;color:#6e7756;line-height:1.5;margin:12px 0}.muted{text-align:center;padding:25px 12px;color:#73866e;line-height:1.6}.barn-total{border:2px dashed #e4d5a0;background:#fff8df;padding:12px;border-radius:12px;margin-bottom:13px;font-weight:800}.auth-body label{display:block;font-weight:900;font-size:12px;margin:15px 0 6px}.auth-body input{display:block;width:100%;padding:12px;border:2px solid #d8e6bf;border-radius:11px;background:#fff;min-height:44px}.auth-body p{line-height:1.5}.auth-body .main-action{margin-top:16px;width:100%;background:#3d954c;border:0;border-radius:12px;color:#fff;padding:12px;min-height:44px;font-weight:900}.auth-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}.auth-actions button{border:1px solid #a4c88f;background:#eef8e6;color:#387e46;padding:10px 13px;min-height:44px;border-radius:10px;font-weight:900}.auth-message{font-weight:800;color:#b0573c;min-height:20px}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,160%);background:#2f7347;color:#fff;font-weight:800;border:2px solid #c7eaa7;padding:14px 21px;border-radius:18px;box-shadow:0 10px 28px #13392355;z-index:50;max-width:min(440px,90vw);text-align:center;opacity:0;transition:transform .22s,opacity .22s;pointer-events:none}.toast.show{transform:translate(-50%,0);opacity:1}.toast.error{background:#a74738;border-color:#fad1a6}
@media(max-width:1270px){.main-shell{grid-template-columns:82px minmax(0,1fr) 258px;gap:10px}.tools{padding:8px 5px}.tool{min-height:69px}.sidebar .panel{padding:11px}.topbar{gap:6px}.brand strong{font-size:22px}.brand-mark{width:51px;height:51px;font-size:29px}.stat-level{min-width:155px}.scene-scroll canvas{min-width:770px}}
@media(max-width:1020px){.main-shell{grid-template-columns:80px minmax(0,1fr)}.sidebar{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.scene-scroll canvas{min-width:830px}.nostalgia-panel{display:none}}
@media(max-width:640px){.app{padding:8px 8px 12px}.topbar{padding:6px 5px 10px;align-items:flex-start;flex-direction:column;gap:12px}.brand-mark{height:47px;width:47px;border-radius:13px;font-size:28px}.brand strong{font-size:21px}.brand small{font-size:10px}.topstats{width:100%;justify-content:space-between;gap:5px}.stat-gold{padding:7px 9px;border-width:1px}.stat-gold span{font-size:17px}.stat-gold b{font-size:17px}.stat-level{min-width:119px;flex:1;justify-content:center}.level-pill{padding:7px 5px}.level-meta strong{max-width:130px;font-size:11px}.profile-btn{padding:8px 9px}.profile-btn span{display:none}.noticebar{font-size:11px;padding:10px;gap:6px;flex-wrap:wrap}.noticebar>span:nth-child(2){flex-basis:70%}.online-pill{margin-left:auto;font-size:10px}.main-shell{display:flex;flex-direction:column;gap:10px}.tools{width:100%;flex-direction:row;overflow-x:auto;padding:7px;gap:6px;scrollbar-width:thin}.tools-heading{display:none}.tool{flex:0 0 72px;min-height:66px;border-radius:11px}.tool span{font-size:24px}.tool small{font-size:10px}.stage-col{width:100%}.stage-bar{min-height:58px;padding:6px 9px}.stage-title b{font-size:14px}.stage-title small{font-size:10px}.stage-sun{font-size:23px}.scene-wrapper{padding:4px}.scene-scroll canvas{min-width:740px}.scene-corner{top:12px;left:10px;font-size:10px;padding:5px 8px}.scene-tip{font-size:10px;padding:7px 9px;bottom:10px}.scene-mobile-tip{display:block}.seed-list{grid-auto-columns:84px}.farm-menu{gap:6px}.menu-btn{min-height:70px;font-size:19px;padding:3px}.menu-btn b{font-size:10px}.menu-btn small{display:none}.sidebar{display:flex;flex-direction:column;width:100%}.sidebar .panel{width:100%}.friends-panel{display:none}.footer{flex-direction:column;align-items:flex-start;line-height:1.5}.dialog-header{min-height:67px}.dialog-header h2{font-size:18px}.dialog-header span{font-size:25px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-dialog{width:calc(100vw - 12px);max-height:95dvh;border-width:2px}.dialog-content,.auth-body{padding:11px}.shop-item{min-height:165px;padding:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
