/* Pelit/miinaharava (16.11.2026). Perustyylit tulevat ../ristinolla.css:stä. Vain lauta ja laskurit. */
.mh-laskuri { margin: 0; font-variant-numeric: tabular-nums; }
/* Miinat ja aika laudan yläpuolella laudan levyisenä (17.11.2026; ennen tilarivin oikeassa reunassa kaukana laudasta) */
.mh-palkki { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-weight: 600; }
.tila.mh-havio { color: #c62828; }

.mh-kehys { width: min(100%, calc(var(--mh-sarakkeet, 9) * 34px)); }
.mh-lauta {
  display: grid;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px;
  background: #bdbdbd;
  border: 2px solid #9e9e9e;
  border-radius: 6px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}
.mh-ruutu {
  aspect-ratio: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: transparent;
  background: #d5d5d5;
}
@supports (font-size: 1cqi) {
  .mh-lauta { container-type: inline-size; }
  .mh-ruutu { font-size: calc(55cqi / var(--mh-sarakkeet, 9)); }
}
.mh-ruutu.mh-suljettu {
  background: #e6e6e6;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #8d8d8d;
}
.mh-ruutu.mh-avattu { background: #f3f3f3; box-shadow: none; cursor: default; }
.mh-ruutu.mh-n1 { color: #1976d2; }
.mh-ruutu.mh-n2 { color: #2e7d32; }
.mh-ruutu.mh-n3 { color: #d32f2f; }
.mh-ruutu.mh-n4 { color: #1565c0; }
.mh-ruutu.mh-n5 { color: #8d1e1e; }
.mh-ruutu.mh-n6 { color: #00838f; }
.mh-ruutu.mh-n7 { color: #212121; }
.mh-ruutu.mh-n8 { color: #757575; }
.mh-ruutu.mh-lippu, .mh-ruutu.mh-miina {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 62%;
}
.mh-ruutu.mh-lippu {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2v12' stroke='%235d4037' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M5 2.5h7l-2 2.5 2 2.5H5z' fill='%23c62828'/%3E%3C/svg%3E");
}
.mh-ruutu.mh-miina {
  background-color: #ececec;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3.1' fill='%23222'/%3E%3Cpath d='M8 1.4v2.6M8 12v2.6M1.4 8h2.6M12 8h2.6M3.3 3.3l1.8 1.8M10.9 10.9l1.8 1.8M12.7 3.3l-1.8 1.8M5.1 10.9l-1.8 1.8' stroke='%23222' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  box-shadow: none;
}
.mh-ruutu.mh-osuma { background-color: #e53935; }
.mh-ruutu.mh-vaara { background: #ffcdd2; color: #b71c1c; box-shadow: none; cursor: default; }
.mh-ruutu.mh-vaara::after { content: "×"; font-size: 1.15em; line-height: 1; }
.mh-ruutu:focus-visible { outline: 2px solid var(--korostus); outline-offset: -2px; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .mh-ruutu { transition: none; }
}
