/* game.css - Mole March. Field notebook look: cream paper, ink outlines, hard offset shadows. */
.mm{--ink:#2b2118;--paper:#f6eedb;--turf:#3E5C2B;--soil:#4a3322;--amber:#f2b632;--rust:#b9583a;--slate:#56789e;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.mm button{font:inherit;color:var(--ink);cursor:pointer;touch-action:manipulation}
.mm-hud{display:flex;justify-content:space-between;align-items:center;gap:.6rem;margin-bottom:.5rem;min-height:44px}
.mm-name{display:flex;flex-direction:column;min-width:0}
.mm-name b{font-size:.98rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mm-name span{font-size:.74rem;color:#6a5640}
.mm-pips{display:flex;flex-direction:column;gap:3px;align-items:flex-end}
.mm-pips .pg{display:flex;align-items:center;gap:4px}
.mm-pips em{font-style:normal;font-size:.66rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#6a5640;margin-right:2px}
.mm-pips i{width:13px;height:13px;border-radius:50%;border:2px solid var(--ink);background:transparent;display:inline-block}
.mm-pips i.me.on{background:var(--slate)}.mm-pips i.foe.on{background:var(--rust)}
.mm-board{position:relative;background:var(--soil);border:3px solid var(--ink);border-radius:12px;box-shadow:4px 4px 0 var(--ink);min-height:300px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:0}
.mm-board canvas{display:block;touch-action:none;max-width:100%;cursor:pointer}
.mm-ov{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(36,24,14,.72);padding:12px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.mm-ov.on{display:flex}
.card{background:var(--paper);border:3px solid var(--ink);border-radius:12px;box-shadow:4px 4px 0 var(--ink);padding:14px;width:100%;max-width:330px;margin:auto;display:flex;flex-direction:column;gap:8px;text-align:center}
.card h2{font-size:1.4rem;font-weight:900}
.logo{display:flex;flex-direction:column;line-height:.92;font-weight:900;font-size:2.5rem;letter-spacing:.04em;color:var(--turf);text-shadow:2px 2px 0 var(--ink);padding-bottom:10px;background:radial-gradient(ellipse 22% 9px at 25% 100%,#6b4a2c 98%,transparent) ,radial-gradient(ellipse 18% 8px at 52% 100%,#6b4a2c 98%,transparent),radial-gradient(ellipse 24% 10px at 78% 100%,#6b4a2c 98%,transparent);background-repeat:no-repeat}
.logo span:nth-child(2){color:var(--rust)}
.pitch{font-size:.9rem;line-height:1.35}
.how{font-size:.78rem;line-height:1.45;color:#5b4a37;text-align:left}
.best{font-size:.78rem;font-weight:700;color:#5b4a37}
.unlock{font-size:.85rem;font-weight:800;color:var(--turf)}
.score{font-size:2.2rem;font-weight:900;line-height:1}
.btn{min-height:46px;padding:0 14px;background:#fffaf0;border:3px solid var(--ink);border-radius:10px;box-shadow:3px 3px 0 var(--ink);font-weight:800;font-size:.95rem;transition:transform .08s,box-shadow .08s}
.btn:active:not(:disabled){transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.btn.pri{background:var(--amber)}
.btn.sm{min-height:44px;font-size:.82rem}
.btn:disabled{opacity:.45;cursor:default}
.btn:focus-visible,.lv:focus-visible{outline:3px solid #1c6fd1;outline-offset:2px}
.mm-status{min-height:2.6em;margin:.55rem 0 .5rem;font-size:.86rem;line-height:1.3;text-align:center;font-weight:600}
.mm-bar{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:8px}
.mm-bar.two{grid-template-columns:1fr 1fr;margin-top:8px}
.mm-keys{font-size:.7rem;color:#6a5640;text-align:center;margin-top:.7rem;line-height:1.4}
.lvgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.lv{min-height:54px;background:#fffaf0;border:3px solid var(--ink);border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.95rem}
.lv.lock{opacity:.4}
.stars{display:flex;gap:2px;justify-content:center;min-height:9px}
.stars i{width:9px;height:9px;border:2px solid var(--ink);transform:rotate(45deg);background:transparent;display:inline-block}
.stars i.f{background:var(--amber)}
.res.win h2{color:var(--turf)}.res.lose h2{color:var(--rust)}
.res .stars{margin:4px 0}.res .stars i{width:16px;height:16px;margin:0 5px}
.rules{list-style:none;text-align:left;font-size:.85rem;display:grid;gap:3px}
@media (prefers-reduced-motion:reduce){.btn,.btn:active{transition:none}}
@media (max-width:360px){.logo{font-size:2.1rem}.mm-bar{gap:6px}.btn{padding:0 8px;font-size:.85rem}}
.tip{font-size:.8rem;line-height:1.4;color:#5b4a37;background:rgba(62,92,43,.12);border-radius:8px;padding:6px 8px;text-align:left}

/* full screen (native and immersive): board fills the stage, controls stay on screen */
html.pip-immersive .game-wrap.pip-stage{display:flex;flex-direction:column;overflow:hidden;padding-left:8px;padding-right:8px;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
html.pip-immersive .mm{flex:1;min-height:0;display:flex;flex-direction:column}
html.pip-immersive .mm-hud{margin-bottom:4px;flex:none}
html.pip-immersive .mm-board{flex:1;min-height:0;box-shadow:none;border-width:2px}
html.pip-immersive .mm-status{flex:none;min-height:0;margin:6px 0;font-size:.82rem}
html.pip-immersive .mm-bar,html.pip-immersive .mm-bar.two{flex:none}
html.pip-immersive .mm-bar.two{margin-top:6px}
html.pip-immersive .mm-keys{display:none}
html.pip-immersive .mm-board canvas{max-height:100%}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .mm{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,230px);grid-template-rows:auto auto auto auto 1fr;column-gap:10px}
  html.pip-immersive .mm-board{grid-column:1;grid-row:1 / -1}
  html.pip-immersive .mm-hud{grid-column:2;grid-row:1}
  html.pip-immersive .mm-status{grid-column:2;grid-row:2}
  html.pip-immersive .mm-bar{grid-column:2;grid-row:3;grid-template-columns:1fr 1fr}
  html.pip-immersive .mm-bar .btn.pri{grid-column:1 / -1}
  html.pip-immersive .mm-bar.two{grid-column:2;grid-row:4}
}
