.jump-cover {
  background: #e3e9d5;
}
.jump-cover i,
.jump-cover b {
  position: absolute;
  background: #92a67b;
  width: 32px;
  height: 18px;
  border-radius: 50%;
  left: 6px;
  bottom: 12px;
  box-shadow: 0 7px #718462;
}
.jump-cover b {
  left: 43px;
  bottom: 42px;
  background: #becd9d;
}
.jump-cover em {
  position: absolute;
  width: 12px;
  height: 27px;
  border-radius: 6px 6px 3px 3px;
  background: #36574c;
  bottom: 28px;
  left: 16px;
}
.match-cover {
  background: #ece1d9;
  display: grid;
  grid-template-columns: repeat(2, 20px);
  gap: 5px;
  padding: 16px;
}
.match-cover i {
  background: #c8846f;
  border-radius: 5px;
}
.match-cover i:nth-child(2),
.match-cover i:nth-child(3) {
  background: #8aab9b;
  border-radius: 50%;
}
.mines-cover {
  background: #dee5e5;
  display: grid;
  grid-template-columns: repeat(2, 23px);
  gap: 3px;
  padding: 14px;
}
.mines-cover i {
  border-radius: 3px;
  background: #b1c2bb;
  font-style: normal;
  text-align: center;
  line-height: 23px;
  color: #466a86;
  font-weight: 700;
  font-size: 17px;
}
.mines-cover i:nth-child(2) {
  color: #aa5d43;
}
#casual-play {
  position: fixed;
  inset: 0;
  height: var(--casual-height, 100vh);
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #f5f3ed;
  color: #303c34;
  display: flex;
  flex-direction: column;
}
#casual-play .game-heading {
  background: #29483d;
  color: #f1f4e9;
  flex: none;
}
#casual-play .game-heading h1 {
  font-size: 17px;
}
#casual-play button {
  color: inherit;
}
.casual-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 10px;
  padding: 7px 12px 0;
  font-size: 12px;
  flex: none;
}
.casual-hud span {
  white-space: nowrap;
}
.casual-message {
  font-size: 12px;
  color: #647064;
  padding: 3px 12px 6px;
  margin: 0;
  min-height: 28px;
  flex: none;
}
.casual-board-area {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 10px 8px;
  overscroll-behavior: contain;
}
.casual-grid {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  background: #e0e3d9;
  border: 1px solid #ccd2c3;
  border-radius: 12px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.casual-cell {
  aspect-ratio: 1;
  min-height: 0;
  min-width: 0;
  padding: 0;
  border-radius: 5px;
  line-height: 1;
  font-size: clamp(13px, 4vw, 21px);
  font-weight: 700;
  position: relative;
}
.casual-cell svg {
  width: 83%;
  height: 83%;
  display: block;
  margin: auto;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.12));
}
#casual-play[data-game="match"] .casual-grid {
  touch-action: none;
  background: #e7e0d5;
}
.gem {
  background: #ede9e0;
  border: 1px solid #d8d0c2;
}
.gem svg {
  width: 90%;
  height: 90%;
  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 1;
  stroke-linejoin: round;
  filter: none;
}
.gem-0 {
  fill: #c45147;
}
.gem-1 {
  fill: #c5931f;
}
.gem-2 {
  fill: #428450;
}
.gem-3 {
  fill: #3978b4;
}
.gem-4 {
  fill: #8755ad;
}
.gem-5 {
  fill: #d87830;
}
.gem.selected {
  outline: 3px solid #395f4e;
  outline-offset: -3px;
  background: #e4ecdc;
}
.gem.hinted {
  outline: 3px dashed #624c37;
  outline-offset: -3px;
}
.gem.clearing {
  box-shadow: inset 0 0 0 2px #89947c;
}
#casual-play[data-game="mines"] .casual-grid {
  gap: 3px;
  border-radius: 7px;
  max-width: 410px;
}
#casual-play[data-game="mines"] .casual-cell {
  border: 1px solid #acb9af;
  border-bottom-width: 3px;
  background: #d4dfd1;
}
#casual-play[data-game="mines"] .casual-cell.revealed {
  background: #f4f3e9;
  border: 1px solid #d4d8cb;
}
#casual-play[data-game="mines"] .casual-cell.flagged {
  color: #a74937;
}
#casual-play[data-game="mines"] .casual-cell.mine {
  color: #354437;
  background: #e6c9b3;
}
#casual-play[data-game="mines"] .casual-cell.hit {
  background: #bc5946;
  color: white;
}
.casual-cell[data-number="1"] {
  color: #357194;
}
.casual-cell[data-number="2"] {
  color: #467c4d;
}
.casual-cell[data-number="3"] {
  color: #b5533e;
}
.casual-cell[data-number="4"] {
  color: #766094;
}
.casual-cell[data-number="5"],
.casual-cell[data-number="6"],
.casual-cell[data-number="7"],
.casual-cell[data-number="8"] {
  color: #5d4236;
}
.casual-tools {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 7px 12px;
  flex: none;
}
.casual-tools button {
  background: #fffdf5;
  border-color: #c5cdbb;
  min-width: 95px;
}
#mine-mode[aria-pressed="true"] {
  background: #8c503f;
  color: #fff;
  border-color: #8c503f;
}
.casual-save {
  margin: 0;
  padding: 0 12px 6px;
  color: #72796c;
  font-size: 11px;
  text-align: center;
  flex: none;
}
.casual-result {
  margin: 9px auto 3px;
  max-width: 440px;
  padding: 12px;
  background: #e0e9d6;
  border-radius: 9px;
  text-align: center;
}
.casual-result strong {
  font-size: 19px;
}
.casual-result p {
  margin: 4px 0 9px;
  font-size: 13px;
}
.casual-jump-area {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  margin: 0 10px;
  border-radius: 10px;
  background: #edf0e6;
}
#casual-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
.casual-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(238, 242, 228, 0.92);
  padding: 15px;
  text-align: center;
}
.casual-overlay strong {
  font-size: 24px;
}
.casual-overlay p {
  margin: 8px 0 20px;
  font-size: 13px;
}
.casual-overlay button,
#jump-charge {
  background: #365c4a;
  color: #fff;
  border-color: #365c4a;
}
#casual-play #jump-charge {
  color: #fff;
}
#jump-tools {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 16px 7px;
  flex: none;
}
#jump-charge {
  min-height: 54px;
  font-size: 17px;
  font-weight: 600;
  width: 100%;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
#jump-meter {
  height: 9px;
  border-radius: 10px;
  overflow: hidden;
  background: #d6decd;
}
#jump-meter-fill {
  display: block;
  background: #ae8354;
  height: 100%;
  width: 0;
}
#casual-new-dialog p {
  font-size: 14px;
}
#casual-level-wrap {
  display: block;
  margin: 12px 0;
}
#casual-level {
  min-height: 44px;
  margin-left: 12px;
  font: inherit;
  padding: 5px;
}
@media (orientation: landscape) and (max-height: 520px) {
  #casual-play {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-template-rows: 48px auto auto 1fr auto;
  }
  #casual-play .game-heading {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .casual-hud {
    grid-column: 2;
    grid-row: 2;
  }
  .casual-message {
    grid-column: 2;
    grid-row: 3;
  }
  .casual-board-area,
  .casual-jump-area {
    grid-column: 1;
    grid-row: 2 / 6;
  }
  .casual-tools,
  #jump-tools {
    grid-column: 2;
    grid-row: 4;
    align-self: center;
    flex-wrap: wrap;
  }
  .casual-save {
    grid-column: 2;
    grid-row: 5;
  }
  #casual-play[data-game="match"] .casual-grid {
    max-width: calc(var(--casual-height, 100vh) - 65px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gem {
    transition: none;
  }
}
