* {
  box-sizing: border-box;
}

:root {
  --bg: #f8f2e8;
  --paper: rgba(255, 251, 244, 0.82);
  --paper-strong: #fffaf1;
  --ink: #1f2a33;
  --muted: #576573;
  --line: rgba(31, 42, 51, 0.1);
  --shadow: 0 18px 40px rgba(30, 47, 66, 0.12);
  --orange: #f9734c;
  --yellow: #f6b73c;
  --teal: #1697a6;
  --blue: #3156d3;
  --mint: #c4f3d3;
  --rose: #ffd8cb;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 76, 0.2), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(22, 151, 166, 0.2), transparent 24%),
    linear-gradient(145deg, #f9efe1 0%, #f4efe7 52%, #efe7db 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 55%, transparent 92%);
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-stats,
.view,
.levels-panel,
.maze-sidebar,
.maze-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy,
.hero-stats {
  padding: 28px;
}

.hero-copy::after,
.hero-stats::after,
.view::after,
.maze-sidebar::after,
.maze-stage::after {
  content: "";
  position: absolute;
  inset: auto auto -48px -36px;
  width: 180px;
  height: 180px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(249, 115, 76, 0.15), rgba(246, 183, 60, 0.02));
  transform: rotate(16deg);
  pointer-events: none;
}

.hero h1,
.section-head h2,
.maze-sidebar h2,
.win-banner h3 {
  margin: 0;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
  font-weight: 700;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.7rem);
  letter-spacing: 0.02em;
}

.hero-description,
.section-description {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-player-group,
.player-overview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 132px;
  padding: 18px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 42, 51, 0.06);
}

.stat-card strong {
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  font-weight: 800;
}

.stat-card span,
.summary-chip,
.status-badge,
.legend,
.section-description.small {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}

.view {
  display: none;
  padding: 28px;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.section-head-levels {
  align-items: flex-start;
}

.section-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.difficulty-card {
  position: relative;
  display: grid;
  gap: 18px;
  min-height: 300px;
  padding: 24px;
  border-radius: 28px;
  color: #10202a;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.difficulty-card.locked {
  border: 1px dashed rgba(31, 42, 51, 0.2);
  filter: saturate(0.9);
}

.difficulty-card:hover,
.difficulty-card:focus-visible,
.level-button:hover,
.level-button:focus-visible,
.action-list button:hover,
.action-list button:focus-visible,
.controls-pad button:hover,
.controls-pad button:focus-visible,
.win-actions button:hover,
.win-actions button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  transform: translateY(-3px);
}

.difficulty-card::before {
  content: "";
  position: absolute;
  inset: auto -26px -50px auto;
  width: 110px;
  height: 110px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(18deg);
}

.difficulty-card h3 {
  margin: 0;
  font-size: 2rem;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
}

.difficulty-card p {
  margin: 0;
  line-height: 1.7;
}

.difficulty-card.foundation {
  background: linear-gradient(155deg, #fff6c9 0%, #fbe28c 100%);
}

.difficulty-card.easy {
  background: linear-gradient(155deg, #d7f9d9 0%, #a9edbe 100%);
}

.difficulty-card.medium {
  background: linear-gradient(155deg, #c7f2f8 0%, #95dfe9 100%);
}

.difficulty-card.hard {
  background: linear-gradient(155deg, #ffd1d8 0%, #f4a1b7 100%);
}

.card-topline,
.card-bottomline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.card-tag,
.card-range {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 700;
}

.card-bottomline strong {
  font-size: 2.15rem;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
}

.ghost-button,
.action-list button,
.win-actions button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), #ff9a6f);
  color: white;
  box-shadow: 0 12px 20px rgba(249, 115, 76, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid rgba(31, 42, 51, 0.08);
}

.section-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 42, 51, 0.08);
  font-weight: 700;
}

.accent-chip {
  background: linear-gradient(135deg, rgba(249, 115, 76, 0.16), rgba(246, 183, 60, 0.18));
  color: #8d471f;
}

.player-panel,
.leaderboard-panel,
.leaderboard-note {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(31, 42, 51, 0.06);
  box-shadow: 0 10px 24px rgba(31, 42, 51, 0.06);
}

.player-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.1fr);
  gap: 20px;
  margin-bottom: 22px;
  padding: 22px;
}

.player-panel h3,
.leaderboard-note h3 {
  margin: 0;
  font-size: 2rem;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
}

.player-form {
  display: grid;
  gap: 12px;
  align-content: center;
}

.player-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.player-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.player-form-row input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 51, 0.1);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
}

.player-form-row input:focus {
  outline: 2px solid rgba(49, 86, 211, 0.2);
  border-color: rgba(49, 86, 211, 0.3);
}

.player-form button {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), #ff9a6f);
  color: white;
  box-shadow: 0 12px 20px rgba(249, 115, 76, 0.22);
}

.player-message {
  min-height: 26px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.player-message.success {
  color: #0e7b63;
}

.player-message.warning {
  color: #b15d1b;
}

.levels-panel {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(31, 42, 51, 0.06);
}

.levels-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.dot-current {
  background: var(--orange);
}

.dot-complete {
  background: var(--teal);
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.level-button {
  display: grid;
  gap: 10px;
  padding: 18px 16px;
  min-height: 118px;
  border-radius: 22px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 42, 51, 0.08);
  box-shadow: 0 8px 18px rgba(32, 46, 60, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.level-button strong {
  font-size: 2rem;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
  line-height: 1;
}

.level-button small {
  color: var(--muted);
}

.level-button.current {
  border-color: rgba(249, 115, 76, 0.42);
  box-shadow: 0 12px 22px rgba(249, 115, 76, 0.14);
  background: linear-gradient(160deg, #fff4ef, #fffaf7);
}

.level-button.completed {
  border-color: rgba(22, 151, 166, 0.32);
  background: linear-gradient(160deg, #effffd, #f7fffe);
}

.level-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 151, 166, 0.12);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.level-button.current .level-pill {
  background: rgba(249, 115, 76, 0.14);
  color: var(--orange);
}

.maze-layout {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 20px;
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.72fr);
  gap: 20px;
}

.leaderboard-panel {
  padding: 18px;
}

.leaderboard-head,
.leaderboard-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(220px, 1.1fr);
  gap: 16px;
  align-items: center;
}

.leaderboard-head {
  padding: 10px 16px 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.leaderboard-list {
  display: grid;
  gap: 12px;
}

.leaderboard-row {
  padding: 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 42, 51, 0.08);
  box-shadow: 0 8px 16px rgba(31, 42, 51, 0.05);
}

.leaderboard-row.current {
  border-color: rgba(249, 115, 76, 0.32);
  background: linear-gradient(150deg, #fff4ef, #fffaf7);
}

.leaderboard-rank {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(49, 86, 211, 0.12);
  color: var(--blue);
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
  font-size: 1.3rem;
}

.leaderboard-row:nth-child(1) .rank-badge {
  background: rgba(246, 183, 60, 0.2);
  color: #a46a04;
}

.leaderboard-row:nth-child(2) .rank-badge {
  background: rgba(137, 166, 189, 0.2);
  color: #4f6679;
}

.leaderboard-row:nth-child(3) .rank-badge {
  background: rgba(217, 151, 109, 0.22);
  color: #955623;
}

.leaderboard-player {
  display: grid;
  gap: 5px;
}

.leaderboard-player strong {
  font-size: 1.15rem;
}

.leaderboard-player span,
.leaderboard-meta,
.leaderboard-empty p {
  color: var(--muted);
}

.leaderboard-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.leaderboard-meta {
  font-size: 0.92rem;
}

.leaderboard-side {
  display: grid;
}

.leaderboard-note {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
}

.leaderboard-empty {
  padding: 34px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px dashed rgba(31, 42, 51, 0.12);
  text-align: center;
}

.leaderboard-empty h3 {
  margin: 0;
  font-size: 1.8rem;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
}

.maze-sidebar,
.maze-stage {
  padding: 22px;
}

.maze-sidebar {
  display: grid;
  gap: 18px;
}

.maze-sidebar-block {
  position: relative;
  z-index: 1;
}

.status-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stats-grid article {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(31, 42, 51, 0.06);
}

.stats-grid strong {
  display: block;
  font-size: 2rem;
  font-family: "Baloo 2", "Noto Sans SC", sans-serif;
}

.action-list {
  display: grid;
  gap: 12px;
}

.control-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.controls-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.control-button {
  min-height: 62px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 239, 0.8));
  border: 1px solid rgba(31, 42, 51, 0.08);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
}

.control-button.up {
  grid-column: 2;
}

.control-button.left {
  grid-column: 1;
  grid-row: 2;
}

.control-button.down {
  grid-column: 2;
  grid-row: 2;
}

.control-button.right {
  grid-column: 3;
  grid-row: 2;
}

.maze-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 700px;
}

.maze-canvas-wrap {
  position: relative;
  width: min(100%, 860px);
  aspect-ratio: 1;
  padding: 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 76, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(49, 86, 211, 0.15), transparent 26%),
    var(--paper-strong);
  border: 1px solid rgba(31, 42, 51, 0.06);
}

#maze-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  touch-action: none;
  user-select: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 239, 228, 0.88));
}

#maze-canvas.drag-ready {
  cursor: grab;
}

#maze-canvas.dragging {
  cursor: grabbing;
}

.win-banner {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: min(88%, 420px);
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 251, 245, 0.95);
  border: 1px solid rgba(31, 42, 51, 0.08);
  box-shadow: 0 24px 44px rgba(31, 42, 51, 0.16);
  transform: translate(-50%, -50%);
  text-align: center;
}

.win-banner p {
  margin: 0;
}

.win-banner h3 {
  margin-top: 8px;
  font-size: 2.2rem;
}

.win-banner.hidden {
  display: none;
}

.win-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .difficulty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .levels-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .maze-layout,
  .leaderboard-layout,
  .hero {
    grid-template-columns: 1fr;
  }

  .player-panel {
    grid-template-columns: 1fr;
  }

  .maze-stage {
    min-height: 560px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    overflow: hidden;
  }

  .app-shell {
    width: min(100% - 24px, 1180px);
    height: calc(100dvh - 24px);
    margin: 12px auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
  }

  main {
    min-height: 0;
    display: grid;
  }

  .hero {
    grid-template-columns: minmax(0, 1.16fr) minmax(260px, 0.84fr);
    gap: 12px;
    margin-bottom: 0;
  }

  .hero-copy,
  .hero-stats,
  .view,
  .maze-sidebar,
  .maze-stage {
    padding: 18px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 5vw, 3.2rem);
  }

  .hero-description {
    margin-top: 10px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat-card {
    min-height: 94px;
    padding: 14px 12px;
  }

  .stat-card strong {
    font-size: clamp(1.45rem, 3vw, 2rem);
  }

  .view {
    min-height: 0;
    overflow: hidden;
  }

  .view.active {
    display: grid;
    align-content: start;
  }

  #home-view.view.active {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  #levels-view.view.active,
  #leaderboard-view.view.active {
    grid-template-rows: auto minmax(0, 1fr);
  }

  #maze-view.view.active {
    grid-template-rows: minmax(0, 1fr);
  }

  .section-head {
    margin-bottom: 14px;
  }

  .section-head h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  }

  .section-description {
    line-height: 1.55;
  }

  .player-panel {
    grid-template-columns: minmax(220px, 0.95fr) minmax(280px, 1.05fr);
    gap: 14px;
    margin-bottom: 14px;
    padding: 16px;
  }

  .player-panel h3,
  .leaderboard-note h3 {
    font-size: 1.55rem;
  }

  .player-form {
    gap: 10px;
  }

  .player-form-row input,
  .player-form button,
  .ghost-button,
  .action-list button,
  .win-actions button {
    min-height: 44px;
  }

  .difficulty-grid {
    height: 100%;
    gap: 12px;
    align-items: stretch;
  }

  .difficulty-card {
    min-height: clamp(180px, 23dvh, 230px);
    padding: 18px;
    gap: 12px;
  }

  .difficulty-card h3 {
    font-size: 1.65rem;
  }

  .difficulty-card p {
    line-height: 1.55;
  }

  .card-bottomline strong {
    font-size: 1.8rem;
  }

  .levels-panel,
  .leaderboard-panel {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .levels-toolbar {
    margin-bottom: 12px;
  }

  .levels-grid,
  .leaderboard-list,
  .maze-sidebar {
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
  }

  .levels-grid {
    gap: 10px;
  }

  .level-button {
    min-height: 90px;
    padding: 14px 12px;
  }

  .level-button strong {
    font-size: 1.6rem;
  }

  .maze-layout,
  .leaderboard-layout {
    min-height: 0;
    height: 100%;
    gap: 14px;
  }

  .maze-layout {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .maze-sidebar,
  .maze-stage {
    min-height: 0;
    padding: 16px;
  }

  .maze-sidebar {
    gap: 14px;
  }

  .stats-grid article {
    padding: 12px;
  }

  .stats-grid strong {
    font-size: 1.7rem;
  }

  .controls-pad {
    gap: 8px;
    margin-top: 12px;
  }

  .control-button {
    min-height: 52px;
  }

  .maze-stage {
    min-height: 0;
  }

  .maze-canvas-wrap {
    width: min(100%, 100%);
    height: min(100%, 100%);
    padding: 14px;
  }

  .win-banner {
    width: min(86%, 360px);
    padding: 18px;
  }

  .win-banner h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    margin: 10px auto 28px;
  }

  .hero-copy,
  .hero-stats,
  .view,
  .maze-sidebar,
  .maze-stage {
    border-radius: 24px;
    padding: 20px;
  }

  .hero-stats,
  .stats-grid,
  .difficulty-grid,
  .levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head,
  .levels-toolbar,
  .section-head-levels {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    align-items: flex-start;
  }

  .player-form-row,
  .leaderboard-head,
  .leaderboard-row {
    grid-template-columns: 1fr;
  }

  .section-summary {
    justify-content: flex-start;
  }

  .leaderboard-stats {
    justify-content: flex-start;
  }

  .maze-canvas-wrap {
    padding: 14px;
  }

  .maze-stage {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .hero-stats,
  .difficulty-grid,
  .levels-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .player-panel {
    padding: 18px;
  }

  .level-button {
    min-height: 100px;
  }

  .win-actions {
    flex-direction: column;
  }

  .win-actions button,
  .ghost-button,
  .action-list button {
    width: 100%;
  }
}
