/* Målad kvartersbutik. Spelbara föremål ligger ovanpå lokalens bakgrund. */
:root{--ink:#233b32;--muted:#695d48;--line:#c9b28c;--card:#fff6df;--good:#386c4a;--good-dark:#244b33;--font:"Baloo 2","Trebuchet MS",sans-serif}
body{background:#23372d url(bilder/lokal-v1.webp) center/cover fixed;color:var(--ink)}
body::before{content:"";position:fixed;inset:0;background:#101c16bd;pointer-events:none;z-index:-1}
.screen>.wrap{background:#f4e8ce;border:1px solid #b89c6c;box-shadow:0 20px 70px #0006;margin-block:20px;padding:24px;border-radius:4px 18px 5px 12px;max-width:1050px}
.store-title{color:#f7e7bb;text-align:center;grid-column:1/-1;padding:8px}
.store-title>span{font:700 11px/1.5 var(--font);letter-spacing:.28em}.store-title h1{margin:0 auto;width:min(480px,95%);height:160px;background:url(bilder/skylt-v1.webp) center/contain no-repeat;font-size:0}.store-title p{font:italic 19px Georgia;margin:0}
#home>.wrap{background:transparent;border:0;box-shadow:none;max-width:1200px;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:14px 26px;align-items:start}
#home .lead{grid-column:1/-1;text-align:center;color:#eee1c3;max-width:650px;margin:0 auto 12px;font-size:16px}
#homeShop{grid-column:1;grid-row:3/10;min-width:0}#homeShop .shop{--h:440px}
#home .mine,#home .go,#home .shop-settings{grid-column:2;margin:0}
#home #play{display:none}
#home .go{background:#f1ce82;color:#283e2b;box-shadow:0 4px 0 #9c702f;padding:16px 18px;border-radius:5px 12px 5px 10px;font-size:19px;border:1px solid #fbe5ab}
#home .mine{background:#273e30e8;color:#f0dfb6;box-shadow:0 3px 0 #14251c;border:1px solid #758265;border-radius:4px 10px;padding:12px 16px;min-height:60px}
#home .mine small{color:#c6c6a7;font-size:14px}#home .mine b{font-size:18px}#home .mine .k{background:#14271c;color:#f4d894}
.shop-settings{background:#f2e6ca;box-shadow:4px 5px 0 #111b1344;padding:14px 18px;min-width:0;border-radius:3px 9px;max-height:62vh;overflow:auto}
.shop-settings summary{font-weight:800;cursor:pointer;font-size:17px;min-height:30px}.shop-settings h2{font-size:19px}.shop-settings .lvl{border:1px solid #c6b28b;box-shadow:0 2px 0 #baa27b;border-radius:4px 9px;padding:9px}.lvl[aria-pressed=true]{outline:3px solid #407050;outline-offset:-2px}.lvl b{font-size:16px}.lvl small{font-size:13px}
.delivery{margin:22px 0 6px;padding:12px;border:1px solid #b7a27a;min-width:0}.delivery legend{font-weight:800}.delivery label{display:flex;gap:9px;align-items:center;font-weight:800;min-height:44px;font-size:16px;cursor:pointer}.delivery input{accent-color:#386c4a;width:20px;height:20px;flex:none}.delivery p{margin:0 0 12px 29px;font-size:14px;line-height:1.4}
.shop{isolation:isolate;border:5px solid #53442e;border-radius:5px 12px;box-shadow:0 6px 0 #1a281d,0 18px 35px #0004;background-size:cover!important;--h:480px}
.shop::before{display:none}.painted-room{position:absolute;inset:0;background:url(bilder/lokal-v1.webp) center/100% 100%;pointer-events:none;z-index:-1}
.awn{opacity:.85;height:24px;mix-blend-mode:multiply}.awn::after{height:10px}
.shelves{left:17%;right:16%;top:100px;gap:12px}.shelf{min-height:95px;background:linear-gradient(#49392330,#47351a13);border-inline:6px solid #71502d;border-radius:2px;padding:7px 2px 9px;gap:4px;justify-content:space-around;box-shadow:inset 0 8px 10px #33261530}.shelf::after{height:11px;background:linear-gradient(#d6b177,#a8753f 40%,#614227);box-shadow:0 5px 5px #31231466}
.shelf .ware{--w:48px}.spr{display:inline-block;flex-shrink:0;filter:drop-shadow(0 2px 1px #30221235)}
.pile .spr{filter:drop-shadow(0 2px 1px #30221266)}.plabel{background:#fff4d9;border:1px solid #ac9063;border-radius:1px 3px;transform:rotate(-2deg);color:#343527}.shelf .ware:nth-child(2n) .plabel{transform:rotate(2deg)}
.ware[role=button]{cursor:pointer;min-height:60px;min-width:44px;border-radius:4px}.ware[role=button]:hover,.ware[role=button]:focus-visible{background:#f5df9366;outline:2px solid #fff0bb;outline-offset:2px}.ware[aria-pressed=true]{background:#b5d6a77d}.ware[aria-pressed=true]::before{content:'✓';position:absolute;right:0;top:0;color:#163e26;background:#e1efd2;border-radius:50%;z-index:3;width:22px;text-align:center}
.shop .sign{top:45px;border-color:#c1a069;background:#263e2d;color:#f1dfb0;transform:translateX(-50%) rotate(-1deg);font-family:Georgia,serif;box-shadow:0 3px 8px #0005;padding:5px 18px}
.counter{height:31%;background:none;box-shadow:none;border:0;border-radius:0;z-index:2;overflow:visible}.counter::after{display:none}.counter>img{width:100%;height:100%;object-fit:fill;display:block;pointer-events:none}
.shop-floor-label{display:none}.departments{right:1.5%;top:100px;width:13%;gap:4px}.departments span{background:#284632;color:#f3dfb6;border:1px solid #b49e68;box-shadow:0 2px 3px #0005;font:700 10px/1.3 var(--font);border-radius:1px 4px;padding:5px 2px}
.keeper{right:1%;bottom:26%;width:110px;filter:drop-shadow(0 4px 3px #32281766)}.cust{left:1%;bottom:26%;width:120px;filter:drop-shadow(0 4px 3px #32281766)}
.painted-person{display:block;aspect-ratio:1;background-image:url(bilder/kunder-v1.webp);background-size:400% 300%;background-position:calc(var(--cx)*100%/3) calc(var(--cy)*100%/2);width:100%;transform-origin:bottom center}.cust:not(.away) .painted-person{animation:shop-breathe 4s ease-in-out infinite}.kq .painted-person{filter:saturate(.8)}
@keyframes shop-breathe{50%{transform:translateY(-2px) rotate(.8deg)}}
.bubble{background:#fff4d9;border:1px solid #bd9e6e;border-radius:3px 16px 16px 16px;box-shadow:0 4px 0 #b49a6a;position:relative;padding:14px 50px 14px 18px;margin:14px 0;font-size:18px;color:#2f392c}.bubble::after{border-bottom-color:#fff4d9}.bubble .spk{background:#e9d9b2}
.panel{background:#f3e4c3;border:1px solid #b89a68;box-shadow:0 6px 0 #16271e55;border-radius:3px 10px;padding:18px;position:relative}.panel::before{content:'';display:block;width:44px;height:6px;background:#b49f79;box-shadow:0 2px 0 #fff8;position:absolute;top:-3px;left:calc(50% - 22px)}
#game{background:transparent}.hud{color:#f7e6bd;padding:10px 20px}.hud .kassa,.hud .hb{background:#264532;color:#f9e8bd}.hud .t{font-size:16px}
#gwrap{padding:10px 20px 30px}.errand-steps{gap:0;border-bottom:1px solid #c2a980;margin:5px 0 18px}.errand-steps li{background:none;border-radius:0;font-size:12px;min-width:48px;padding:8px 3px}.errand-steps .current{background:#365a3b}.errand-steps .complete{background:#dedbb4}.errand-label{color:#6e603f;letter-spacing:.12em}.shopping-list span{background:#fff6df;border-radius:1px;box-shadow:2px 3px 0 #b6a37d44}.shopping-list .checked{background:#d0dcb1}.ask{font-size:19px}
.pad button,.done,.go,.alt,.buy{border-radius:4px 9px!important}.pad button{background:#fff5da;box-shadow:0 3px 0 #bda16f}.pad .okbtn,.done{background:#3d6746;color:#fff3ce}.drawer{background:#5c4329;border-radius:4px 10px}.tray{background:#fff6de;border-radius:4px;box-shadow:inset 0 0 0 2px #b6945e}
.shop-goal{background:#e7d9b8;border:1px solid #b29b6d;border-radius:2px 8px;margin:18px 0 0;padding:14px 18px;box-shadow:4px 5px 0 #14211966}.shop-goal b{font-size:21px}.shop-goal p{font-size:15px}.shop-goal label{font-size:15px}.shop-goal select{min-width:0;font-size:14px}.goal-shop{border-radius:3px;background:#3d6544}.book .bk{border-radius:3px 10px;background:#fff4d9}.bk .pic .painted-person{width:90px}.bk.ny .pic{filter:brightness(0) opacity(.25)}
button:focus-visible,[role=button]:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #f1ae42;outline-offset:3px}
@media(min-width:1000px){#gwrap{grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr);max-width:1370px;gap:24px}.hud{max-width:1370px}.shop{--h:520px}.shelf .ware{--w:52px}.shop .keeper,.shop .cust{width:115px}.shelves{right:16%}.onc .ware{--w:60px}}
@media(max-width:999px){#home>.wrap{grid-template-columns:1fr;max-width:760px}#homeShop{grid-column:1;grid-row:auto}#home .mine,#home .go,#home .shop-settings{grid-column:1}#home #titlePlay{grid-row:3}#homeShop .shop{--h:440px}.shop-settings{max-height:none}#gwrap{max-width:760px}.panel{margin-top:12px}.store-title h1{height:130px}}
@media(max-width:600px){.screen>.wrap{padding:16px;margin:10px}.store-title h1{height:115px}.store-title>span{font-size:9px}.store-title p{font-size:17px}#home .lead{font-size:14px}#home>.wrap{padding:5px;gap:14px}#gwrap{padding:4px 8px 24px}.shop,#homeShop .shop{--h:370px;border-width:3px}.shelves{left:13%;right:13%;top:88px;gap:8px}.shelf{min-height:81px;border-inline-width:3px;flex-wrap:nowrap;gap:1px}.shelf .ware{--w:34px;min-width:0}.ware[role=button]{min-width:44px;--w:34px}.plabel{padding:1px;font-size:10px}.plabel b{font-size:12px}.shop .cust,.shop .keeper{width:85px}.shop .sign{top:44px;font-size:12px;padding:4px 9px}.departments{right:0;width:12%;top:92px}.departments span{font-size:8px;padding:4px 1px;overflow-wrap:anywhere}.shop-goal{padding:12px}.bubble{font-size:16px;margin:10px 0;padding:12px 44px 12px 12px}.hud{padding:10px}.hud .t{font-size:13px}.hud .kassa{font-size:14px}.panel{padding:14px}.ask{font-size:17px}.onc .ware{--w:48px}.store-title{padding:0}.shop-settings{padding:12px}.levels{gap:7px}.shop-goal label{flex-wrap:wrap}.shop-goal select{width:100%}}
@media(prefers-reduced-motion:reduce){.painted-person{animation:none!important}}
@media(max-width:600px){.shop,#homeShop .shop{--h:440px}.shop.stocked-big,#homeShop .shop.stocked-big{--h:600px}.shelves{top:76px;left:13%;right:13%;gap:12px}.shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-height:76px;padding:5px 2px 10px;row-gap:10px;justify-items:center}.shelf .ware{--w:42px;width:100%;min-height:65px;max-width:55px}.shop .cust,.shop .keeper{bottom:25%;width:82px}.departments{top:auto;bottom:32%;right:16%;left:16%;width:auto;flex-direction:row;flex-wrap:wrap;justify-content:center;z-index:1}.departments span{font-size:8px;padding:3px 5px}.reg{bottom:23%}.shop .sign{top:38px}}
.painted-apron{position:absolute;left:27%;right:27%;top:55%;height:36%;background:#e3cfa1;border:2px solid #9b7d4b;border-radius:4px 4px 12px 12px;box-shadow:inset 0 -4px 0 #c6ae7e;transform:rotate(-2deg)}.painted-apron::after{content:'';position:absolute;left:25%;right:25%;top:45%;height:30%;border:1px solid #a78f62;border-radius:0 0 4px 4px}
@media(max-width:600px){.departments{bottom:3%;left:4%;right:4%;z-index:3;pointer-events:none}.shop .keeper{bottom:25%}.shop.stocked-big .shelf{min-height:150px}}
.painted-room::after{content:'';position:absolute;left:17%;right:16%;top:13%;bottom:39%;background:var(--wall);mix-blend-mode:multiply;opacity:.27;pointer-events:none}.reg .box{background:linear-gradient(#ffffff40,var(--rc,#6b7894));border:2px solid #3e5144}.reg .scr{border-color:var(--rc,#6b7894)}
/* Namnfält i lager- och prislistor är vanlig löpande text, inte kundernas namnskyltar. */
.lrow .nm,.prow .nm{position:static;transform:none;background:none;color:var(--ink);font-size:inherit;padding:0;white-space:normal}
/* Målad scen och papper behåller sin läsbara färgskala även i sajtens mörka tema. */
:root[data-tema]{--ink:#233b32;--muted:#695d48;--line:#c9b28c;--card:#fff6df;--good:#386c4a;--good-dark:#244b33;--ok-ink:#244b33;--ok-bg:#dce8c4;--err-bg:#f9dfcf;--err-ink:#8e3530}
html[data-tema] body{background:#23372d url(bilder/lokal-v1.webp) center/cover fixed;color:#233b32}
/* En tydlig scenram skiljer butiken från den lugna bakgrunden. */
html[data-tema] body,body{background:radial-gradient(ellipse at 50% 5%,#465446,#1c2c25 75%);background-attachment:fixed}
body::before{background:repeating-linear-gradient(0deg,#00000006 0 1px,transparent 1px 5px)}
.shop{--counter-surface:29.5%;border:10px solid #65482e;border-radius:8px;outline:1px solid #c8a267;outline-offset:-3px;box-shadow:inset 0 0 0 2px #f1d7a2,0 0 0 3px #19291f,0 10px 0 #101c16,0 22px 35px #0007}
.ondisk{bottom:var(--counter-surface);left:25%;z-index:6;padding:0;line-height:0;transform:none;filter:drop-shadow(0 2px 1px #33231588)}
.ondisk .deco{vertical-align:bottom}
.painted-deco{display:inline-block;position:relative;line-height:0;height:auto;max-width:100%;flex:none}
.painted-deco>img{display:block;width:100%;height:auto;pointer-events:none}
.opt .pv .painted-deco{width:auto!important;height:50px}.opt .pv .painted-deco>img{width:auto;height:50px;max-width:65px;object-fit:contain}
.opt .pv>.register-art,.opt .pv>.prop-preview{max-width:70px;max-height:52px;object-fit:contain;display:block}
.prop-led{position:absolute;right:15%;top:28%;width:4px;height:4px;border-radius:50%;background:#252a22}.painted-deco.active .prop-led,.radio.play .prop-led{background:#e6ad42;box-shadow:0 0 5px #efcb7c}
.ondisk.on [data-prop=tv]::after{content:'';position:absolute;left:10%;top:22%;width:57%;height:52%;background:linear-gradient(145deg,#32634a88,#93be9a66);border-radius:15%;pointer-events:none}
.ondisk.on [data-prop=kaffe]::after{content:'≈';position:absolute;left:40%;top:-4px;color:#f5edda;font:20px Georgia;animation:coffee-steam 2s ease-in-out infinite;pointer-events:none}
@keyframes coffee-steam{to{transform:translateY(-12px);opacity:0}}
.ongolv{left:auto;right:2%;bottom:1%;z-index:6;line-height:0;filter:drop-shadow(0 2px 2px #211a1266)}
.ongolv.beat .painted-deco{animation:beat .45s infinite}.ongolv.on::before{z-index:-1}
.ceiling-prop{position:absolute;top:14px;left:4%;padding:0;z-index:4;line-height:0;min-width:44px;min-height:44px;background:none;border:0;box-shadow:none}
.ceiling-prop>img{width:100%;height:auto;display:block;pointer-events:none}
.ceiling-prop.lampor{left:3%;right:auto;width:105px;height:auto;display:block;opacity:1}
.ceiling-prop.flakt{left:5%;top:20px;width:65px;transform:none}.ceiling-prop.flakt:not(.f0)>img{animation:fan-sway 1.2s ease-in-out infinite alternate}.ceiling-prop.flakt.f2>img{animation-duration:.3s}
@keyframes fan-sway{to{transform:rotate(6deg)}}
.ceiling-prop.disco{left:auto;right:4%;top:8px;width:45px;height:auto;margin:0;border-radius:0;animation:none;background:none;box-shadow:none}.ceiling-prop.disco:not(.off)>img{animation:disco-sway 3s ease-in-out infinite alternate}
@keyframes disco-sway{to{filter:brightness(1.15);transform:rotate(6deg)}}
.ceiling-prop.off{filter:grayscale(1) brightness(.55)}
.reg{right:14%;bottom:var(--counter-surface);width:92px;height:auto;padding:0;background:none;border:0;line-height:0;z-index:7;filter:drop-shadow(0 2px 1px #291d1588)}
.reg .register-art{display:block;width:100%;height:auto;pointer-events:none}
.reg .box{display:none}.reg .scr{position:absolute;left:20%;right:23%;top:16%;height:12%;min-height:0;padding:0;border:0;border-radius:0;background:#191e19;color:#e5edc6;font:700 clamp(6px,.7vw,10px)/1.3 ui-monospace,monospace;white-space:nowrap;display:flex;align-items:center;justify-content:center}
.reg::after{content:'SKANNA';position:absolute;left:23%;right:24%;bottom:2%;margin:0;padding:2px 0;border:1px solid #a48956;border-radius:2px;background:#24382d;color:#e9e8ba;font:700 7px/1 ui-monospace,monospace;letter-spacing:1px}
.reg .lada{top:94%;z-index:2}.reg .kvitto{line-height:1.2;z-index:3;bottom:82%}
.shop .sign{background:#213c2a url(bilder/inredning/skylt-v1.webp) center/100% 100%;border:0;box-shadow:none;border-radius:0;padding:12px 25px 8px;top:28px;min-width:150px}.shop .sign.neon{box-shadow:0 0 7px #d46fbd;border:1px solid #d46fbd;background:#261c2b}
@media(max-width:600px){.shop{border-width:8px}.shop.stocked-big,#homeShop .shop.stocked-big{--h:660px}.shop.stocked-big .shelf{min-height:140px}.ondisk{left:23%;max-width:65px}.reg{width:72px;right:16%}.reg .scr{font-size:7px}.reg::after{font-size:6px;letter-spacing:0}.ongolv{right:1%;bottom:1%}.ceiling-prop.lampor{width:70px;left:3%;top:12px}.ceiling-prop.flakt{width:48px;left:3%;top:12px}.ceiling-prop.disco{right:3%;width:36px;top:6px}.shop .sign{top:25px;min-width:130px;padding:10px 18px 7px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.ceiling-prop>img,.painted-deco::after{animation:none!important}}
.reg{right:1.5%}.shop .keeper{right:1%;bottom:34%}
@media(max-width:600px){.shop,#homeShop .shop{--h:480px}.shop.stocked-big,#homeShop .shop.stocked-big{--h:660px}.reg{right:1.5%}.shop .keeper{bottom:34%}}
/* Fotpunkten ligger inne på den synliga träskivan, efter bildens transparenta överkant. */
.shop{--counter-surface:27.5%}
.prop-sign-preview{position:relative;width:72px;display:block}.prop-sign-preview>img{width:100%;display:block}.prop-sign-preview>span{position:absolute;inset:40% 0 0;color:#f2dfb0;font:bold 11px Georgia;text-align:center}.prop-sign-preview.neon{filter:drop-shadow(0 0 4px #c56eaf)}.prop-sign-preview.neon>span{color:#ffb6e0;text-shadow:0 0 3px #f272c9}
/* Varje visuell varurad får ett eget hyllplan, även när rutnätet radbryts. */
.spr{background-image:var(--food);background-size:contain;background-position:center bottom;background-repeat:no-repeat}
.shelves{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:24px 0;align-items:end}
.shop:not(.stocked-big) .shelves{grid-template-columns:repeat(4,minmax(0,1fr))}
.shelves .shelf{display:contents}.shelves .shelf::after{display:none}
.shelves .ware{display:flex;align-items:center;justify-content:flex-end;align-self:end;width:100%;max-width:none;min-height:72px;padding:0 0 8px;margin:0;z-index:1;position:relative}
.shelves .ware::after{content:'';position:absolute;left:-1px;right:-1px;bottom:0;height:8px;background:linear-gradient(#d6b177,#a8753f 40%,#614227);box-shadow:0 4px 4px #31231455;z-index:-1}
.shelves .ware .plabel{position:absolute;top:calc(100% - 6px);margin:0;left:50%;transform:translateX(-50%);z-index:2}
.shelves .ware:nth-child(2n) .plabel{transform:translateX(-50%)}
.shelves .ware:hover .pile{transform:none}
@media(max-width:600px){.shelves{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 0}.shelves .ware{min-height:65px;--w:42px}.shop.stocked-big .shelves{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Hela hyllplanet fortsätter även förbi en ofullständig sista varurad. */
.shelves{grid-auto-rows:72px;background:repeating-linear-gradient(to bottom,transparent 0 64px,#d6b177 64px,#a8753f 67px,#614227 72px,transparent 72px 96px)}
.shelves .ware{height:100%}.shelves .ware::after{display:none}
@media(max-width:600px){.shelves{grid-auto-rows:65px;background:repeating-linear-gradient(to bottom,transparent 0 57px,#d6b177 57px,#a8753f 60px,#614227 65px,transparent 65px 85px)}}
#errandForm{display:block;width:100%}.sum-entry{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 18px}#errandForm .pad{max-width:360px;margin:auto}#errandForm .pad button{min-height:52px}
