*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:#0d1220;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  user-select:none;-webkit-user-select:none;touch-action:none;overscroll-behavior:none}
#play{position:fixed;inset:0}
#view{position:absolute;inset:0;width:100%;height:100%;display:block}

#hud{position:absolute;top:0;left:0;right:0;display:flex;gap:8px;align-items:center;
  padding:8px 10px;z-index:10;opacity:0;transition:.2s;flex-wrap:wrap}
#hud.on{opacity:1}
.chip{background:rgba(10,16,32,.72);color:#fff;border-radius:999px;padding:5px 13px;
  font-size:clamp(14px,3.6vw,17px);font-weight:800}
.chip.low{background:rgba(170,40,40,.85);animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.5}}
.bars{display:flex;gap:5px}
/* Compact chips, not full-width bars — stretched across the screen the four
   of them read as one long smear rather than four scores. */
.bar{position:relative;width:clamp(52px,13vw,68px);height:22px;border-radius:99px;
  overflow:hidden;background:rgba(10,16,32,.72);display:flex;align-items:center;
  justify-content:center}
.bar i{position:absolute;left:0;top:0;bottom:0;background:var(--c);opacity:.85;transition:width .2s}
.bar b{position:relative;font-size:12px;color:#fff;font-weight:800;
  text-shadow:0 1px 3px rgba(0,0,0,.9)}
.bar.dead{opacity:.32}

#pad{position:absolute;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));
  display:flex;flex-direction:column;align-items:center;gap:6px;z-index:11}
#pad .mid{display:flex;gap:6px}
/* Kept see-through so you can still read the board underneath them. */
#pad button{width:clamp(50px,13vw,64px);height:clamp(50px,13vw,64px);border:0;border-radius:16px;
  font-size:clamp(17px,4.4vw,22px);color:rgba(255,255,255,.85);background:rgba(18,26,48,.34);
  cursor:pointer;backdrop-filter:blur(2px);box-shadow:0 4px 0 rgba(0,0,0,.22)}
#pad button:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(0,0,0,.3)}

#menu,#over{position:absolute;inset:0;display:none;place-items:center;z-index:30;
  background:rgba(8,12,26,.7);backdrop-filter:blur(3px);padding:12px;overflow:auto}
#menu.on,#over.on{display:grid}
.card{width:min(94vw,440px);background:#f6f3ea;border-radius:22px;padding:20px;
  text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.5);margin:auto}
.card h1{margin:0 0 8px;font-size:clamp(27px,7.5vw,42px)}
.tag{margin:0 0 14px;font-size:clamp(13px,3.3vw,15px);line-height:1.55;opacity:.8}
.tag.small{font-size:13px;opacity:.65;margin-bottom:10px}
.line{margin:0 0 12px;font-size:17px}
.lvls{display:grid;gap:8px;margin-bottom:6px}
.lvlbtn{border:0;border-radius:15px;padding:15px;font-size:18px;font-weight:800;
  color:#fff;cursor:pointer}
.easy{background:#48a860;box-shadow:0 5px 0 #2f7a44}
.med{background:#3f7fe0;box-shadow:0 5px 0 #2a5aa8}
.hard{background:#c8483f;box-shadow:0 5px 0 #93302a}
.lvlbtn:active{transform:translateY(3px)}
.table{display:grid;gap:6px;margin-bottom:12px}
.row{display:flex;align-items:center;gap:9px;background:#fff;border-radius:12px;
  padding:9px 12px;font-size:15px;font-weight:700}
.row.me{outline:3px solid #e8534a}
.row i{width:18px;height:18px;border-radius:5px;flex:none}
.row b{margin-left:auto;font-size:17px}
.big{display:block;width:100%;margin:8px 0 0;border:0;border-radius:16px;padding:15px;
  background:#48a860;color:#fff;font-size:19px;font-weight:800;cursor:pointer;box-shadow:0 5px 0 #2f7a44}
.big.ghost{background:#e2ddd0;color:#3a3a40;box-shadow:0 5px 0 #c8c2b2}
.big:active{transform:translateY(3px)}
