/* `inset`, `margin-inline`/`margin-block`/`padding-inline` and flex `gap` all arrived in
   Safari 14.1, so this matches exactly the browsers (iOS 14) that have none of them. Values
   mirror site.css. */
@supports not (inset: 0) {
  .game-root[data-game="minesweeper"] .ms-modes > * + *,
  .game-root[data-game="minesweeper"] .ms-action-modes > * + * { margin-left: 3px; }
  .game-root[data-game="minesweeper"] .ms-stat > * + * { margin-left: 9px; }
  .game-root[data-game="minesweeper"] .ms-toolbar { margin-top: -8px; margin-left: -4px; margin-right: -4px; }
  .game-root[data-game="minesweeper"] .ms-toolbar > * { margin: 8px 4px 0; }
  .game-root[data-game="minesweeper"] .ms-theme-choice > * + * { margin-top: 4px; }
  .game-root[data-game="minesweeper"] .ms-board-wrap { margin-left: auto; margin-right: auto; }
  .game-root[data-game="minesweeper"] .ms-controls > * + * { margin-left: 8px; }
  @media (max-width: 520px) {
    .game-root[data-game="minesweeper"] .ms-mode { padding-left: 10px; padding-right: 10px; }
    .game-root[data-game="minesweeper"] .ms-stat > * + * { margin-left: 0; margin-top: 1px; }
    .game-root[data-game="minesweeper"] .ms-toolbar { margin-top: -6px; margin-left: -3px; margin-right: -3px; }
    .game-root[data-game="minesweeper"] .ms-toolbar > * { margin: 6px 3px 0; }
    .game-root[data-game="minesweeper"] .ms-theme-choice > * + * { margin-top: 0; margin-left: 4px; }
    .game-root[data-game="minesweeper"] .ms-status { margin-top: 3px; margin-bottom: 6px; }
  }
}
/* No color-mix before Safari 16.2, and a declaration using it is dropped whole: the tools lose
   their fill and border, open cells their edge, the hint its glow. A white layer at (100 - n)%
   over the accent is the same n% mix; the translucent accents fall back to neutral shades. */
@supports not (color: color-mix(in srgb, red 50%, white)) {
  .game-root[data-game="minesweeper"] .ms-mode.on { box-shadow: 0 2px 7px rgba(30, 40, 55, .22); }
  .game-root[data-game="minesweeper"] .ms-action.on { box-shadow: 0 2px 5px rgba(30, 40, 55, .2); }
  .game-root[data-game="minesweeper"] .ms-tool,
  .game-root[data-game="minesweeper"] .ms-theme-btn {
    border: 1px solid var(--c-border); color: var(--ms-accent);
    background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)), var(--ms-accent);
  }
  .game-root[data-game="minesweeper"] .ms-tool:hover:not(:disabled),
  .game-root[data-game="minesweeper"] .ms-theme-btn:hover {
    background: linear-gradient(rgba(255, 255, 255, .83), rgba(255, 255, 255, .83)), var(--ms-accent);
  }
  .game-root[data-game="minesweeper"] .ms-theme-panel { border: 1px solid var(--c-border); }
  .game-root[data-game="minesweeper"] .ms-theme-choice:hover {
    background: linear-gradient(rgba(255, 255, 255, .93), rgba(255, 255, 255, .93)), var(--ms-accent);
  }
  .game-root[data-game="minesweeper"] .ms-theme-choice.on {
    border-color: var(--ms-accent);
    background: linear-gradient(rgba(255, 255, 255, .89), rgba(255, 255, 255, .89)), var(--ms-accent);
  }
  .game-root[data-game="minesweeper"] .ms-board-wrap { box-shadow: 0 11px 25px rgba(30, 40, 55, .3); }
  .game-root[data-game="minesweeper"] .ms-cell.open { border: 1px solid rgba(52, 67, 90, .18); }
  .game-root[data-game="minesweeper"] .ms-cell.hinted { animation-name: ms-hint-solid; }
  @keyframes ms-hint-solid {
    0%, 100% { box-shadow: inset 1px 1px 3px rgba(54, 68, 89, .16); }
    50% { box-shadow: inset 0 0 0 2px var(--ms-accent), 0 0 0 4px rgba(255, 255, 255, .7), 0 0 14px rgba(30, 40, 55, .35); }
  }
  .game-root[data-game="minesweeper"] .ms-ctl.ms-new {
    color: var(--ms-accent); border-color: var(--c-border);
    background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)), var(--ms-accent);
  }
}
