.sm-game {
  --sm-grass:#d3dfa1; --sm-cover:#b6d192; --sm-ink:#202b51; --sm-line:#607453; --sm-side:8;
  max-width:35.5rem; margin-inline:auto; color:var(--sm-ink); box-sizing:border-box;
}
.sm-game[data-side="10"] {--sm-side:10}
.sm-meta,.sm-modes {display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.sm-meta {justify-content:flex-start;padding:.2rem 0 .6rem;font-size:.86rem}
.sm-meta span {display:inline-flex;align-items:center;gap:.28rem}
.sm-meta span+span {margin-left:.36rem}
.sm-meta .sm-count {margin-left:auto}
.sm-meta svg {height:1rem;width:1rem}
.sm-map {
  display:grid;grid-template-columns:minmax(12px,1.15rem) minmax(0,1fr);
  grid-template-rows:1.05rem auto; column-gap:2px;row-gap:2px;
  padding:clamp(3px,1.3vw,9px);border:1.5px solid #9c9f72;border-radius:12px;
  background:repeating-linear-gradient(114deg,transparent 0 9px,#dace8f25 10px 11px),#f7efce;
}
.sm-x,.sm-y {font:700 clamp(9px,1.7vw,12px)/1 system-ui;color:#465243}
.sm-x {grid-column:2;display:grid;grid-template-columns:repeat(var(--sm-side),minmax(0,1fr))}
.sm-y {grid-column:1;display:grid;grid-template-rows:repeat(var(--sm-side),minmax(0,1fr))}
.sm-x span,.sm-y span {align-self:center;justify-self:center}
.sm-grid {
  grid-column:2;display:grid;grid-template-columns:repeat(var(--sm-side),minmax(0,1fr));
  border:2px solid #344e4c;border-radius:4px;overflow:visible;
  background:var(--sm-line);gap:1px;align-self:start;
}
.classic-table .sm-cell {
  appearance:none;position:relative;display:grid;place-items:center;width:100%;aspect-ratio:1;
  height:auto;min-width:0;min-height:0;padding:0; margin:0;border:0;border-radius:0;
  font:800 clamp(16px,4vw,28px)/1 system-ui,sans-serif;color:var(--sm-ink);
  background:#fcf7df;box-shadow:none;touch-action:manipulation;font-variant-numeric:tabular-nums;
}
.classic-table .sm-cell.sm-cover,.classic-table .sm-cell.sm-flag,.classic-table .sm-cell.sm-wrong {
  background:linear-gradient(143deg,var(--sm-grass) 0%,var(--sm-cover) 75%);box-shadow:inset 1.5px 1.5px 0 #eff5c6,inset -1.5px -1.5px 0 #829f72;
}
.sm-cell.sm-cover::after {content:"";position:absolute;width:12%;height:1.5px;background:#46655752;bottom:21%;right:16%;transform:rotate(-37deg)}
.classic-table .sm-cell.sm-n1 {color:#244f9e}.classic-table .sm-cell.sm-n2 {color:#276744}
.classic-table .sm-cell.sm-n3 {color:#9b3943}.classic-table .sm-cell.sm-n4 {color:#5a4384}
.classic-table .sm-cell.sm-n5 {color:#8b4228}.classic-table .sm-cell.sm-n6 {color:#176970}
.classic-table .sm-cell.sm-burst {background:#f2ad88;color:#722c26}
.classic-table .sm-cell.sm-mine {background:#f8dba1}
.classic-table .sm-cell:disabled {opacity:1;cursor:default}
.sm-cell svg {width:62%;height:62%;pointer-events:none}.sm-wrong i {position:absolute;right:0;bottom:0;color:#972d2d;font-style:normal;line-height:1}
.classic-table .sm-cell:focus-visible,.classic-table .sm-cell.lesson-target {outline:3px solid #2548af;outline-offset:-3px;z-index:1}
.classic-table .sm-cell.lesson-target {outline-style:dashed}
.sm-modes {justify-content:center;padding-top:.65rem}
.classic-table .sm-modes button {display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:.32rem;padding:.45rem .78rem;border:1.5px solid #929779;border-radius:9px;background:#fffbeb;color:#263758;font:700 .92rem/1.1 system-ui}
.classic-table .sm-modes button[aria-pressed="true"] {background:#f7ce58;border-color:#334870;box-shadow:inset 0 -2px #dda43b}
.sm-modes svg {width:1.22rem;height:1.22rem}
@media(hover:hover){.classic-table .sm-cell.sm-cover:not(:disabled):hover {background:#e1e7a4;box-shadow:inset 0 0 0 2px #466976}}
@media(max-width:400px){.sm-meta{gap:.18rem;font-size:.75rem}.sm-map{padding:2px}.sm-meta svg{width:.9rem}.sm-map{grid-template-columns:12px minmax(0,1fr)}}
.sm-scroll {max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.sm-zoom {text-align:center;font-size:.85rem;margin-top:.2rem}
.sm-zoom summary {list-style:none;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding-inline:.6rem;color:#324c82;text-decoration:underline;text-underline-offset:.2em;cursor:pointer}
.sm-zoom summary::-webkit-details-marker {display:none}
.sm-zoom summary span+span,.sm-zoom[open] summary span:first-child {display:none}
.sm-zoom[open] summary span+span {display:inline}
.sm-zoom p {margin:0 auto .35rem;max-width:26rem}
.sm-game:has(.sm-zoom[open]) .sm-map {box-sizing:border-box;min-width:calc(var(--sm-side) * 48px + 40px)}
@media(min-width:700px){.sm-game[data-side="8"] .sm-zoom {display:none}}
