.mini-maze {
  min-width: 0;
  container: maze-panel / inline-size;
  padding: clamp(5px, 1.4vw, 18px);
  border: 1px solid #82694b;
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 23%, #38342b 0%, #181a20 76%);
  box-shadow: inset 0 0 0 2px #131419, inset 0 0 0 3px #4a4132, 0 5px 0 #0b0f14;
}

.maze-board-shell {
  width: min(100%, 280px);
  margin-inline: auto;
}

@container maze-panel (min-width: 560px) {
  .maze-board-shell { width: 560px; }
}

.maze-board-art {
  position: relative;
  isolation: isolate;
  aspect-ratio: 14 / 11;
  background: #171a16;
  box-shadow: 0 -2px #b99b61, -2px 0 #443629, 2px 0 #443629;
}

.maze-landscape, .maze-actors {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

.maze-landscape { background: linear-gradient(#545e2e 0 90.9%, #4f3529 90.9% 100%); }

#maze-grid {
  position: absolute;
  inset: 0 0 9.09%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 0;
  max-width: none;
  margin: 0;
}

#maze-grid .maze-tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset -1px -1px #17180a29;
}

#maze-grid .maze-tile::before,
#maze-grid .maze-tile::after { content: none; }

#maze-grid button.maze-tile:hover {
  background: #ead19427;
  box-shadow: inset 0 0 0 1px #fded9fbb;
}

#maze-grid button.maze-tile:focus-visible {
  z-index: 2;
  background: #a9d7ed45;
  outline: 3px solid #fff0a8;
  outline-offset: -3px;
}

#maze-grid .landmark { z-index: 1; }

.mini-maze .maze-board-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 12px;
  margin-top: 10px;
  padding: 0 3px 3px;
}
#maze-status { color: #efe0b1; font-weight: 650; }
.mini-maze:has(#maze-grid.blocked) #maze-status { color: #ffd0b7; }
#maze-reset { max-width: 100%; }

@media (max-width: 430px) {
  #main .maze-chapter { border-width: 3px; padding-inline: 2px; }
  .maze-chapter .section-intro { padding-inline: 10px; }
  .mini-maze { padding-inline: 3px; }
}
