/* Minesweeper — game-specific */
.diff-seg { display:flex; gap:8px; }
.diff-seg button { flex:1; }
.game-shell { max-width:520px; }

.flag-toggle { font-size:22px; }
.flag-toggle.active { background:var(--yellow); }

.board-wrap { flex:1; display:flex; align-items:center; justify-content:center; }
.ms-board {
  display:grid; gap:3px; padding:8px;
  background:var(--wood-deep); border:5px solid var(--stroke); border-radius:16px;
  box-shadow:0 6px 0 var(--stroke); touch-action:manipulation;
  grid-template-columns:repeat(var(--cols), 1fr); width:100%; max-width:460px;
}
.ms-cell {
  aspect-ratio:1; border:none; cursor:pointer; padding:0;
  border-radius:6px; font-weight:800; font-size:15px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  background:var(--green); border-bottom:3px solid rgba(0,0,0,0.18);
  color:var(--stroke); transition:background 0.12s;
}
.ms-cell:active { transform:translateY(1px); }
.ms-cell.flag { background:var(--yellow); }
.ms-cell.revealed {
  background:var(--card); border-bottom:3px solid rgba(0,0,0,0.06); cursor:default;
}
.ms-cell.revealed.mine { background:var(--pink); }
.ms-cell.boom { background:#ff3b30 !important; animation:boom 0.4s; }
@keyframes boom { 0%{transform:scale(1.3);} 100%{transform:scale(1);} }
.ms-cell.pop { animation:msPop 0.25s var(--bounce); }
@keyframes msPop { 0%{transform:scale(0.7);} 100%{transform:scale(1);} }

.n1{color:#3DC2FF;} .n2{color:#2fae57;} .n3{color:#FF5DAA;} .n4{color:#A855F7;}
.n5{color:#FF8A3D;} .n6{color:#39CCCC;} .n7{color:#1C1814;} .n8{color:#9a8f7d;}

@media (max-width:430px){ .ms-cell{ font-size:12px; } }
