.mine-game { --ink: #454354; --gold: #f6ce79; background: #eee8db; color: var(--ink); }
.mine-game .game-shell { padding: 0 16px 10px; }
.mine-game .shell-topbar { min-height: 68px; max-width: 900px; }
.mine-game .shell-brand-mark { color: #785934; background: #f6ce79; border-color: #c69b52; }
.mine-game .shell-main { gap: 10px; justify-content: center; padding: 0; }
.mine-game .shell-stage { background: #514c60; border-radius: 24px; box-shadow: 0 6px 0 #c7bdad; }
.mine-game .shell-footer { margin-top: 10px; font-size: 11px; }
.mine-game .shell-mode-badge { position: static; background: #d7e6da; color: #34564d; }
.mine-game .shell-card { border-color: #fff8e7; background: #f9f1de; }
.mine-game .shell-eyebrow { letter-spacing: 0; text-transform: none; font-size: 12px; color: #62596b; }
.mine-game .shell-start-heading { gap: 12px; }
.mine-game .shell-start-heading h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: -1.4px; }
.mine-game .shell-mode small { font-size: 11px; }
.mine-game .shell-mode[aria-pressed=true] { background: #d9eee2; border-color: #4d8c75; }
.mine-game button:focus-visible, .mine-game a:focus-visible, .mine-game canvas:focus-visible { outline-color: #316c93; }
#loading { margin: 20vh auto; text-align: center; font-size: 20px; }
.mine-story { display: flex; justify-content: center; align-items: center; gap: 16px; height: 67px; margin: 10px 0; }
.mine-story img { width: 62px; height: 62px; object-fit: contain; }
.mine-story .mine-gem { font-size: 45px; color: #326b58; text-shadow: 0 2px #fff; }
.mine-hud { position: absolute; z-index: 2; inset: 0 0 auto; height: 9%; display: flex; align-items: center; justify-content: space-between; padding: 0 4%; background: #f9f1de; border-bottom: 3px solid #c7b79e; gap: 8px; pointer-events: none; font-size: clamp(13px, 1.5vw, 17px); font-weight: 800; }
.mine-hud strong { font-family: Georgia, 'Times New Roman', serif; font-size: 1.2em; }
.mine-hud small { display: block; font-size: 10px; margin-top: 2px; font-weight: 600; color: #756776; }
.mine-counter { text-align: right; white-space: nowrap; }
.mine-game .shell-controls { display: grid; grid-template-columns: 154px minmax(170px, 220px); gap: 16px; width: min(100%, 400px); min-height: 154px; }
.mine-dpad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 48px); gap: 5px; }
.mine-dpad button { border-radius: 14px; background: #f9f1de; border: 2px solid #bfb3a3; font-size: 25px; box-shadow: 0 3px 0 #bfb3a3; padding: 0; }
.mine-dpad button:active { transform: translateY(2px); box-shadow: 0 1px 0 #bfb3a3; }
.mine-dpad [data-direction=up] { grid-area: 1 / 2; }
.mine-dpad [data-direction=left] { grid-area: 2 / 1; }
.mine-dpad [data-direction=right] { grid-area: 2 / 3; }
.mine-dpad [data-direction=down] { grid-area: 3 / 2; }
.mine-dpad .mine-paw { grid-area: 2 / 2; display: grid; place-items: center; font-size: 22px; opacity: .65; }
.mine-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: center; }
.mine-tools button { min-height: 49px; padding: 6px 4px; border-radius: 12px; background: #e0d9cd; border: 2px solid #c6bbab; font-size: 12px; }
.mine-tools button span { display: block; font-size: 22px; line-height: 23px; }
.mine-tools #mine-sniff { background: #f6ce79; border-color: #c9a153; }
.mine-tools #mine-sniff.is-suggested { border-color: #466d5a; box-shadow: 0 0 0 3px #a9ceac; }
.mine-tools #mine-undo.is-suggested { border-color: #4c7da3; box-shadow: 0 0 0 3px #adcfe4; }
.mine-tools #mine-undo.is-suggested span { animation: mine-wiggle .7s ease-in-out 2; }
.mine-status { margin: 3px 0 0; grid-column: 1 / -1; min-height: 28px; font-size: 12px; line-height: 1.25; text-align: center; color: #554b5d; }
.mine-picker { position: absolute; inset: 0; z-index: 6; overflow: auto; background: #f4ecd9; padding: 20px 18px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.mine-picker h2 { margin: 0; text-align: center; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.8px; }
.mine-picker p { margin: 0; text-align: center; font-size: 13px; }
.mine-picker-modes { display: flex; justify-content: center; gap: 8px; }
.mine-picker-modes button { padding: 8px 17px; min-height: 48px; font-size: 14px; background: #e2dacb; border: 2px solid #c6bbab; }
.mine-picker-modes button[aria-pressed=true] { background: #d9eee2; border-color: #4d8c75; }
.mine-level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mine-level-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 66px; border: 2px solid #b6a58a; border-radius: 12px 12px 19px 19px; background: #fff9e9; box-shadow: 0 3px #d7c7ac; padding: 4px; }
.mine-level-grid button strong { font-size: 23px; font-family: Georgia, 'Times New Roman', serif; }
.mine-level-grid button small { font-size: 13px; color: #896011; letter-spacing: 2px; }
.mine-level-grid button:disabled { opacity: .56; background: #ded8cd; box-shadow: none; }
.mine-level-grid button:disabled small { color: #62596b; letter-spacing: 0; }
.mine-picker-back { background: #e2dacb; margin: 0 auto; padding: 6px 20px; }
@keyframes mine-wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (max-width: 620px) {
  .mine-game .game-shell { padding: 0 8px 8px; }
  .mine-game .shell-topbar { min-height: 68px; padding: 8px 0; flex-wrap: nowrap; }
  .mine-game .shell-brand { font-size: 13px; gap: 5px; }
  .mine-game .shell-brand-mark { width: 24px; height: 27px; }
  .mine-game .shell-toolbar { gap: 4px; }
  .mine-game .shell-mode-badge { display: none; }
  .mine-game .shell-main { justify-content: flex-start; gap: 10px; }
  .mine-game .shell-footer { display: none; }
  .mine-game .shell-controls { gap: 12px; grid-template-columns: 154px 1fr; width: min(100%, 374px); }
  .mine-game .shell-start-heading { flex-direction: row; }
  .mine-game .shell-start-heading h1 { font-size: 29px; text-align: left; }
  .mine-game .shell-game-icon { height: 96px; width: 87px; }
  .mine-game .shell-card { padding: 22px 16px; }
  .mine-picker { padding: 14px 12px; gap: 10px; }
  .mine-level-grid { gap: 8px; }
}
@media (max-width: 340px) {
  .mine-game .shell-brand span:last-child { display: none; }
  .mine-game .shell-controls { grid-template-columns: 154px 1fr; gap: 8px; }
  .mine-tools button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .mine-game *, .mine-game *::before, .mine-game *::after { animation: none !important; transition: none !important; }
}
