/* Schriften: lokal gehostet (SIL Open Font License, siehe fonts/LICENSE-*.txt) */
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2")}
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:600;font-display:swap;src:url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2")}
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:800;font-display:swap;src:url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2")}

:root{
  --bg:#e4e6ea; --surface:#f4f5f7; --ink:#1f2430; --muted:#5b6272; --line:#c3c7d0;
  --lamp:#a86a00; --lamp-ink:#ffffff; --bad:#b3261e; --good:#1d7a45;
  --c-stone:#8a8f99; --c-coal:#30333b; --c-iron:#9a5b3c; --c-copper:#d0763a; --c-gold:#d9a400; --c-gem:#2aa6c9;
  color-scheme:light;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#1d1f27; --surface:#272a35; --ink:#e9e6df; --muted:#a0a5b3; --line:#3a3e4c;
    --lamp:#f0b43c; --lamp-ink:#1d1f27; --bad:#ff8a80; --good:#7fd9a0;
    --c-coal:#6a6f7c; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#1d1f27; --surface:#272a35; --ink:#e9e6df; --muted:#a0a5b3; --line:#3a3e4c;
  --lamp:#f0b43c; --lamp-ink:#1d1f27; --bad:#ff8a80; --good:#7fd9a0;
  --c-coal:#6a6f7c; color-scheme:dark;
}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.45 "Atkinson Hyperlegible",system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);background:var(--bg);z-index:10}
h1,h2,.num{font-family:"Bricolage Grotesque","Atkinson Hyperlegible",system-ui,sans-serif}
button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible{outline:3px solid var(--lamp);outline-offset:2px}

header{position:sticky;top:env(safe-area-inset-top,0px);background:var(--bg);z-index:9;border-bottom:1px solid var(--line)}
.bar{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 16px 6px;max-width:640px;margin:0 auto}
.bar h1{font-size:15px;margin:0;color:var(--muted);font-weight:600}
.coins{font-size:26px;font-weight:800;line-height:1}
.coins small{font-size:14px;font-weight:600;color:var(--muted);margin-left:4px}
.depth{font-size:13px;color:var(--muted);padding:0 16px 8px;max-width:640px;margin:0 auto}
.tabs{display:flex;max-width:640px;margin:0 auto}
.tabs button{flex:1;background:none;border:0;border-bottom:3px solid transparent;padding:10px 4px;font-weight:700;color:var(--muted)}
.tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--lamp)}

main{max-width:640px;margin:0 auto;padding:16px}
.panel[hidden]{display:none}

.digwrap{position:relative;display:flex;flex-direction:column;align-items:center;padding:40px 0 20px}
#dig{width:100%;min-height:54px;font-size:18px;background:var(--lamp);color:var(--lamp-ink);border:0;border-radius:10px;font-weight:800;touch-action:manipulation;user-select:none;-webkit-user-select:none}
#dig:active{transform:scale(.98)}
.mapwrap svg{display:block;width:100%;max-width:440px;height:auto;margin:0 auto;border-radius:12px;border:2px solid var(--line)}
.mapinfo{margin:10px 0 12px;font-size:15px;min-height:44px}
.mapinfo .sub{margin-top:2px}
.mk{fill:transparent;stroke:rgba(233,230,223,.6);stroke-width:5;stroke-dasharray:14 12;cursor:pointer;outline:none}
.mk:hover{stroke:#f0b43c}
.mk.sel{stroke:#f0b43c;stroke-width:7;stroke-dasharray:none;animation:mkp 1.4s ease-in-out infinite}
.mk.done{stroke:#7fd9a0;stroke-width:5;stroke-dasharray:none;animation:none}
.mk:focus-visible{stroke:#f0b43c;stroke-width:8}
@keyframes mkp{50%{stroke-opacity:.4}}
.mlabel{font-family:"Atkinson Hyperlegible",system-ui,sans-serif;font-weight:700;font-size:40px;fill:#e9e6df;stroke:#1d2230;stroke-width:9;paint-order:stroke;text-anchor:middle;pointer-events:none}
.dw{transition:transform .55s ease-in-out}
.mfloat{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:46px;fill:#e9e6df;stroke:#1d2230;stroke-width:9;paint-order:stroke;text-anchor:middle;pointer-events:none;animation:mfl 1s ease-out forwards}
@keyframes mfl{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-90px)}}
.crumb{animation:crumb .6s ease-out forwards}
@keyframes crumb{from{opacity:1;transform:translate(0,0) rotate(0)}to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--rot,90deg))}}
.float{position:absolute;pointer-events:none;font-weight:700;color:var(--ink);animation:up .8s ease-out forwards;white-space:nowrap}
@keyframes up{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-34px)}}
@media (prefers-reduced-motion:reduce){.float,.crumb{animation:none;display:none}.mk.sel,.mfloat{animation:none}.puff{display:none}.flame,.fglow{animation:none}.dw{transition:none}.bld.pop{animation:none}.win{animation:none}.zzz{animation:none}}

.list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.row{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.row[hidden]{display:none}
.chip{width:14px;height:14px;border-radius:3px;flex:none;background:var(--c)}
.grow{flex:1;min-width:0}
.name{font-weight:700}
.sub{font-size:13px;color:var(--muted)}
.amt{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:20px;text-align:right}
.btn{background:var(--ink);color:var(--bg);border:0;border-radius:8px;padding:8px 14px;font-weight:700;min-height:40px}
.btn.alt{background:none;color:var(--ink);border:1px solid var(--line)}
.btn:disabled{opacity:.35;cursor:not-allowed}
.short{color:var(--bad)}
.ok{color:var(--good)}
h2{font-size:18px;margin:22px 0 10px}
h2:first-child{margin-top:0}
.trader{background:var(--surface);border:1px solid var(--line);border-left:6px solid var(--lamp);border-radius:10px;padding:12px 14px;margin-bottom:16px}
.trader .name{font-size:18px;font-family:"Bricolage Grotesque",sans-serif}
.trader p{margin:4px 0}
.spark{width:60px;height:20px;flex:none}
.spark polyline{fill:none;stroke:var(--muted);stroke-width:1.5}
.sellbtns{display:flex;gap:6px}
.log{margin:24px 0 0;padding:0;list-style:none;font-size:14px;color:var(--muted);display:flex;flex-direction:column;gap:4px}
.log li:first-child{color:var(--ink)}
.foot{margin-top:28px;display:flex;gap:8px;flex-wrap:wrap}
.board svg{display:block;width:100%;height:auto;overflow:hidden}
.plot{fill:transparent;stroke:none;cursor:pointer;outline:none}
.plot:hover{fill:rgba(240,180,60,.16)}
.plot.block{cursor:default}
.plot.block:hover{fill:transparent}
.plot.sel{fill:rgba(240,180,60,.30);stroke:var(--lamp);stroke-width:3;stroke-linejoin:round}
.plot:focus-visible{stroke:var(--lamp);stroke-width:3}
.plot.tun:hover{fill:transparent}
.plot.tun:focus-visible{stroke:none;fill:transparent}
.bld{pointer-events:none}
.bld.pop{animation:pop .28s ease-out;transform-box:fill-box;transform-origin:50% 100%}
@keyframes pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
.plotbar{margin-top:8px}
.plotbar .row{flex-wrap:wrap}
.board{position:relative}
.board svg{transition:filter 2.5s}
.board.night svg{filter:brightness(.58) saturate(.8) hue-rotate(10deg)}
.board .sky{position:absolute;top:0;right:4px;width:48px;height:48px;pointer-events:none}
.board .sky svg{width:48px;height:48px;max-width:none;margin:0;border:0;border-radius:0;filter:none;transition:none}
.zoomc{position:absolute;right:6px;bottom:6px;display:flex;flex-direction:column;gap:6px}
.zoomc button{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:22px;font-weight:800;line-height:1;touch-action:manipulation}
.puff{fill:#e4e6eb;stroke:#1d2230;stroke-width:1.2;opacity:0;animation:puff 4s ease-out infinite;transform-box:fill-box;transform-origin:center;pointer-events:none}
@keyframes puff{0%{opacity:0;transform:translate(0,0) scale(.5)}12%{opacity:.95}100%{opacity:0;transform:translate(16px,-48px) scale(2.2)}}
.puffL{stroke-width:2.2;animation-name:puffL}
@keyframes puffL{0%{opacity:0;transform:translate(0,0) scale(.5)}12%{opacity:.95}100%{opacity:0;transform:translate(26px,-74px) scale(1.9)}}
.flame{transform-box:fill-box;transform-origin:50% 100%;animation:flick .5s ease-in-out infinite alternate;pointer-events:none}
.flame.f2{animation-duration:.37s;animation-delay:.1s}
.flame.f3{animation-duration:.43s;animation-delay:.2s}
@keyframes flick{from{transform:scale(1,.86) skewX(-3deg)}to{transform:scale(.94,1.12) skewX(3deg)}}
.fglow{animation:fglow 1.1s ease-in-out infinite alternate;pointer-events:none}
@keyframes fglow{from{opacity:.55}to{opacity:.9}}
.board .moonI{display:none}
.board.night .moonI{display:block}
.board.night .sunI{display:none}
.evtxt{font-size:17px;margin:6px 0 16px}
.evbtns{display:flex;flex-direction:column;gap:8px;margin-bottom:6px}
.evbtns .btn{min-height:48px;text-align:left}
.coins{display:flex;align-items:center;gap:6px}
.coin{width:26px;height:26px;flex:none;align-self:center}
.resbar{display:flex;flex-wrap:wrap;gap:4px 14px;padding:2px 16px 6px;max-width:640px;margin:0 auto}
.depthrow{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;max-width:640px;margin:0 auto;padding-right:16px}
.depthrow .depth{flex:1;min-width:0;margin:0;max-width:none}
.storebtn{flex:none;background:none;border:1.5px solid var(--line);border-radius:999px;padding:2px 11px;font:inherit;font-size:12px;font-weight:700;color:var(--ink);margin-top:-2px;min-height:26px}
.sicon{width:30px;height:30px;border-radius:50%;flex:none}
.sechead{list-style:none;font-size:13px;color:var(--muted);font-weight:700;margin:12px 4px 2px}
.rchip{display:inline-flex;align-items:center;gap:5px;font-weight:700;font-size:16px}
.rchip[hidden]{display:none}
.rchip img{width:26px;height:26px;border-radius:50%;flex:none}
#resList{display:none!important}
.energy{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted);margin-bottom:8px}
.enbar{flex:1;height:10px;border-radius:5px;background:var(--line);overflow:hidden}
#enFill{height:100%;width:100%;background:var(--lamp);border-radius:5px;transition:width .2s}
.room svg{display:block;width:100%;max-width:440px;height:auto;margin:0 auto;transition:filter .6s}
.room.night svg{filter:brightness(.6) saturate(.85)}
.hot{fill:transparent;cursor:pointer;outline:none}
.hot:focus-visible{stroke:var(--lamp);stroke-width:3}
.spr{transition:filter .15s}
.spr.sel{filter:drop-shadow(0 0 7px rgba(240,180,60,.95))}
.roompanel{margin-top:10px}
.list[hidden]{display:none}
.zzz{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;fill:#e9e6df;stroke:#1d2230;stroke-width:2;paint-order:stroke;animation:zzz 2.2s ease-out infinite}
@keyframes zzz{from{opacity:1;transform:translate(0,0)}to{opacity:0;transform:translate(16px,-48px)}}
.actions{display:flex;gap:8px;margin-top:12px}
.actions .btn{flex:1;min-height:46px}
.reslist{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.reslist .row{padding:8px 10px;gap:10px}
.reslist .amt{font-size:18px}
.sheet{position:fixed;inset:0;z-index:30;background:rgba(10,12,20,.55);display:flex;align-items:flex-end;justify-content:center}
.sheet[hidden]{display:none}
.win{background:var(--bg);width:min(640px,100%);max-height:92%;overflow:auto;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;padding:0 16px calc(18px + env(safe-area-inset-bottom,0px));animation:sheetUp .2s ease-out}
@keyframes sheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
.winbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;background:var(--bg);padding:14px 0 8px;z-index:2}
.winbar h2{margin:0}
.digstat{text-align:center;font-size:14px;color:var(--muted)}
.sohlen{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:6px 0 8px}
.soh{border:1.5px solid var(--line);background:var(--surface);color:var(--ink);border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;min-height:36px}
.soh.on{border-color:var(--lamp);background:var(--lamp);color:#fff;font-weight:700}
.soh:disabled{opacity:.55}
.sohinfo{flex:0 0 100%;text-align:center;font-size:13px;color:var(--muted)}
#mapWrap[data-sohle="2"] svg>image:first-child{filter:sepia(.35) hue-rotate(-12deg) saturate(1.15)}
#mapWrap[data-sohle="3"] svg>image:first-child{filter:sepia(.55) hue-rotate(-30deg) saturate(1.3) brightness(.95)}
#mapWrap[data-sohle="4"] svg>image:first-child{filter:hue-rotate(150deg) saturate(1.5) brightness(1.08)}

/* Korrekturen für kleine Bildschirme */
.bar h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.coins{white-space:nowrap;flex:none}
.btn{min-height:48px}
.zoomc button{width:46px;height:46px}
#mList .row{flex-wrap:wrap;row-gap:8px}
#mList .grow{flex:1 1 150px;min-width:150px}
#mList .sellbtns{flex:1 1 100%}
#mList .sellbtns .btn{flex:1}
.spark{flex:none}

/* Neues Layout: untere Leiste, kompakter Kopf */
.sr{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.bar{align-items:center;padding-top:8px;padding-bottom:4px}
.energyc{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--muted);flex:none}
.energyc .enbar{flex:none;width:76px;height:10px}
#enFillH{height:100%;width:100%;background:var(--lamp);border-radius:5px;transition:width .2s,background .3s}
#enFillH.low{background:var(--bad)}
.coins{flex:1}
.resbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-top:0;padding-bottom:4px}
.resbar::-webkit-scrollbar{display:none}
.rchip{flex:none;font-size:14.5px;gap:3px} .rchip img{width:22px;height:22px} .resbar{gap:4px 10px}
.depth{font-size:12px;padding-bottom:6px}
main{padding:8px 10px calc(96px + env(safe-area-inset-bottom,0px))}
.board svg{max-width:560px}
.nav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;gap:4px;background:var(--surface);border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px))}
.nav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;background:none;min-height:56px;font-size:12px;font-weight:700;color:var(--muted);border-radius:10px;touch-action:manipulation}
.nav button svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nav button:active{background:var(--line);color:var(--ink)}
.log{margin:10px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 12px;cursor:pointer;gap:6px}
.log li{display:none}
.log li:first-child{display:block}
.log.open li{display:block}
.log:empty{display:none}
.win{position:relative}
.winbar::before{content:"";position:absolute;top:5px;left:50%;width:44px;height:4px;border-radius:2px;background:var(--line);transform:translateX(-50%)}
/* Pop-up für Möbelstücke */
.xbtn{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);display:flex;align-items:center;justify-content:center;padding:0;flex:none}
.xbtn svg{width:22px;height:22px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round}
.ibtn{width:56px;height:56px;border-radius:14px;background:var(--ink);color:var(--bg);border:0;display:flex;align-items:center;justify-content:center;padding:0;flex:none}
.ibtn svg{width:30px;height:30px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.ibtn:disabled{opacity:.35;cursor:not-allowed}
.popwin .row{padding:10px}
#bedPanel .name,#firePanel .name{display:none}
.pop{position:fixed;inset:0;z-index:40;background:rgba(10,12,20,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.pop[hidden]{display:none}
.popwin{background:var(--bg);width:min(460px,100%);max-height:82%;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:0 14px 14px}
.popbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;background:var(--bg);padding:12px 0 8px;z-index:2}
.popbar h2{margin:0}
.room svg{max-width:560px}

/* Kleinere Schrift in Pop-ups und im Ereignis-Fenster */
.popwin{font-size:14px;line-height:1.35}
.popwin .name{font-size:15px}
.popwin .sub{font-size:12.5px;margin-top:1px}
.popwin h2{font-size:16px;margin:14px 0 8px}
.popwin .popbar h2{font-size:18px;margin:0}
.popwin .btn{font-size:14px;min-height:44px;padding:6px 12px}
.popwin .row{gap:10px}
#s-event .win{font-size:15px}
#s-event h2{font-size:18px}
.evtxt{font-size:15px;margin:4px 0 14px}
.evbtns .btn{font-size:15px;min-height:46px}

/* Auswahlleiste: Text oben, Knöpfe darunter */
.plotbar .grow{flex:1 1 100%;min-width:0}
.plotbar .sellbtns{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px}
.plotbar .sellbtns .btn{flex:1 1 130px}

.plotbar .sellbtns.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.plotbar .sellbtns.grid3 .btn{flex:none}
.bbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:13px;line-height:1.15;padding:6px 6px;min-height:54px;text-align:center}
.bbtn small{font-size:10.5px;font-weight:400;opacity:.85}
.orient{display:flex;gap:8px;flex:1 1 100%;margin-bottom:6px}
.orient .btn{flex:1;min-height:40px;font-size:13px}
.btn.alt.on{background:var(--lamp);color:var(--lamp-ink);border-color:var(--lamp)}

/* Symbol-Knöpfe in der Auswahlleiste */
.plotbar .grow{flex:1 1 150px}
.plotbar .row{align-items:center;row-gap:8px}
.ibar{display:flex;gap:6px;flex:0 0 auto;flex-wrap:wrap}
.ib{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:56px;min-height:52px;border-radius:12px;border:0;background:var(--ink);color:var(--bg);padding:4px 6px;touch-action:manipulation}
.ib.alt{background:none;color:var(--ink);border:1px solid var(--line)}
.ib.alt.on{background:var(--lamp);color:var(--lamp-ink);border-color:var(--lamp)}
.ib svg{width:24px;height:24px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ib small{font-size:10px;line-height:1.1;font-weight:700}
.ib:disabled{opacity:.35;cursor:not-allowed}
.bgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;flex:1 1 100%}
.bcell{min-width:0;padding:5px 2px;min-height:62px}
.bcell .bl{font-size:10.5px;font-weight:700;line-height:1.1}
#boardWrap>svg{border-radius:14px;border:2px solid var(--line)}
.zoomc button svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.lh{font-weight:800;font-size:16px;margin:12px 0 2px;list-style:none}
.rchip .ico{width:26px;height:26px;border-radius:50%;background:var(--ink);color:var(--bg);display:flex;align-items:center;justify-content:center;flex:none}
.rchip .ico svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bgrid{grid-template-columns:repeat(6,1fr)}
.bcell .bl{font-size:9.5px;letter-spacing:-.2px}
.nav button{position:relative;font-size:11px}
.badge{position:absolute;top:2px;right:calc(50% - 22px);min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--lamp);color:var(--lamp-ink);font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center}
.pbar{height:8px;border-radius:6px;background:var(--line);overflow:hidden;margin:6px 0 4px}
.pbar i{display:block;height:100%;width:0;background:var(--lamp)}
.lvlbox{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin:0 0 10px}
.lvlbox .name{font-weight:800;font-size:17px}
.tk.ready{outline:2px solid var(--lamp)}
#toast{position:fixed;left:12px;right:12px;top:calc(12px + env(safe-area-inset-top,0px));z-index:60;background:var(--ink);color:var(--bg);border-radius:14px;padding:12px 14px;font-weight:700;text-align:center;box-shadow:0 6px 22px rgba(0,0,0,.3)}
.zoomc button.on{background:var(--lamp);color:var(--lamp-ink);border-color:var(--lamp)}
.hint{margin:10px 0 0;padding:10px 12px;border:1px solid var(--lamp);border-radius:10px;background:var(--surface);color:var(--ink);font-size:14px}
.hint[hidden]{display:none}
.tbadge{display:inline-block;margin-left:8px;padding:1px 9px;border-radius:999px;font:700 12px/1.6 "Atkinson Hyperlegible",system-ui,sans-serif;vertical-align:middle;background:var(--line);color:var(--ink)}
.tbadge.up{background:var(--good);color:var(--lamp-ink)}
.tbadge.down{background:var(--bad);color:var(--lamp-ink)}
.tbadge[hidden]{display:none}
.sub.mute{font-size:13px;color:var(--muted)}
.row.deal{box-shadow:inset 4px 0 0 var(--good)}
.hint.fb{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hint.fb[hidden]{display:none}
.hint.fb span{flex:1 1 200px}
.hint.fb a{color:var(--lamp);font-weight:700}
.hint.fb button{flex:none;width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:var(--bg);color:var(--ink);font-size:22px;line-height:1;padding:0}
#nameDlg{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.55)}
#nameDlg[hidden]{display:none}
#nameDlg .nbox{width:100%;max-width:340px;padding:18px;border-radius:14px;background:var(--surface);color:var(--ink);border:1px solid var(--line)}
#nameDlg h2{margin:0 0 6px;font-size:18px}
#nameDlg p{margin:0 0 12px;font-size:14px;color:var(--muted)}
#nameDlg input{width:100%;box-sizing:border-box;padding:10px 12px;font:inherit;font-size:16px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink)}
#nameDlg .nrow{display:flex;gap:8px;margin-top:12px}
#nameDlg .nrow .btn{flex:1}
#s-mine .win{padding-bottom:0}
#s-mine .winbar{padding:10px 0 4px}
#s-mine .digstat{font-size:13px}
#s-mine .sohlen{gap:4px;margin:4px 0 6px}
#s-mine .soh{padding:3px 10px;font-size:12px;min-height:30px}
#s-mine .sohinfo{font-size:12px}
#s-mine .mapwrap svg{width:auto;max-width:100%;max-height:min(44vh,440px)}
#s-mine .mapinfo{margin:6px 0 4px;font-size:14px;min-height:0}
#s-mine .digbar{position:sticky;bottom:0;z-index:3;display:flex;justify-content:center;margin-top:6px;padding:8px 0 calc(10px + env(safe-area-inset-bottom,0px));background:var(--bg);border-top:1px solid var(--line)}
#s-mine #dig{width:auto;min-width:140px;min-height:44px;padding:0 24px;font-size:15px}
.mapwrap svg{-webkit-user-select:none;user-select:none}
.dwhit{fill:transparent;stroke:none;cursor:pointer;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.dwhit:focus-visible{stroke:var(--lamp);stroke-width:6}
.dwhit.pulse{stroke:var(--lamp);stroke-width:5;stroke-dasharray:14 10;animation:dwp 1.6s ease-in-out infinite}
@keyframes dwp{0%,100%{stroke-opacity:.15}50%{stroke-opacity:.9}}
@media (prefers-reduced-motion:reduce){.dwhit.pulse{animation:none;stroke-opacity:.7}}
