:root {
  --bg-0: #020202;
  --bg-1: #090909;
  --bg-2: #121212;
  --panel: rgba(10, 10, 10, 0.94);
  --panel-soft: rgba(18, 18, 18, 0.94);
  --tile: #232323;
  --tile-shadow: #151515;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f3f3;
  --muted: #ababab;
  --gold: #f0c35a;
  --mint: #56d0b9;
  --coral: #ff7f66;
  --violet: #a58aff;
  --danger: #ff5858;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.03), transparent 22%),
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.02), transparent 24%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 55%, var(--bg-0) 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(1600px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0 24px;
}

.topbar,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 26px;
  margin-bottom: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-chip {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  color: #050505;
  background: linear-gradient(135deg, #f2f2f2, #bcbcbc);
}

.profile-copy,
.currency-card,
.section-head,
.settings-card,
.list-head {
  display: flex;
  flex-direction: column;
}

.eyebrow,
.currency-label,
.kicker,
.muted,
.inventory-note,
.overlay-kicker,
.overlay-copy {
  color: var(--muted);
  font-size: 0.78rem;
}

.username,
h1,
h2,
h3,
.tool-tag,
.tool-tier,
.stat-chip strong,
.meta-card strong {
  font-family: "Chakra Petch", sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.currencies {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 10px;
  width: min(100%, 520px);
}

.currency-card {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.play-surface,
.control-rail,
.progression-stack,
.meta-grid,
.queue-list,
.inventory-grid,
.card-list,
.ability-list,
.settings-grid,
.hero-stats,
.lower-grid {
  display: grid;
  gap: 14px;
}

.panel {
  border-radius: 30px;
  padding: 16px;
}

.hero-head,
.section-head.rail-head,
.board-toolbar,
.list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.tool-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tool-tag {
  color: var(--gold);
  font-weight: 700;
}

.tool-tier {
  color: var(--muted);
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  margin-bottom: 16px;
}

.stat-chip,
.meta-card,
.resource-card,
.queue-card,
.recipe-card,
.ability-card,
.shop-card,
.settings-card,
.list-shell {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 22px;
}

.stat-chip:nth-child(1),
.meta-card:nth-child(1) {
  background: rgba(33, 33, 33, 0.96);
}

.stat-chip:nth-child(2),
.meta-card:nth-child(2) {
  background: rgba(27, 27, 27, 0.96);
}

.stat-chip:nth-child(3),
.meta-card:nth-child(3) {
  background: rgba(39, 39, 39, 0.96);
}

.stat-chip,
.meta-card,
.resource-card {
  padding: 14px;
}

.board-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 14px;
  background: rgba(19, 19, 19, 0.9);
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 10px 0 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.legend-ore {
  background: var(--mint);
}

.legend-blocked {
  background: var(--danger);
}

.legend-bomb {
  background: #000000;
  box-shadow: inset 0 0 0 1px rgba(255, 127, 102, 0.6);
}

.legend-scan {
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(240, 195, 90, 0.8);
}

.board-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(3, 3, 3, 0.98);
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(40, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 10px;
}

.board-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  background: rgba(0, 0, 0, 0.84);
}

#overlayCountdown {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-family: "Chakra Petch", sans-serif;
  color: var(--gold);
}

.tile {
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: var(--tile);
  color: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 100ms ease, filter 100ms ease, background-color 120ms ease;
}

.tile.bomb {
  box-shadow: inset 0 0 0 1px rgba(255, 136, 102, 0.45);
}

.tile.armed {
  animation: pulse-danger 0.85s infinite;
  color: #f7d37a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 8px rgba(247, 211, 122, 0.42);
}

.tile.blasted {
  background: #000000 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tile.nuke-flash {
  animation: nuke-flash 220ms steps(2, end) 4;
}

.tile.board-lock-fade {
  animation: board-lock-fade 1.6s ease-out forwards;
}

.tile.hinted {
  box-shadow: inset 0 0 0 2px rgba(240, 195, 90, 0.7);
}

.tile.trail {
  animation: hover-trail 1.1s ease-in-out infinite;
}

.tile.pop {
  animation: tile-pop 180ms ease-out;
}

.tile:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.tile:disabled,
.board.phase-locked .tile {
  cursor: default;
}

.tile:disabled:hover,
.board.phase-locked .tile:hover {
  transform: none;
  filter: none;
}

.tile.revealed {
  color: transparent;
}

.tile.locked {
  filter: saturate(0.55);
}

.tile.inactive,
.tile.seam-blocked {
  background: rgba(3, 3, 3, 0.98) !important;
  box-shadow: none !important;
  border-color: transparent;
  filter: none;
}

.tile.inactive {
  opacity: 1;
}

.tile.invalid {
  background: var(--danger) !important;
  filter: none;
}

.tile.depleted {
  background: #050a11;
}

@keyframes pulse-danger {
  0% {
    filter: brightness(0.9);
  }
  50% {
    filter: brightness(1.2);
  }
  100% {
    filter: brightness(0.9);
  }
}

@keyframes hover-trail {
  0% {
    filter: brightness(0.95);
    box-shadow: inset 0 0 0 1px rgba(240, 195, 90, 0.16);
  }
  50% {
    filter: brightness(1.28);
    box-shadow: inset 0 0 0 2px rgba(240, 195, 90, 0.52), 0 0 10px rgba(240, 195, 90, 0.22);
  }
  100% {
    filter: brightness(0.95);
    box-shadow: inset 0 0 0 1px rgba(240, 195, 90, 0.16);
  }
}

@keyframes tile-pop {
  0% {
    transform: scale(0.9);
    filter: brightness(1.45);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes nuke-flash {
  0% {
    background: #f4cf57 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 231, 154, 0.8), 0 0 10px rgba(244, 207, 87, 0.25);
  }
  100% {
    background: #050505 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

@keyframes board-lock-fade {
  0% {
    background: rgba(58, 20, 20, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 110, 110, 0.18);
    filter: brightness(1.08);
  }
  100% {
    background: rgba(3, 3, 3, 0.98);
    box-shadow: none;
    filter: brightness(0.9);
  }
}

@keyframes tier-glow-green {
  0%, 100% {
    filter: brightness(0.96);
    box-shadow: inset 0 0 0 1px rgba(120, 220, 140, 0.06);
  }
  50% {
    filter: brightness(1.08);
    box-shadow: inset 0 0 0 1px rgba(120, 220, 140, 0.18);
  }
}

@keyframes tier-glow-blue {
  0%, 100% {
    filter: brightness(0.96);
    box-shadow: inset 0 0 0 1px rgba(120, 188, 255, 0.06);
  }
  50% {
    filter: brightness(1.08);
    box-shadow: inset 0 0 0 1px rgba(120, 188, 255, 0.18);
  }
}

@keyframes tier-glow-purple {
  0%, 100% {
    filter: brightness(0.96);
    box-shadow: inset 0 0 0 1px rgba(186, 120, 255, 0.06);
  }
  50% {
    filter: brightness(1.08);
    box-shadow: inset 0 0 0 1px rgba(186, 120, 255, 0.18);
  }
}

@keyframes tier-glow-gold {
  0%, 100% {
    filter: brightness(0.96);
    box-shadow: inset 0 0 0 1px rgba(240, 195, 90, 0.06);
  }
  50% {
    filter: brightness(1.1);
    box-shadow: inset 0 0 0 1px rgba(240, 195, 90, 0.22);
  }
}

.compact-panel {
  min-height: 0;
}

.lower-grid {
  grid-template-columns: 1fr;
}

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

.queue-list,
.inventory-grid,
.card-list,
.ability-list,
.progression-stack {
  align-content: start;
}

.shop-filter-row,
.market-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.automation-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.automation-copy,
.automation-summary {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.automation-summary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}

.automation-select {
  min-width: 150px;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
}

.automation-select option {
  background: #0b0b0d;
  color: #f5efe4;
}

.shop-filter-button {
  border-radius: 14px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
}

.shop-filter-button.active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.queue-list {
  margin-bottom: 12px;
}

.queue-card,
.recipe-card,
.ability-card,
.shop-card,
.list-shell {
  padding: 14px;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.queue-card:hover,
.recipe-card:hover,
.ability-card:hover,
.shop-card:hover,
.list-shell:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.list-shell {
  padding: 12px;
}

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

.resource-card strong {
  display: block;
  margin: 4px 0;
  font-size: 1.05rem;
}

.resource-card small,
.meta-card span:last-child {
  color: var(--muted);
}

.tab-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.tab-button,
.primary-button,
.secondary-button {
  border-radius: 16px;
  padding: 11px 14px;
  cursor: pointer;
}

.tab-button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
}

.tab-button.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-color: var(--line-strong);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card-list,
.ability-list {
  max-height: min(56vh, 780px);
  overflow: auto;
}

.queue-card p,
.recipe-card p,
.ability-card p,
.shop-card p {
  color: var(--muted);
  margin: 8px 0 10px;
}

.queue-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 8px;
}

.queue-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7d37a, #ebba5f);
  transform-origin: left center;
  transition: transform 90ms linear;
}

.queue-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-header,
.queue-row,
.cost-row,
.shop-tags {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cost-row,
.shop-tags {
  color: var(--muted);
  font-size: 0.82rem;
}

.primary-button {
  color: #050505;
  font-weight: 800;
  background: linear-gradient(135deg, #f7d37a, #ebba5f);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.settings-card {
  gap: 8px;
  padding: 14px;
}

.settings-card input {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
}

.alert-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.game-alert {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  padding: 12px 14px;
  transform: translateY(-6px);
  opacity: 0;
  animation: alert-in 220ms ease forwards;
}

.game-alert strong {
  display: block;
  margin-bottom: 4px;
  font-family: "Chakra Petch", sans-serif;
}

.game-alert span {
  color: var(--muted);
  font-size: 0.9rem;
}

.game-alert.info {
  border-left: 4px solid #8e8e8e;
}

.game-alert.success {
  border-left: 4px solid var(--mint);
}

.game-alert.warn {
  border-left: 4px solid var(--gold);
}

.game-alert.danger {
  border-left: 4px solid var(--danger);
}

@keyframes alert-in {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}

.landing-page.hidden,
.app-shell.hidden,
.dashboard.hidden,
.marketplace.hidden,
.panel.hidden,
.tab-panel.hidden,
.settings-tab-panel.hidden,
.market-tab-panel.hidden {
  display: none;
}

.landing-page {
  width: min(1240px, calc(100vw - 32px));
  margin: 24px auto 40px;
  display: grid;
  gap: 18px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  padding: 22px;
}

.landing-copy,
.landing-note {
  color: var(--muted);
  max-width: 70ch;
}

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

.landing-link {
  text-decoration: none;
}

.landing-summary,
.landing-grid {
  display: grid;
  gap: 16px;
}

.landing-summary {
  align-content: start;
}

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

.marketplace {
  margin-top: 4px;
}

.market-panel {
  min-height: calc(100vh - 140px);
  background:
    linear-gradient(180deg, rgba(240, 195, 90, 0.04), transparent 22%),
    rgba(10, 10, 10, 0.94);
}

.market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-top: 14px;
}

.market-layout.single-column {
  grid-template-columns: 1fr;
}

.market-tab-row,
.settings-tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.market-tab-button,
.settings-tab-button {
  border-radius: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
}

.market-tab-button.active,
.settings-tab-button.active {
  background: rgba(240, 195, 90, 0.14);
  border-color: rgba(240, 195, 90, 0.28);
  color: var(--text);
}

.market-tab-panel,
.settings-tab-panel {
  display: none;
}

.market-tab-panel.active,
.settings-tab-panel.active {
  display: block;
}

.market-tab-panel[data-market-panel="portfolio"].active,
.market-tab-panel[data-market-panel="history"].active {
  grid-column: 1 / -1;
}

.market-chart-shell,
.market-table-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(240, 195, 90, 0.04), transparent 26%),
    var(--panel-soft);
  padding: 16px;
}

.market-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.market-chart {
  width: 100%;
  height: 320px;
  display: block;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(240, 195, 90, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.02);
  margin: 12px 0;
}

.market-automation-row {
  margin-top: 12px;
  margin-bottom: 10px;
}

.market-automation-summary {
  margin-bottom: 14px;
}

.market-table-head,
.market-table-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 0.7fr;
  gap: 10px;
  align-items: center;
}

.leaderboard-wealth-head {
  grid-template-columns: 0.6fr 1.6fr 1fr 1fr;
}

.leaderboard-row,
.leaderboard-wealth-row {
  grid-template-columns: 0.6fr 1.6fr 1fr 1fr;
}

.leaderboard-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.leaderboard-summary-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
}

.leaderboard-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.active {
  display: grid;
  gap: 14px;
}

.recent-board-grid {
  display: grid;
  grid-template-columns: repeat(40, minmax(0, 1fr));
  gap: 1px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(3, 3, 3, 0.98);
}

.recent-board-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
}

.recent-board-cell.inactive,
.recent-board-cell.sealed {
  background: rgba(3, 3, 3, 0.98);
}

.recent-board-cell.uncovered {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.recent-board-cell.mined {
  background: #050a11;
}

.board.tier-uncommon .tile:not(.revealed):not(.inactive) {
  background: #1f3123;
  animation: tier-glow-green 2.8s ease-in-out infinite;
}

.board.tier-rare .tile:not(.revealed):not(.inactive) {
  background: #1f293b;
  animation: tier-glow-blue 2.8s ease-in-out infinite;
}

.board.tier-epic .tile:not(.revealed):not(.inactive) {
  background: #2b2238;
  animation: tier-glow-purple 2.8s ease-in-out infinite;
}

.board.tier-legendary .tile:not(.revealed):not(.inactive) {
  background: #3b3117;
  animation: tier-glow-gold 2.8s ease-in-out infinite;
}

.market-table-head {
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0 12px 8px;
}

.market-table {
  display: grid;
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
}

.market-table-row {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.market-table-row.active {
  border-color: rgba(240, 195, 90, 0.3);
  background: rgba(240, 195, 90, 0.08);
}

.trend-up {
  color: var(--mint);
}

.trend-down {
  color: var(--coral);
}

@media (max-width: 1220px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .landing-hero,
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .market-layout {
    grid-template-columns: 1fr;
  }

  .control-rail {
    order: 2;
  }
}

@media (max-width: 900px) {
  .hero-stats,
  .meta-grid,
  .lower-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .currencies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100vw - 12px, 100%);
    padding-top: 6px;
  }

  .topbar,
  .topbar-left,
  .hero-head,
  .section-head.rail-head,
  .board-toolbar,
  .list-head,
  .legend-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .meta-grid,
  .lower-grid,
  .settings-grid,
  .inventory-grid,
  .tab-row {
    grid-template-columns: 1fr;
  }

  .panel {
    border-radius: 24px;
    padding: 12px;
  }

  .board {
    gap: 1px;
    padding: 6px;
  }
}
