/* Michi – Look „B1 – Nebel“. Referenz: docs/design/mockup-b1.dc.html */
@font-face{font-family:"Shippori Mincho";src:url(fonts/shippori-mincho-500.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Shippori Mincho";src:url(fonts/shippori-mincho-700.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Yuji Syuku";src:url(fonts/yuji-syuku-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}

:root{
  --bg:#D6D4CE; --text:#1B1A17; --muted:#55524B; --rule:#9C988F; --line:#B8321F; --ember:#C2551A;
  --tile:#E6E3DB; --tile-edge:#5E5A52;
  --mincho:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho",Georgia,serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font-family:var(--mincho);font-weight:500;overflow:hidden;overscroll-behavior:none;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-text-size-adjust:100%;touch-action:manipulation}
button{font:inherit;color:inherit;border:0;background:none;padding:0;margin:0;cursor:pointer;touch-action:manipulation}
#app{position:fixed;inset:0;overflow:hidden}
/* Lage aller Teile kommt aus layout() in game.js (CSS-Variablen auf #app) */
#stage{position:absolute;left:0;top:0;width:100%;height:100%;display:block}

.lbl{font-size:10px;letter-spacing:2px;color:var(--muted);white-space:nowrap}
.num{font-size:24px;font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums lining-nums}

#top{position:absolute;left:calc(28px + env(safe-area-inset-left,0px));right:calc(28px + env(safe-area-inset-right,0px));top:var(--hdr-top);height:var(--hdr-h);
  display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none}
.ttl{display:flex;flex-direction:column;gap:4px}
.ttl .lbl{font-size:11px;letter-spacing:3px}
.word{font-size:26px;font-weight:700;letter-spacing:8px;line-height:1.15}
.stats{display:flex;gap:18px;align-items:flex-end}
.stat{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.stat.fuse{display:none}
body.fuse.ignited .stat.fuse{display:flex}
.stat.fuse .num{color:var(--ember)}

#hand{position:absolute;left:0;right:0;top:var(--hand-top);display:flex;justify-content:center;gap:10px}
.ht{padding:4px;border:1px solid transparent;border-radius:4px;line-height:0}
.ht.sel{border-color:var(--line)}
.ht svg{width:64px;height:64px;display:block}

#hint{position:absolute;left:0;right:0;top:var(--hint-top);height:24px;display:flex;justify-content:center;align-items:center;gap:8px;font-size:12px;letter-spacing:2px;color:var(--muted)}
#hint.off{visibility:hidden}
svg.ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

#btns{position:absolute;left:calc(28px + env(safe-area-inset-left,0px));right:calc(28px + env(safe-area-inset-right,0px));top:var(--btn-top);display:flex;justify-content:space-between;pointer-events:none}
.rb{pointer-events:auto;width:44px;height:44px;border-radius:22px;border:1px solid var(--rule);display:flex;align-items:center;justify-content:center;color:var(--text)}
.rb:active,.ht:active{transform:scale(.96)}
.rb{position:relative}
.rb[hidden]{display:none}
.rb[aria-disabled="true"]{opacity:.35}
.rb[aria-disabled="true"]:active{transform:none}
.rb .cnt{position:absolute;right:-3px;top:-3px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--bg);border:1px solid var(--rule);
  font-family:var(--mincho);font-weight:700;font-size:12px;line-height:16px;text-align:center;color:var(--text);pointer-events:none;font-variant-numeric:lining-nums}

#hand{touch-action:none}
.ht.lifted{opacity:.3}
.ghost{position:fixed;left:0;top:0;width:64px;height:64px;pointer-events:none;z-index:20;line-height:0;filter:drop-shadow(0 4px 6px rgba(27,26,23,.25))}
.ghost svg{width:64px;height:64px;display:block}

#end{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;background:rgba(214,212,206,.82);animation:endin .35s ease-out}
#end[hidden]{display:none}
@keyframes endin{from{opacity:0}to{opacity:1}}
.endbox{display:flex;flex-direction:column;align-items:center;gap:14px;padding:0 28px;width:100%;max-width:340px}
.endbox .lbl{font-size:11px;letter-spacing:3px}
.endbox .big{font-size:96px;font-weight:700;line-height:1;color:var(--line);font-variant-numeric:tabular-nums lining-nums}
.rows{width:100%;border-top:1px solid var(--rule);margin-top:6px}
.row{display:flex;justify-content:space-between;padding:10px 2px;border-bottom:1px solid var(--rule);font-size:15px;letter-spacing:1px;color:var(--muted)}
.row b{color:var(--text);font-size:18px}
.acts{display:flex;gap:10px;margin-top:10px}
.acts .pill{min-width:84px;padding:0 14px;font-size:15px;letter-spacing:1px}
.pill{min-width:120px;height:48px;padding:0 22px;border-radius:24px;border:1px solid var(--rule);font-size:16px;letter-spacing:2px;color:var(--text)}
.pill.pri{background:var(--text);color:var(--bg);border-color:var(--text)}
.pill:active{transform:scale(.97)}

/* Fuse: Pause (deckt alles ab) und Hinweiskarte */
#pause{position:absolute;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;background:var(--bg);cursor:pointer}
#pause[hidden],#intro[hidden]{display:none}
#pause .big{font-size:44px;font-weight:700;letter-spacing:6px;color:var(--text)}
.pbox{display:flex;flex-direction:column;align-items:center;gap:16px;padding:0 28px;max-width:340px;text-align:center}
#intro{position:absolute;inset:0;z-index:35;display:flex;align-items:center;justify-content:center;background:rgba(214,212,206,.9)}
#intro p{margin:0;font-size:17px;line-height:1.5;color:var(--text)}

/* Bildschirme: Menü, Scores, Intro, Tutorial, Endbildschirm-Zusätze */
.screen{position:absolute;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:var(--bg);animation:endin .3s ease-out;overflow-y:auto}
.screen[hidden],#splash[hidden],#tut[hidden]{display:none}
.mbox{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;max-width:340px;padding:max(20px,env(safe-area-inset-top,0px)) 28px max(20px,env(safe-area-inset-bottom,0px));margin:auto}
.mbox .word.big{font-size:40px;letter-spacing:12px;padding-left:12px}
.mbox>.lbl{letter-spacing:4px}
.shapesw{display:flex;width:216px;margin-top:6px;border:1px solid var(--rule);border-radius:22px;overflow:hidden}
.shapesw button{flex:1;min-height:44px;font-size:14px;letter-spacing:2px;color:var(--muted)}
.shapesw button.on{background:var(--text);color:var(--bg)}
.shapesw button:not(.on):active{background:rgba(27,26,23,.06)}
.mlist{width:100%;display:flex;flex-direction:column;margin:10px 0 6px;border-top:1px solid var(--rule)}
.mi{min-height:52px;display:flex;justify-content:space-between;align-items:center;padding:0 4px;border-bottom:1px solid var(--rule);font-size:18px;letter-spacing:3px;text-align:left}
.mi small{font-size:11px;letter-spacing:2px;color:var(--muted)}
.mi.pri{color:var(--line);font-weight:700}
.mi:active{background:rgba(27,26,23,.06)}
.tog{display:flex;gap:12px}
.tog .pill{min-width:0;height:44px;padding:0 16px;font-size:13px}
.tog .pill.off,#sndBtn.off{opacity:.45}
@media (max-height:700px){.mi{min-height:46px;font-size:16px}.mbox{gap:8px}.mbox .word.big{font-size:32px}.mlist{margin:4px 0}}

.tabs{display:flex;width:100%;border-bottom:1px solid var(--rule)}
.tabs button{flex:1;min-height:44px;font-size:12px;letter-spacing:0;white-space:nowrap;color:var(--muted);border-bottom:2px solid transparent}
.tabs button.on{color:var(--text);border-bottom-color:var(--line)}
.slist{list-style:none;margin:0;padding:0;width:100%;min-height:236px}
.slist li{display:flex;justify-content:space-between;padding:6px 2px;border-bottom:1px solid var(--rule);font-size:15px;color:var(--muted)}
.slist li b{color:var(--text);font-size:17px;font-variant-numeric:tabular-nums lining-nums}
.slist li.empty{justify-content:center;border:0;padding-top:30px}
#statRows{margin-top:0}
#statRows .row{padding:6px 2px;font-size:14px}
#statRows .row b{font-size:16px}

#splash{position:absolute;inset:0;z-index:60;background:var(--bg)}
#splashSvg{position:absolute;inset:0;width:100%;height:100%;display:block}
#splash .stxt{position:absolute;left:0;right:0;bottom:16%;display:flex;flex-direction:column;align-items:center;gap:8px;opacity:0}
#splash .word.big{font-size:44px;letter-spacing:14px;padding-left:14px}
#splash .lbl{letter-spacing:5px}

#tut{position:absolute;inset:0;z-index:25;pointer-events:none}
.tcard{position:absolute;left:calc(20px + env(safe-area-inset-left,0px));right:calc(20px + env(safe-area-inset-right,0px));top:var(--hint-top);bottom:max(6px,env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:12px;pointer-events:auto}
.ttext{flex:1;font-size:14px;line-height:1.35;color:var(--text)}
.tcard .pill{min-width:84px;height:44px;padding:0 16px;font-size:15px}
.skip{position:absolute;right:calc(28px + env(safe-area-inset-right,0px));top:var(--hdr-top);height:44px;min-width:44px;padding:0 6px;font-size:13px;letter-spacing:2px;color:var(--muted);pointer-events:auto}
body.tut #hint,body.tut #btns,body.tut .stats{display:none}

.endbox .note{font-size:12px;letter-spacing:3px;color:var(--muted);min-height:14px;margin-top:-6px}
.endbox .note.rec{color:var(--line);font-weight:700}
.share{display:flex;flex-direction:column;align-items:center;gap:6px}
.share[hidden]{display:none}
.share .pill{min-width:120px}
#shareTxt{margin-top:0;font-size:13px;letter-spacing:1px}
#end{overflow-y:auto}

.endlist{min-height:0;margin-top:-4px}
.endlist li{padding:3px 2px;font-size:13px}
.endlist li b{font-size:14px}
.endlist li.me,.endlist li.me b{color:var(--line);font-weight:700}
.endbox{margin:auto;padding-top:16px;padding-bottom:16px}
@media (max-height:760px){.endbox .big{font-size:60px}.endbox{gap:8px}}
