:root{--cream:#fff5d6;--cream2:#f5d795;--brown:#6e3b19;--brown2:#3f230e;--green:#5cad44;--shadow:0 8px 22px #1b280d4f;--safe-t:max(env(safe-area-inset-top),10px);--safe-r:max(env(safe-area-inset-right),10px);--safe-b:max(env(safe-area-inset-bottom),10px);--safe-l:max(env(safe-area-inset-left),10px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;font-family:Inter,ui-rounded,"SF Pro Rounded",system-ui,-apple-system,sans-serif;background:#517e45;color:#3d2411;touch-action:none}button{font:inherit;user-select:none}#gameCanvas{position:fixed;inset:0;width:100%;height:100%;outline:none;display:block;background:linear-gradient(#a9d986,#76b25c)}
#loadingScreen{position:fixed;z-index:1000;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:radial-gradient(circle at 50% 38%,#91cf6b,#2d653d 72%);color:white;text-shadow:0 2px 7px #173819;transition:.35s opacity}.loaded #loadingScreen{opacity:0;pointer-events:none}#loadingScreen img{width:min(320px,54vw);filter:drop-shadow(0 9px 13px #102c1d88)}#loadingScreen small{opacity:.8}.loader{width:54px;height:54px;border:7px solid #ffffff4d;border-top-color:#fff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.hud{position:fixed;z-index:20;pointer-events:none}.hud button,.hud .resource,.hud .level-card,.panel{pointer-events:auto}.top-hud{top:var(--safe-t);left:var(--safe-l);right:var(--safe-r);display:flex;align-items:center;gap:10px;height:72px}.brand{width:126px;display:flex;align-items:center;justify-content:center}.brand img{max-width:122px;max-height:68px;filter:drop-shadow(0 4px 4px #18371175)}
.resource{height:54px;min-width:142px;padding:5px 7px 5px 12px;border:4px solid #815522;border-radius:18px;background:linear-gradient(#fff7d6,#f6d581);box-shadow:var(--shadow),inset 0 2px #fff;display:flex;align-items:center;gap:9px;font-size:20px}.resource .ico{font-size:25px}.resource button{margin-left:auto;width:37px;height:37px;border:0;border-radius:10px;background:linear-gradient(#78d750,#43a82e);color:#fff;font-size:28px;font-weight:900;box-shadow:inset 0 -4px #308321}.resource.gem{min-width:125px}
.level-card{height:62px;min-width:360px;max-width:460px;margin-left:auto;border:4px solid #815522;border-radius:22px;background:linear-gradient(#fff5d9,#e9c66f);display:flex;align-items:center;padding:5px 12px 5px 5px;box-shadow:var(--shadow),inset 0 2px #fff}.avatar{width:47px;height:47px;display:grid;place-items:center;border-radius:50%;font-size:27px;background:#8ed1ec;border:3px solid #fff6d5}.level-round{width:51px;text-align:center}.level-round small{font-size:10px;font-weight:900;display:block}.level-round b{font-size:23px}.level-body{flex:1;display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center}.level-body strong{font-size:18px}.level-body small{font-size:10px;font-weight:800}.xp{height:11px;border:2px solid #6b3d17;border-radius:9px;background:#7d5729;overflow:hidden;grid-column:1/3}.xp i{display:block;width:28%;height:100%;background:linear-gradient(90deg,#55d73e,#a8e85c);box-shadow:inset 0 2px #d9ffbc}
.top-actions{display:flex;gap:8px}.top-actions button{height:51px;border:4px solid #815522;background:linear-gradient(#fff5d9,#e7c46d);color:#4c2a11;box-shadow:var(--shadow);font-weight:900}.top-actions .pill{border-radius:17px;padding:0 15px}.top-actions .round{width:52px;border-radius:17px;font-size:22px}
.side{top:106px;bottom:118px;display:flex;flex-direction:column;justify-content:flex-start;gap:8px}.side-left{left:var(--safe-l)}.side-right{right:var(--safe-r)}.side button{position:relative;width:86px;min-height:76px;border:4px solid #7b4c20;border-radius:20px;background:linear-gradient(#fff8dc,#eccb7a);box-shadow:var(--shadow),inset 0 2px #fff;color:#4a2a12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.side button span{font-size:29px;line-height:1}.side button b{font-size:12px}.side button em{position:absolute;right:-5px;top:-7px;background:#e33b29;color:#fff;border:3px solid white;width:27px;height:27px;border-radius:50%;font-style:normal;font-weight:900;display:grid;place-items:center}
.bottom-left{left:var(--safe-l);bottom:var(--safe-b);display:flex;gap:8px}.bottom-left button,.camera-controls button{border:4px solid #5f3618;background:linear-gradient(#8b5525,#633713);color:#fff7df;border-radius:17px;box-shadow:var(--shadow),inset 0 2px #ad713a;font-weight:900}.bottom-left button{width:113px;height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:21px}.bottom-left span{font-size:11px;margin-top:3px}
.bottom-toolbar{left:50%;transform:translateX(-50%);bottom:var(--safe-b);height:76px;display:flex;padding:5px;border:5px solid #6c411d;border-radius:20px;background:#8a5425;box-shadow:var(--shadow);max-width:min(760px,58vw)}.bottom-toolbar button{min-width:78px;height:58px;border:1px solid #c39350;border-right-width:0;background:linear-gradient(#fff9df,#edc979);color:#4b2d15;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.bottom-toolbar button:first-child{border-radius:12px 0 0 12px}.bottom-toolbar button:last-child{border-radius:0 12px 12px 0;border-right-width:1px}.bottom-toolbar button.active{background:linear-gradient(#9ce982,#58bd47);box-shadow:inset 0 0 0 3px #3c9c31}.bottom-toolbar span{font-size:23px}.bottom-toolbar b{font-size:10px}
.camera-controls{right:var(--safe-r);bottom:var(--safe-b);height:76px;display:flex;align-items:center;gap:5px;padding:7px;border-radius:18px;background:#75441e;box-shadow:var(--shadow)}.camera-controls button{height:58px;min-width:50px;font-size:24px}.camera-controls button:first-child{width:80px;display:flex;flex-direction:column;align-items:center;justify-content:center}.camera-controls button:first-child span{font-size:9px}.camera-controls strong{color:white;min-width:48px;text-align:center;font-size:12px}
.panel{position:fixed;z-index:70;background:linear-gradient(#fff8e5,#f0d38e);border:5px solid #74451d;border-radius:24px;box-shadow:0 18px 50px #1c1d125e,inset 0 2px white}.panel.hidden,.hidden{display:none!important}.catalog{left:50%;bottom:100px;transform:translateX(-50%);width:min(920px,78vw);max-height:47vh;padding:14px}.panel-head{display:flex;align-items:center;justify-content:space-between}.panel-head small{font-size:10px;font-weight:900;color:#8b632f}.panel-head h2{margin:0;font-size:23px}.close{width:38px;height:38px;border:0;border-radius:11px;background:#814a20;color:white;font-size:26px}.tabs{display:flex;gap:6px;overflow:auto;margin:10px 0}.tabs button{border:2px solid #9c6d31;border-radius:12px;background:#ffe7a8;padding:8px 13px;font-weight:900;white-space:nowrap}.tabs button.active{background:#65c64e;color:white;border-color:#347d2d}.catalog-grid{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:8px;max-height:260px;overflow:auto;padding:2px}.catalog-card{border:2px solid #bb8c4c;border-radius:15px;background:linear-gradient(#fffef2,#f6d58a);padding:8px;min-height:106px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;box-shadow:inset 0 2px white}.catalog-card:hover,.catalog-card:active{transform:translateY(-1px);background:#fff5bd}.catalog-card .big{font-size:35px}.catalog-card b{font-size:11px}.catalog-card small{font-size:10px;color:#76562f}.catalog-tip{font-size:11px;margin-top:8px;text-align:center;color:#6e512c}
.object-panel{right:106px;top:105px;width:250px;padding:13px}.selected-preview{font-size:52px;text-align:center;padding:6px}.object-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.object-actions button{border:2px solid #986832;border-radius:13px;background:#fff1c6;min-height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:21px}.object-actions button span{font-size:10px;font-weight:900}.object-actions .danger{background:#ffd9c5;color:#8a2c1c}
.toast{position:fixed;z-index:90;left:50%;top:88px;transform:translate(-50%,-20px);opacity:0;padding:10px 17px;background:#3d2b18e8;color:white;border:2px solid #ffffff99;border-radius:18px;font-weight:800;transition:.25s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}.mode-badge{position:fixed;z-index:50;left:50%;top:88px;transform:translateX(-50%);background:#4ea93fe8;color:white;border:3px solid #fff;border-radius:18px;padding:9px 17px;font-weight:900;box-shadow:var(--shadow)}
.engine-error{position:fixed;z-index:900;inset:20%;display:grid;place-content:center;text-align:center;background:#fff0cc;border:6px solid #7c4b22;border-radius:30px;padding:40px;box-shadow:0 30px 80px #0008}
@media(max-width:1180px){.brand{width:90px}.brand img{max-width:90px}.resource{min-width:100px;font-size:16px;height:48px}.resource.gem{min-width:90px}.level-card{min-width:295px}.top-actions .pill span{display:none}.side button{width:72px;min-height:66px}.side button span{font-size:24px}.bottom-left button{width:92px}.bottom-toolbar{max-width:56vw}.bottom-toolbar button{min-width:63px}.bottom-toolbar b{font-size:9px}.catalog-grid{grid-template-columns:repeat(5,1fr)}}
@media(max-width:900px){.resource.gem{display:none}.level-card{min-width:250px}.level-body strong{font-size:14px}.side{top:92px;gap:5px}.side button{width:63px;min-height:57px;border-width:3px;border-radius:15px}.side button b{font-size:9px}.bottom-left{display:none}.camera-controls{bottom:88px}.bottom-toolbar{max-width:none;width:calc(100% - 150px);height:68px}.bottom-toolbar button{min-width:0;flex:1;height:50px}.catalog{width:86vw}.object-panel{right:76px}.catalog-grid{grid-template-columns:repeat(4,1fr)}}
@media(pointer:coarse){button{min-height:44px}.catalog-card{min-height:118px}.side button{touch-action:manipulation}}
@media(orientation:portrait){body:after{content:"Hoforia spielt sich auf dem iPad am besten im Querformat";position:fixed;z-index:999;inset:0;display:grid;place-items:center;text-align:center;padding:25vw;background:#315f2ff2;color:white;font-size:24px;font-weight:900}}


/* v1.4 Premium 3D art pass */
.brand{position:relative}.premium-chip{position:absolute;right:-3px;bottom:-1px;background:linear-gradient(180deg,#ffef8d,#f2b92c);color:#5b3512;border:2px solid #784417;border-radius:8px;padding:2px 6px;font-size:8px;font-weight:1000;letter-spacing:.6px;box-shadow:0 3px 8px #0004}
.quality-button{position:relative;display:grid;place-items:center;padding-top:2px}.quality-button small{position:absolute;bottom:2px;left:5px;right:5px;font-size:7px;line-height:9px;color:#704514;background:#fff2b8;border-radius:5px}
.top-hud{filter:drop-shadow(0 2px 5px #21320d33)}
.resource,.level-card,.top-actions button,.side button,.panel,.bottom-toolbar,.camera-controls{backdrop-filter:saturate(1.08)}
.side button:active,.bottom-toolbar button:active,.catalog-card:active{transform:translateY(2px) scale(.985)}
.mode-badge{background:linear-gradient(180deg,#6bd34d,#3b9c32e8)}
.catalog-card{transition:transform .12s ease,filter .12s ease}.catalog-card:hover{filter:saturate(1.12)}
@media (pointer:coarse){
  .top-hud{gap:8px}.resource{border-width:3px}.side button{box-shadow:0 7px 18px #17210c55,inset 0 2px #fff}.bottom-toolbar{box-shadow:0 8px 22px #17210c55}.catalog{bottom:max(92px,calc(env(safe-area-inset-bottom) + 82px))}
}
@media (min-width:1000px) and (max-width:1400px) and (pointer:coarse){
  .top-hud{height:76px}.brand{width:102px}.brand img{max-width:100px}.resource{min-width:112px}.level-card{min-width:315px}.side{top:96px;bottom:108px}.side button{width:72px;min-height:67px}.bottom-toolbar{height:72px;max-width:62vw}.bottom-toolbar button{height:54px;min-width:66px}.camera-controls{height:72px}.camera-controls button{height:54px}.catalog{width:min(980px,82vw);max-height:51vh}.catalog-grid{grid-template-columns:repeat(5,minmax(105px,1fr));max-height:295px}.object-panel{top:96px;right:86px}
}

/* v1.5 Studio GLB art pass */
.asset-progress{width:min(320px,62vw);height:12px;border:2px solid #805021;border-radius:999px;background:#f3d89c;overflow:hidden;box-shadow:inset 0 2px 5px #6c411944;margin:4px auto 2px}.asset-progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,#69bf45,#f0c94f);transition:width .18s ease}
body[data-asset-mode="glb"] .premium-chip{background:linear-gradient(180deg,#b9f4ff,#5bc5e4);color:#164a5e;border-color:#2e788d}
body[data-asset-mode="fallback"] .premium-chip{background:linear-gradient(180deg,#ffe5a1,#e8a43a)}
.catalog-card .big{filter:drop-shadow(0 4px 4px #51330a25)}
@media (pointer:coarse){.object-actions button{min-height:72px}.catalog-card{min-height:122px}.camera-controls button{min-width:58px}.bottom-toolbar button{min-width:68px}}

/* v1.6 Animated Terrain Edition */
body[data-asset-mode="glb"] .premium-chip{background:linear-gradient(180deg,#d9ff99,#7bd15b);color:#285119;border-color:#52872c}
.top-hud{background:linear-gradient(180deg,rgba(37,83,39,.36),rgba(31,68,35,.08));border-radius:0 0 22px 22px;padding-bottom:4px}
.resource,.level-card,.side button,.bottom-toolbar,.camera-controls{box-shadow:0 8px 22px rgba(32,44,17,.30),inset 0 2px rgba(255,255,255,.85)}
.catalog-tip:after{content:" · v1.6: texturierte GLB-Assets, Höhen-Terrain & animierte Bewohner";font-weight:800;color:#527b35}
@media (min-width:1024px) and (pointer:coarse){.side button{min-height:72px}.bottom-toolbar{bottom:max(10px,env(safe-area-inset-bottom));}.camera-controls{bottom:max(10px,env(safe-area-inset-bottom));}.panel{font-size:15px}}


/* v1.7 Living Art Direction */
body[data-asset-mode="glb"] .premium-chip{background:linear-gradient(180deg,#fff2a7,#f2bf3e);color:#543515;border-color:#8b5a20;box-shadow:0 3px 10px #532e0b55}
.top-hud{background:linear-gradient(180deg,rgba(35,78,40,.48),rgba(35,78,40,.07));}
.resource,.level-card{border-color:#6d471f;background:linear-gradient(180deg,rgba(255,250,226,.97),rgba(235,204,139,.94));}
.side button,.bottom-toolbar button{transition:transform .12s ease,filter .15s ease,box-shadow .15s ease}.side button:hover,.bottom-toolbar button:hover{filter:saturate(1.08) brightness(1.03)}
.side button:active,.bottom-toolbar button:active{box-shadow:0 3px 9px rgba(28,33,12,.35),inset 0 2px rgba(255,255,255,.9)}
.catalog{background:linear-gradient(180deg,rgba(255,250,229,.98),rgba(236,205,139,.98));}
.catalog-card{background:radial-gradient(circle at 50% 25%,#fffdf0,#f1cf82);border-color:#a77636;box-shadow:0 4px 11px #5d3b1328,inset 0 2px #fff}
.catalog-tip:after{content:" · v1.7: Art-Rigs, Tierzustände, Pflanzenwind, neue 3D-Requisiten & Environment-Reflections";font-weight:900;color:#4b7535}
@media (min-width:1024px) and (pointer:coarse){.side button{width:76px;min-height:70px}.bottom-toolbar{max-width:64vw}.bottom-toolbar button{min-width:70px}.resource{height:52px}.level-card{height:58px}}

/* v1.8 Multi-Device Edition ------------------------------------------------ */
:root{--phone-dock-h:74px;--phone-top-h:58px}
body:after{display:none!important;content:none!important}
.device-badge{position:fixed;z-index:35;right:calc(var(--safe-r) + 2px);top:calc(var(--safe-t) + 78px);padding:5px 9px;border:2px solid #fff8d0;border-radius:999px;background:#315d38cc;color:#fff7d5;font-size:9px;font-weight:1000;letter-spacing:.8px;box-shadow:0 4px 12px #17210d55;pointer-events:none}
.mobile-dock,.mobile-menu{display:none}

/* Desktop: full information density, mouse friendly */
body.device-desktop .top-hud{max-width:1700px;margin:auto}
body.device-desktop .side button{cursor:pointer}
body.device-desktop .catalog-card:hover{transform:translateY(-3px) scale(1.015);box-shadow:0 8px 20px #4b321533,inset 0 2px #fff}
body.device-desktop .bottom-toolbar button:hover{transform:translateY(-2px)}
body.device-desktop .device-badge{display:block}

/* Tablet / iPad: larger touch targets, more world visible than phone */
body.device-tablet .device-badge{display:block;top:calc(var(--safe-t) + 72px)}
body.device-tablet .top-hud{height:66px;gap:7px}
body.device-tablet .brand{width:100px}.device-tablet .brand img{max-width:98px}
body.device-tablet .resource{height:50px;min-width:106px;padding-left:9px;font-size:16px;border-width:3px}
body.device-tablet .resource.gem{min-width:94px}
body.device-tablet .resource button{width:34px;height:34px;font-size:23px}
body.device-tablet .level-card{height:56px;min-width:292px;max-width:360px;border-width:3px}
body.device-tablet .avatar{width:42px;height:42px;font-size:23px}.device-tablet .level-round{width:45px}.device-tablet .level-body strong{font-size:15px}
body.device-tablet .top-actions button{height:48px;border-width:3px}.device-tablet .top-actions .round{width:48px}
body.device-tablet .side{top:88px;bottom:98px;gap:6px}
body.device-tablet .side button{width:70px;min-height:64px;border-width:3px;border-radius:17px}
body.device-tablet .side button span{font-size:25px}.device-tablet .side button b{font-size:9px}
body.device-tablet .bottom-left button{height:62px;width:92px}
body.device-tablet .bottom-toolbar{height:68px;max-width:62vw;border-width:4px;padding:4px}
body.device-tablet .bottom-toolbar button{height:52px;min-width:64px}
body.device-tablet .camera-controls{height:68px}.device-tablet .camera-controls button{height:51px}
body.device-tablet .catalog{bottom:86px;width:min(940px,84vw);max-height:52vh}
body.device-tablet .catalog-grid{grid-template-columns:repeat(5,minmax(96px,1fr));max-height:290px}
body.device-tablet .object-panel{top:88px;right:82px}

/* Phone base: game-first UI. Portrait and landscape are both supported. */
body.device-phone .device-badge{top:calc(var(--safe-t) + 56px);right:var(--safe-r);font-size:8px;padding:3px 7px}
body.device-phone .top-hud{height:var(--phone-top-h);top:var(--safe-t);left:var(--safe-l);right:var(--safe-r);gap:4px;align-items:flex-start;background:linear-gradient(180deg,rgba(31,72,36,.62),rgba(31,72,36,.06));border-radius:0 0 15px 15px}
body.device-phone .brand{width:62px;height:52px}.device-phone .brand img{max-width:60px;max-height:48px}.device-phone .premium-chip{font-size:5px;padding:1px 3px;border-width:1px}
body.device-phone .resource{height:39px;min-width:76px;border-width:2px;border-radius:12px;padding:3px 4px 3px 7px;gap:4px;font-size:13px;box-shadow:0 4px 11px #18220c44,inset 0 1px #fff}
body.device-phone .resource .ico{font-size:17px}.device-phone .resource button{display:none}.device-phone .resource.gem{min-width:58px}
body.device-phone .level-card{height:42px;min-width:0;max-width:none;flex:1;margin-left:0;border-width:2px;border-radius:13px;padding:3px 6px 3px 3px;overflow:hidden}
body.device-phone .avatar{width:32px;height:32px;font-size:18px;border-width:2px}.device-phone .level-round{width:34px}.device-phone .level-round small{font-size:7px}.device-phone .level-round b{font-size:15px}.device-phone .level-body{gap:0 4px}.device-phone .level-body strong{font-size:11px;white-space:nowrap}.device-phone .level-body small{font-size:7px}.device-phone .xp{height:7px;border-width:1px}
body.device-phone .top-actions{gap:4px}.device-phone .top-actions .pill,.device-phone #gridBtn{display:none}.device-phone .top-actions .round{width:39px;height:39px;border-width:2px;border-radius:12px;font-size:17px}.device-phone .quality-button small{font-size:5px;line-height:6px;bottom:1px}
body.device-phone .side,body.device-phone .bottom-left,body.device-phone .bottom-toolbar{display:none!important}
body.device-phone .camera-controls{right:var(--safe-r);bottom:calc(var(--safe-b) + var(--phone-dock-h) + 8px);height:auto;padding:4px;gap:3px;border-width:0;border-radius:14px;background:#633a1cd9}
body.device-phone .camera-controls button{width:43px;min-width:43px;height:43px;border-width:2px;border-radius:11px;font-size:20px}.device-phone .camera-controls button:first-child{width:43px}.device-phone .camera-controls button:first-child span{display:none}.device-phone .camera-controls strong{display:none}
body.device-phone .mobile-dock{display:flex;left:var(--safe-l);right:var(--safe-r);bottom:var(--safe-b);height:var(--phone-dock-h);padding:5px;border:4px solid #67401c;border-radius:18px;background:#7e4d22;box-shadow:0 8px 24px #1b220c66;pointer-events:auto;z-index:45;gap:3px}
body.device-phone .mobile-dock button{flex:1;min-width:0;border:1px solid #be8e49;border-radius:10px;background:linear-gradient(#fff7d7,#ecca78);color:#472b14;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-weight:900}
body.device-phone .mobile-dock button.active{background:linear-gradient(#a7ee8e,#5ec34e);box-shadow:inset 0 0 0 2px #398f31}
body.device-phone .mobile-dock span{font-size:21px;line-height:1}.device-phone .mobile-dock b{font-size:8px}
body.device-phone .mobile-menu{display:block;position:fixed;z-index:75;left:var(--safe-l);right:var(--safe-r);bottom:calc(var(--safe-b) + var(--phone-dock-h) + 7px);max-height:min(64dvh,520px);padding:10px;border:4px solid #70451f;border-radius:20px;background:linear-gradient(#fff8e6,#efd18b);box-shadow:0 18px 55px #10150999;overflow:auto;transform-origin:50% 100%}
body.device-phone .mobile-menu.hidden{display:none!important}
.mobile-menu-head{display:flex;align-items:center;justify-content:space-between;padding:1px 2px 8px 4px}.mobile-menu-head strong{font-size:16px}.mobile-menu-head button{width:36px;height:36px;border:0;border-radius:10px;background:#78451f;color:#fff;font-size:25px}
.mobile-menu-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.mobile-menu-grid button{min-height:70px;border:2px solid #ae7b3e;border-radius:13px;background:linear-gradient(#fffcee,#f1d188);color:#4b2d16;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.mobile-menu-grid span{font-size:24px}.mobile-menu-grid b{font-size:8px}
body.device-phone .catalog{left:var(--safe-l);right:var(--safe-r);bottom:calc(var(--safe-b) + var(--phone-dock-h) + 7px);transform:none;width:auto;max-height:min(67dvh,570px);padding:10px;border-width:4px;border-radius:20px}
body.device-phone .panel-head h2{font-size:18px}.device-phone .panel-head small{font-size:8px}.device-phone .tabs{margin:7px 0;gap:4px}.device-phone .tabs button{padding:7px 10px;border-radius:10px;font-size:10px}
body.device-phone .catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;max-height:42dvh}.device-phone .catalog-card{min-height:82px;padding:5px;border-radius:12px}.device-phone .catalog-card .big{font-size:27px}.device-phone .catalog-card b{font-size:8px}.device-phone .catalog-card small{font-size:8px}.device-phone .catalog-tip{font-size:8px;margin-top:5px}
body.device-phone .object-panel{left:var(--safe-l);right:var(--safe-r);top:auto;bottom:calc(var(--safe-b) + var(--phone-dock-h) + 7px);width:auto;padding:8px;border-width:4px;border-radius:18px}
body.device-phone .object-panel .panel-head{display:none}.device-phone .selected-preview{display:none}.device-phone .object-actions{grid-template-columns:repeat(4,1fr);gap:5px}.device-phone .object-actions button{min-height:54px;border-radius:10px;font-size:18px}.device-phone .object-actions button span{font-size:7px}
body.device-phone .toast{top:calc(var(--safe-t) + 50px);max-width:80vw;padding:7px 12px;font-size:11px}.device-phone .mode-badge{top:calc(var(--safe-t) + 53px);font-size:10px;padding:6px 10px}
body.device-phone .engine-error{inset:8%;padding:20px;border-width:4px;border-radius:20px}

/* Narrow portrait phones: preserve the farm viewport and make sheets taller. */
@media (max-width:560px) and (orientation:portrait){
  body.device-phone{--phone-dock-h:70px;--phone-top-h:55px}
  body.device-phone .brand{width:53px}.device-phone .brand img{max-width:52px}
  body.device-phone .resource{min-width:64px;font-size:11px}.device-phone .resource.gem{display:none}
  body.device-phone .level-card{min-width:112px}.device-phone .level-body strong{font-size:10px}.device-phone .level-body small{display:none}
  body.device-phone .top-actions{margin-left:auto}
  .mobile-menu-grid{grid-template-columns:repeat(3,1fr)}
  body.device-phone .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:47dvh}
  body.device-phone .camera-controls{bottom:calc(var(--safe-b) + var(--phone-dock-h) + 6px);right:var(--safe-r);flex-direction:column}
  body.device-phone .camera-controls button{width:39px;min-width:39px;height:39px}
}

/* Landscape phones: keep control bars shallow. */
@media (max-height:540px) and (orientation:landscape){
  body.device-phone{--phone-dock-h:62px;--phone-top-h:48px}
  body.device-phone .top-hud{height:48px}.device-phone .brand{height:45px}.device-phone .brand img{max-height:43px}.device-phone .resource{height:35px}.device-phone .level-card{height:38px}.device-phone .avatar{width:28px;height:28px}.device-phone .top-actions .round{height:35px;width:35px}
  body.device-phone .mobile-dock{height:62px}.device-phone .mobile-dock span{font-size:18px}.device-phone .mobile-dock b{font-size:7px}
  body.device-phone .camera-controls{bottom:calc(var(--safe-b) + 69px)}
  body.device-phone .catalog,body.device-phone .mobile-menu,body.device-phone .object-panel{bottom:calc(var(--safe-b) + 69px)}
  body.device-phone .catalog{max-height:72dvh}.device-phone .catalog-grid{max-height:42dvh}
  .mobile-menu-grid{grid-template-columns:repeat(6,1fr)}
}

/* PC shortcut help is deliberately subtle */
body.device-desktop #deviceBadge::after{content:" · Maus + WASD"}
body.device-tablet #deviceBadge::after{content:" · Touch"}
body.device-phone #deviceBadge::after{content:" · Touch"}
.catalog-tip:after{content:" · v2.1: Offline Homestead · Handy, Tablet/iPad und PC"!important;font-weight:900;color:#3f7136}

/* v1.9 Cinematic Farm */
.cinematic-control{position:relative;overflow:hidden}.cinematic-control:after{content:"";position:absolute;inset:3px;border-radius:50%;box-shadow:inset 0 0 9px #fff7;pointer-events:none}
body.device-desktop .cinematic-control:hover,body.device-tablet .cinematic-control:active{filter:saturate(1.18) brightness(1.06)}
body.device-desktop .premium-chip{background:linear-gradient(180deg,#fff5a7,#f0b43d);color:#5c3514;border-color:#9a681d}
body.device-tablet .top-actions{max-width:260px}
@media (max-width:1050px){body.device-tablet #saveBtn span{display:none}body.device-tablet #saveBtn{min-width:48px;padding:0}}

/* Hoforia v2.1 – direct in-world farming */
.context-actions{display:grid;gap:7px;margin:8px 0 10px}.context-actions:empty{display:none}.context-actions button{min-height:48px;border:2px solid #805020;border-radius:13px;background:linear-gradient(#fff7cf,#ebc56b);color:#4b2d13;font-weight:950;box-shadow:inset 0 2px #fff8;padding:7px 10px}.context-actions button.harvest{background:linear-gradient(#b7f49b,#5fc24c);border-color:#3b8730}.context-actions button:disabled{filter:saturate(.62);opacity:.78}.context-actions small{display:block;font-size:9px;margin-top:2px}
.gameplay-panel{position:fixed;z-index:72;left:50%;bottom:88px;transform:translateX(-50%);width:min(720px,82vw);max-height:min(70vh,650px);padding:14px;border:5px solid #70451f;border-radius:24px;background:linear-gradient(#fff9e9,#efd38c);box-shadow:0 22px 65px #0f180b99;overflow:auto}.gameplay-panel.hidden{display:none!important}.gameplay-content{display:grid;gap:10px}.gameplay-content h3{margin:6px 0 0;font-size:14px;color:#66401c}.panel-copy{margin:0 0 4px;font-size:12px;color:#745531}.game-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.game-card{min-height:100px;border:3px solid #a77738;border-radius:16px;background:linear-gradient(#fffdf1,#efd082);color:#472b14;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px;box-shadow:inset 0 2px #fff,0 4px 10px #50301422}.game-card span{font-size:31px}.game-card b{font-size:12px}.game-card small{font-size:9px;opacity:.78}.game-card:disabled{opacity:.45;filter:grayscale(.35)}.game-card:not(:disabled):active{transform:translateY(2px)}
.inventory-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.inventory-list.compact{grid-template-columns:repeat(3,minmax(0,1fr))}.inventory-row{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:7px;min-height:44px;padding:6px 9px;border:2px solid #c99a54;border-radius:12px;background:#fff8dd}.inventory-row span{font-size:22px}.inventory-row b{font-size:11px}.inventory-row strong{font-size:14px;color:#4d7b2a}.primary-action{min-height:54px;border:3px solid #4f8f35;border-radius:15px;background:linear-gradient(#adf08b,#5dbb48);color:#284d1f;font-weight:950;padding:8px 13px}.primary-action small{display:block;font-size:9px;font-weight:800}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.stats-grid>div{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:105px;border:3px solid #c79a56;border-radius:16px;background:#fff8df}.stats-grid span{font-size:30px}.stats-grid b{font-size:22px}.stats-grid small{font-size:9px}.order-list,.mission-list{display:grid;gap:8px}.order-row{display:grid;grid-template-columns:42px 1fr auto auto;align-items:center;gap:9px;padding:8px;border:2px solid #c39755;border-radius:14px;background:#fff9e5}.order-row>span{font-size:28px}.order-row div{display:flex;flex-direction:column}.order-row b{font-size:12px}.order-row small{font-size:9px}.order-row strong{font-size:12px}.order-row button{border:0;border-radius:10px;padding:9px;background:#64bd4b;color:white;font-weight:900}.order-row button:disabled{background:#aaa;opacity:.55}.mission-row{display:grid;grid-template-columns:46px 1fr;gap:8px;align-items:center;padding:9px;border:2px solid #c39755;border-radius:14px;background:#fff9e5}.mission-row>span{font-size:30px;text-align:center}.mission-row b{font-size:12px}.mission-row small{font-size:9px}.mission-bar{height:10px;border-radius:8px;background:#d3b47a;overflow:hidden;margin:5px 0}.mission-bar i{height:100%;display:block;background:linear-gradient(90deg,#6ac24d,#a8ec72);border-radius:8px}
body.device-desktop .object-panel{width:310px}.device-desktop .gameplay-panel{bottom:96px}
body.device-tablet .gameplay-panel{bottom:84px;width:min(760px,86vw);max-height:62vh}.device-tablet .game-card{min-height:94px}.device-tablet .object-panel{width:290px}
body.device-phone .gameplay-panel{left:var(--safe-l);right:var(--safe-r);bottom:calc(var(--safe-b) + var(--phone-dock-h) + 7px);transform:none;width:auto;max-height:min(68dvh,570px);padding:10px;border-width:4px;border-radius:20px}.device-phone .game-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.device-phone .game-card{min-height:82px;padding:5px;border-width:2px;border-radius:12px}.device-phone .game-card span{font-size:25px}.device-phone .game-card b{font-size:9px}.device-phone .game-card small{font-size:7px}.device-phone .inventory-list{grid-template-columns:1fr 1fr}.device-phone .inventory-list.compact{grid-template-columns:1fr 1fr}.device-phone .inventory-row{min-height:38px;padding:4px 6px}.device-phone .inventory-row span{font-size:18px}.device-phone .inventory-row b{font-size:8px}.device-phone .inventory-row strong{font-size:11px}.device-phone .stats-grid{grid-template-columns:repeat(2,1fr)}.device-phone .stats-grid>div{min-height:78px}.device-phone .order-row{grid-template-columns:34px 1fr auto}.device-phone .order-row strong{display:none}.device-phone .order-row>span{font-size:23px}.device-phone .mission-row{grid-template-columns:36px 1fr}.device-phone .context-actions{margin:0 0 5px}.device-phone .context-actions button{min-height:42px;font-size:11px}.device-phone .object-actions button{min-height:48px}
@media(max-width:390px) and (orientation:portrait){body.device-phone .game-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.device-phone .inventory-list,.device-phone .inventory-list.compact{grid-template-columns:1fr}}
.catalog-tip:after{content:" · v2.1: echte Feldarbeit, Tierproduktion & animierte Hofhelfer"!important}

/* Hoforia v2.1 – Offline Homestead systems */
.context-upgrade{min-height:46px;border:2px solid #6e6da8!important;border-radius:13px!important;background:linear-gradient(#eee7ff,#aaa2e5)!important;color:#3b336c!important;font-weight:950!important;padding:7px 10px!important}.context-upgrade small{display:block;font-size:9px;margin-top:2px}.context-upgrade:disabled{opacity:.55;filter:grayscale(.25)}
.storage-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px}.storage-cards>div{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:8px;padding:10px;border:3px solid #9b713e;border-radius:15px;background:linear-gradient(#fff9e7,#efd08d)}.storage-cards span{font-size:25px}.storage-cards b{font-size:12px}.storage-cards strong{font-size:13px;color:#4c742b}.storage-cards i{grid-column:1/-1;height:9px;background:#c2a066;border-radius:8px;overflow:hidden}.storage-cards em{display:block;height:100%;background:linear-gradient(90deg,#6ec34e,#b6eb6b);border-radius:8px}
.production-list,.market-list,.villager-list{display:grid;gap:7px}.production-row,.market-row,.villager-card{display:grid;align-items:center;gap:9px;padding:9px;border:2px solid #c39755;border-radius:14px;background:#fff9e5}.production-row{grid-template-columns:38px 1fr auto}.market-row{grid-template-columns:38px 1fr auto auto}.villager-card{grid-template-columns:48px 1fr auto;width:100%;text-align:left;color:#4a2c13}.production-row>span,.market-row>span,.villager-card>span{font-size:27px}.production-row div,.market-row div,.villager-card div{display:flex;flex-direction:column}.production-row b,.market-row b,.villager-card b{font-size:12px}.production-row small,.market-row small,.villager-card small{font-size:9px;opacity:.8}.production-row button,.market-row button{border:0;border-radius:10px;padding:8px 10px;background:#63b84b;color:white;font-weight:900}.market-row button:disabled{opacity:.4;filter:grayscale(.5)}.villager-card strong{font-size:23px;color:#6da83f}
.action-stack{display:grid;gap:8px}.primary-action.secondary{background:linear-gradient(#fff3bf,#e7bd5b);border-color:#a2782e;color:#5a3c14}.compact-stats>div{min-height:88px}
.quest-card{display:grid;grid-template-columns:58px 1fr;gap:8px;align-items:start;padding:14px;border:3px solid #b08343;border-radius:18px;background:linear-gradient(#fffbea,#f2d48d)}.quest-card>span{grid-row:1/5;font-size:43px;text-align:center}.quest-card h3{margin:0!important;font-size:16px!important}.quest-card p{margin:0;color:#745531;font-size:11px}.quest-card .quest-need,.quest-card .quest-reward{display:flex;justify-content:space-between;gap:8px;padding:7px 9px;background:#ffffff8f;border-radius:10px;font-size:10px}.quest-card .primary-action{grid-column:1/-1}.quest-card.complete{border-color:#6aa54a;background:linear-gradient(#efffdc,#bfe893)}
.offline-note{padding:7px 10px;border-radius:12px;background:#e7f3d9;border:2px solid #7da65c;font-size:10px;font-weight:800;color:#4d6939}
@media(max-width:680px){.storage-cards{grid-template-columns:1fr}.market-row{grid-template-columns:32px 1fr auto}.market-row button[data-sell-five]{display:none}.quest-card{grid-template-columns:42px 1fr;padding:10px}.quest-card>span{font-size:32px}.production-row{grid-template-columns:32px 1fr auto}}
.catalog-tip:after{content:" · v2.1: Offline-Produktion, Lager, NPC-Aufgaben, Fahrzeuge & Gebäude-Upgrades"!important}

/* Hoforia v2.3 – Performance Edition
   Genre reference: dense classic browser-farm layout; all art and UI remain original Hoforia. */
#gameCanvas{background:linear-gradient(#b9e890,#70bc45)}
body.device-desktop .top-hud,body.device-tablet .top-hud{height:62px;gap:7px}
body.device-desktop .brand,body.device-tablet .brand{width:112px}
body.device-desktop .brand img,body.device-tablet .brand img{max-width:110px;max-height:58px}
body.device-desktop .resource,body.device-tablet .resource{height:48px;border-radius:15px;border-width:3px;min-width:120px;font-size:17px}
body.device-desktop .resource.gem,body.device-tablet .resource.gem{min-width:104px}
body.device-desktop .level-card,body.device-tablet .level-card{height:56px;min-width:330px;border-width:3px;border-radius:18px}
body.device-desktop .top-actions button,body.device-tablet .top-actions button{height:47px;border-width:3px}
.level-prize{position:relative;background:linear-gradient(#fff2a5,#efb83f)!important;animation:prizePulse 2.4s ease-in-out infinite}
@keyframes prizePulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.13) saturate(1.15)}}
body.device-desktop .side{top:88px;bottom:102px;gap:5px}body.device-tablet .side{top:84px;bottom:98px;gap:5px}
body.device-desktop .side button{width:74px;min-height:64px;border-width:3px;border-radius:16px}body.device-desktop .side button span{font-size:25px}
body.device-desktop .bottom-toolbar{height:68px;padding:4px;border-width:4px;border-radius:17px;max-width:min(830px,61vw)}
body.device-desktop .bottom-toolbar button{height:52px;min-width:72px}body.device-desktop .bottom-toolbar span{font-size:21px}
body.device-desktop .bottom-left button{height:64px;width:104px}
body.device-desktop .camera-controls{height:68px;padding:5px}body.device-desktop .camera-controls button{height:52px}
.premium-chip{font-size:8px;padding:3px 6px;border-radius:8px;border:2px solid #8d5b1c;background:linear-gradient(#fff7a3,#eeb135);color:#5d3510;font-weight:950;white-space:nowrap}

.village-strip{left:50%;bottom:82px;transform:translateX(-50%);display:flex;gap:5px;padding:5px 7px;border:4px solid #6a401c;border-radius:17px;background:linear-gradient(#9a642c,#704116);box-shadow:var(--shadow);z-index:22}
.village-strip button{width:72px;height:49px;border:2px solid #c69a57;border-radius:11px;background:linear-gradient(#fff7d4,#eecb79);color:#4b2b12;display:flex;align-items:center;justify-content:center;gap:3px;flex-direction:column;font-weight:900}.village-strip span{font-size:19px;line-height:1}.village-strip b{font-size:8px}
body.device-tablet .village-strip{bottom:76px}.device-phone .village-strip{display:none}

.classic-event-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.classic-event-grid .classic-wide{grid-column:1/-1}.classic-event-grid .quest-card{min-height:170px}
.expansion-card strong{font-size:11px;color:#4f792b;margin-top:4px}.catalog-card[data-short="1"]{background:linear-gradient(#fff7e6,#e2c98e)}.catalog-card[data-short="1"]:after{content:"Material prüfen";font-size:8px;color:#9d5e25;font-weight:900}

/* A denser, more classic farm UI on desktop while leaving more canvas visible. */
body.device-desktop .catalog{bottom:78px;width:min(980px,80vw);max-height:49vh}
body.device-desktop .catalog-grid{grid-template-columns:repeat(7,minmax(95px,1fr));max-height:285px}
body.device-desktop .object-panel{top:82px;right:88px}
body.device-desktop .gameplay-panel{bottom:78px}

/* Tablet/iPad: classic side controls, large enough for touch without covering the farm. */
body.device-tablet .side button{width:68px;min-height:60px;border-width:3px;border-radius:15px}.device-tablet .side button b{font-size:9px}.device-tablet .side button span{font-size:23px}
body.device-tablet .bottom-toolbar{height:66px;max-width:68vw}.device-tablet .bottom-toolbar button{height:50px;min-width:56px}.device-tablet .bottom-toolbar span{font-size:20px}
body.device-tablet .catalog{bottom:75px;max-height:54vh}.device-tablet .catalog-grid{grid-template-columns:repeat(5,1fr)}

@media(max-width:760px){.classic-event-grid{grid-template-columns:1fr}.classic-event-grid .classic-wide{grid-column:auto}.level-prize{display:none}}
.catalog-tip:after{content:" · v2.3: Performance-optimiert für Handy, iPad und PC · Offline-Singleplayer"!important;color:#3f7136;font-weight:900}


/* v2.3 Performance Edition: avoid expensive compositing on touch devices */
body.device-phone .hud,
body.device-phone .panel,
body.device-tablet .hud,
body.device-tablet .panel {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.device-phone .top-hud,
body.device-tablet .top-hud {
  filter: none !important;
}
body.device-phone .side button,
body.device-phone .bottom-toolbar button,
body.device-phone .mobile-dock button {
  transition: none !important;
}
body.device-phone .level-prize,
body.device-tablet .level-prize {
  animation: none !important;
}
.device-badge {
  min-width: 86px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Hoforia v2.4 – Core Progression Edition */
.catalog-tip:after{content:" · v2.4: Level 1–50 · Grünhafen · Wald/Mine/See · weiterhin offline"!important;color:#3f7136;font-weight:900}
.village-level{display:grid;grid-template-columns:52px 1fr;gap:10px;align-items:center;padding:12px;border:3px solid #7e9a4e;border-radius:16px;background:linear-gradient(#f4ffd7,#d4e99b);margin-bottom:10px}.village-level>span{font-size:36px;text-align:center}.village-level b{font-size:15px}.village-level small{font-size:10px;color:#5c693d}.village-project-list,.region-list,.achievement-list,.level-list{display:grid;gap:7px}.village-project,.region-card,.achievement-row,.level-row,.multi-order{display:grid;grid-template-columns:44px 1fr auto;gap:9px;align-items:center;padding:9px 10px;border:2px solid #b58b50;border-radius:14px;background:linear-gradient(#fffbe9,#efd59a)}.village-project>span,.region-card>span,.achievement-row>span{font-size:27px;text-align:center}.village-project>div,.region-card>div,.achievement-row>div,.level-row>div,.multi-order>div{display:flex;flex-direction:column;min-width:0}.village-project b,.region-card b,.achievement-row b,.level-row b,.multi-order b{font-size:12px}.village-project small,.region-card small,.achievement-row small,.level-row small,.multi-order small{font-size:9px;opacity:.82}.village-project em,.region-card em{font-style:normal;font-size:8px;color:#86612f;margin-top:2px}.village-project button,.region-card button,.achievement-row button,.multi-order button,.overview-actions button{border:0;border-radius:10px;padding:8px 10px;background:linear-gradient(#78c954,#4e9d35);color:#fff;font-weight:950;font-size:10px;box-shadow:0 2px 0 #356d27}.village-project button:disabled,.region-card button:disabled,.achievement-row button:disabled,.multi-order button:disabled{opacity:.48;filter:grayscale(.35)}.overview-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:10px}.overview-actions button{min-height:48px;background:linear-gradient(#fff0a8,#dca846);color:#593816;border:2px solid #9c6b2d;box-shadow:none}.level-list{max-height:48vh;overflow:auto;padding-right:3px}.level-row{grid-template-columns:38px 1fr 24px;background:#f6e5b5}.level-row>strong{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#9b7035;color:#fff}.level-row.done{border-color:#78a84a;background:#eef4c9}.level-row.current{border-color:#e0a526;background:#fff1a8;box-shadow:0 0 0 2px #ffd96b inset}.order-section{display:grid;gap:6px;margin:0 0 12px}.order-section h3{margin:5px 0 1px!important}.multi-order{grid-template-columns:38px 1fr auto auto}.multi-order>span{font-size:24px}.multi-order>strong{font-size:10px;white-space:nowrap;color:#725021}.achievement-row .mission-bar{height:8px;margin:4px 0}.region-card{min-height:74px}.region-card button{min-width:105px}.village-project button{max-width:240px}.core-badge{font-size:8px;font-weight:950}
@media(max-width:760px){.overview-actions{grid-template-columns:1fr 1fr}.village-project,.region-card,.achievement-row{grid-template-columns:36px 1fr}.village-project button,.region-card button,.achievement-row button{grid-column:1/-1}.multi-order{grid-template-columns:34px 1fr auto}.multi-order>strong{display:none}.level-list{max-height:42vh}.village-level{grid-template-columns:42px 1fr}.village-level>span{font-size:30px}}


/* Hoforia v2.5 – Classic Village Look
   Inspired by classic browser farming readability, but with original Hoforia art/UI. */
:root{--classic-wood:#75451f;--classic-wood-dark:#4a2b13;--classic-gold:#f4c85b;--classic-cream:#fff1bf;--classic-green:#6fba42}
#gameCanvas{background:linear-gradient(#c7efa1,#78bd4b)}
.top-hud{background:linear-gradient(180deg,rgba(121,77,33,.97),rgba(82,48,20,.97));border-bottom:4px solid #3c240f;box-shadow:0 5px 0 #d5a45155,0 9px 22px #16230d55}
.brand{background:linear-gradient(#fff0b0,#e2b350);border:3px solid #5e3515;border-radius:15px;padding:2px 7px;box-shadow:inset 0 2px #fff8d6}
.premium-chip{background:linear-gradient(#ffe88b,#d99431)!important;color:#5b3210!important;border-color:#633913!important}
.resource{background:linear-gradient(#fff8d7,#e9c878)!important;border-color:#704119!important;box-shadow:inset 0 2px #fff,0 4px 0 #43270f!important;color:#4b2a10!important}
.level-card{background:linear-gradient(#fff2bd,#dca84d)!important;border-color:#694018!important;box-shadow:inset 0 2px #fff7de,0 4px 0 #42260f!important}
.level-round{background:linear-gradient(#8fd450,#4d9c2f)!important;border-color:#315e22!important;color:#fff!important}
.level-body .xp{background:#70451f!important;border:2px solid #4e2c12!important}.level-body .xp i{background:linear-gradient(90deg,#f7dd4e,#84d54a)!important}
.side{gap:6px}.side button,.bottom-left button,.camera-controls button{background:linear-gradient(#fff3bd,#e4bb63)!important;border:3px solid #6b3e18!important;box-shadow:0 4px 0 #42260f!important;color:#49280f!important}.side button:hover{transform:translateY(-1px);filter:saturate(1.12) brightness(1.04)}
.side button em{background:#dc4435!important;border:2px solid #fff2c9!important}
.bottom-toolbar{background:linear-gradient(#8b5727,#5f3517)!important;border:4px solid #3f240f!important;box-shadow:inset 0 2px #bd8240,0 6px 20px #1c260d66!important}
.bottom-toolbar button{background:linear-gradient(#fff5c6,#dfb455)!important;border:2px solid #6c401c!important;color:#4a2a11!important;box-shadow:inset 0 2px #fff9df,0 2px 0 #3c220e!important}
.bottom-toolbar button.active{background:linear-gradient(#a9e36b,#65b03e)!important;border-color:#315e22!important;color:#214419!important}
.village-strip{background:linear-gradient(#8f5b29,#5a3417)!important;border-color:#3c230f!important}.village-strip button{background:linear-gradient(#fff2b8,#e6bd62)!important}
.panel{background:linear-gradient(180deg,#fff6d7,#efd28a)!important;border:4px solid #6a401c!important;box-shadow:0 10px 0 #41250f88,0 18px 40px #1b240d66!important}.panel-head{background:linear-gradient(#855328,#653918)!important;color:#fff4cd!important;border-bottom:3px solid #3f240f!important}.panel-head small{color:#ffd975!important}.close{background:#f4cc6b!important;border-color:#633814!important;color:#4b290f!important}.tabs button{background:#efd08b!important;border-color:#845426!important}.tabs button.active{background:#7cbd48!important;color:#fff!important;border-color:#3d7328!important}
.catalog-card,.game-card{background:linear-gradient(#fffbe7,#efd79c)!important;border:3px solid #a8793d!important;box-shadow:inset 0 2px #fff,0 3px 0 #8c5d2b!important}.catalog-card:hover,.game-card:hover{transform:translateY(-2px);filter:saturate(1.10)}
.game-card span,.catalog-card .big{filter:saturate(1.18) drop-shadow(0 2px 0 #ffffff99)}
.toast{background:linear-gradient(#fff0ad,#d6a844)!important;border:3px solid #684018!important;color:#4c2b10!important}
.mode-badge{background:linear-gradient(#8ed35a,#4c9e31)!important;border:3px solid #2f6a21!important}
.device-badge{background:#613a1c!important;color:#ffeab0!important;border-color:#bd8a42!important}

/* Classic field readability: larger crops and visually connected field blocks. */
body.device-desktop .bottom-toolbar{max-width:min(900px,65vw)}
body.device-desktop .side button{width:78px;min-height:67px}
body.device-desktop .side button span{font-size:27px}
body.device-tablet .side button{width:72px;min-height:64px}
body.device-phone .mobile-dock{background:linear-gradient(#815026,#583216)!important;border-color:#3b210e!important}
body.device-phone .mobile-dock button{background:linear-gradient(#fff0ad,#d9ad50)!important;border-color:#684018!important;color:#48270e!important}
body.device-phone .mobile-dock button.active{background:linear-gradient(#a5df68,#62ad3d)!important}

/* Slightly more compact UI leaves more room for the dense farm world. */
body.device-desktop .top-hud{padding-top:var(--safe-t);padding-left:var(--safe-l);padding-right:var(--safe-r)}
body.device-desktop .catalog{max-height:52vh}.catalog-grid{gap:7px}
.catalog-tip:after{content:" · v2.5: Classic Village Look · dichter Hof · größere Felder · moderne Hoforia-UI · offline"!important;color:#447431;font-weight:950}
