
/* LOCAL VISUAL TEST ONLY: layered game menu, original game unchanged. */
body.forest-home-active{background:#080a0d;overflow:hidden}
body.forest-home-active #app,body.forest-home-active .game-version{visibility:hidden}
.forest-scene{position:fixed;inset:0;z-index:50;overflow:hidden;background:#090c11;color:#f5e5d9;font-family:Georgia,serif}
.forest-image{position:absolute;inset:-2%;background:url('/skogsmiljo-ren.jpg') center center/cover no-repeat;filter:brightness(.62) saturate(.85);transform:scale(1.04);animation:forestDrift 28s ease-in-out infinite alternate}
.forest-shade{position:absolute;inset:0;background:linear-gradient(90deg,#07070ac9 0%,#08090a70 35%,#07080bb8 70%,#07080b99 100%),linear-gradient(0deg,#050507dd 0%,transparent 35%,#06060880 100%)}
.forest-fog{position:absolute;bottom:-22%;left:-20%;width:130%;height:65%;pointer-events:none;opacity:.25;filter:blur(42px);background:radial-gradient(ellipse,#b4b3b6a8,transparent 70%);animation:forestFog 17s ease-in-out infinite alternate}
.forest-fog.fog-b{bottom:8%;left:45%;width:90%;height:40%;opacity:.15;animation-duration:24s;animation-direction:alternate-reverse}
.forest-embers{position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle,#f8a75b 1px,transparent 2px),radial-gradient(circle,#e65e3b 1px,transparent 2px);background-size:137px 191px,223px 167px;opacity:.2;animation:forestSparks 14s linear infinite}
.forest-main{position:absolute;z-index:2;top:50%;left:50%;transform:translate(-50%,-50%);width:min(94vw,550px);text-align:center;padding:26px 28px 38px;background:linear-gradient(180deg,#09080bc7,#0b080acb);border:1px solid #a7685540;box-shadow:0 20px 90px #000a,0 0 120px #07060788;backdrop-filter:blur(8px)}
.forest-main:before,.forest-main:after{content:"";position:absolute;top:10px;bottom:10px;width:1px;background:linear-gradient(transparent,#c68a6755,transparent)}
.forest-main:before{left:10px}.forest-main:after{right:10px}
.forest-emblem{font:700 10px system-ui,sans-serif;letter-spacing:.28em;color:#db9e87}
.forest-main h1{font-size:clamp(42px,7.5vw,79px);letter-spacing:.07em;line-height:1.1;color:#f6d9c5;margin:14px 0 4px;text-shadow:0 4px 15px #000,0 0 22px #a3453840}
.forest-main p{font-size:17px;color:#d1b5a5;margin:10px 0 30px}
.forest-menu{display:flex;flex-direction:column;gap:12px;max-width:350px;margin:auto}
.forest-menu button{cursor:pointer;position:relative;background:linear-gradient(180deg,#34171bd9,#100e13ed);border:1px solid #b17b5f;color:#f6dec7;font:20px Georgia,serif;padding:15px 24px;box-shadow:inset 0 0 0 2px #0a080c,0 4px 15px #000a;clip-path:polygon(4% 0,96% 0,100% 50%,96% 100%,4% 100%,0 50%);transition:transform .18s,background .18s,filter .18s}
.forest-menu button:hover,.forest-menu button:focus-visible{transform:scale(1.045);background:linear-gradient(#843133,#35171b);filter:brightness(1.2)}
.forest-menu button:first-child{background:linear-gradient(#8c3436,#451a1e)}
.forest-menu button[hidden]{display:none}
.forest-foot{position:absolute;z-index:3;bottom:24px;width:100%;text-align:center;font:700 10px system-ui,sans-serif;letter-spacing:.22em;color:#ddaa8b;text-shadow:0 2px 8px #000}
.forest-foot span{padding:0 12px;color:#d4574a}
.forest-modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:18px}
.forest-modal-backdrop{position:absolute;inset:0;background:#040406e8;backdrop-filter:blur(10px)}
.forest-modal-dialog{position:relative;z-index:2;max-width:560px;width:100%;max-height:92vh;overflow:auto;padding:30px 20px 20px;background:linear-gradient(145deg,#302024,#140e13);border:1px solid #9c6760;box-shadow:0 20px 90px #000}
.forest-modal-dialog .home-action{display:block!important;width:100%!important;margin:0!important}
.forest-close{position:absolute;z-index:5;top:5px;right:8px;border:0;background:transparent;color:#f5d3c4;font:30px Georgia,serif;cursor:pointer}
@keyframes forestDrift{to{transform:scale(1.12) translate(-1%,1%)}}
@keyframes forestFog{to{transform:translateX(22%) scale(1.15)}}
@keyframes forestSparks{to{background-position:25px -180px,-40px -220px}}
@media(max-width:600px){.forest-main{padding:25px 16px;width:92vw}.forest-main h1{font-size:clamp(38px,10vw,54px)}.forest-main p{font-size:15px}.forest-menu button{font-size:18px;padding:14px}.forest-foot{font-size:8px;letter-spacing:.1em}.forest-image{background-position:53% center}}
@media(prefers-reduced-motion:reduce){.forest-image,.forest-fog,.forest-embers{animation:none}}

/* v3 visual corrections: no duplicate baked-in labels, contained title, lighter forest. */
body.forest-home-active #app{position:fixed!important;inset:0!important;visibility:hidden!important;pointer-events:none!important}
body.forest-home-active #app ~ .buttons,body.forest-home-active .floating-rules{display:none!important}
.forest-scene{background:radial-gradient(ellipse at 50% 48%,#352025 0%,#141217 52%,#080b10 100%)}
.forest-image{filter:brightness(.95) saturate(.9);opacity:.9;-webkit-mask-image:linear-gradient(90deg,#000 0%,#000 23%,transparent 40%,transparent 60%,#000 77%,#000 100%);mask-image:linear-gradient(90deg,#000 0%,#000 23%,transparent 40%,transparent 60%,#000 77%,#000 100%)}
.forest-shade{background:linear-gradient(90deg,#06080b3b 0%,#09090c00 27%,#110e1280 42%,#110e1280 58%,#09090c00 73%,#06080b3b 100%),linear-gradient(0deg,#050507ad,transparent 40%,#06060850)}
.forest-main{width:min(92vw,520px);padding:32px 26px 34px;background:linear-gradient(170deg,#100b10fa,#120c10f8);border:1px solid #92644d;box-shadow:0 20px 90px #000b,0 0 0 7px #130c10b8,0 0 60px #a8493422;overflow:hidden}
.forest-main h1{font-size:clamp(32px,5vw,57px);letter-spacing:.045em;max-width:100%;overflow-wrap:normal;white-space:nowrap}
.forest-main p{margin:10px 0 24px}
.forest-menu{max-width:320px}
.forest-foot{font-size:9px}
.forest-modal-dialog{color:#f3ddd0}
.forest-modal-dialog .home-action{visibility:visible!important;pointer-events:auto!important}
@media(max-width:600px){.forest-main{width:94vw;padding:26px 15px 28px}.forest-main h1{font-size:clamp(28px,8.5vw,44px)}.forest-image{background-position:center center}.forest-foot{bottom:14px}}

body.forest-home-active .forest-hidden-external{display:none!important}
