@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  color-scheme: dark;
  --bg: #101c21;
  --panel: #152329;
  --line: #2a383c;
  --text: #e9ece3;
  --muted: #92a19f;
  --gold: #e3bd73;
  --green: #98bb82;
}
.install-panel {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.install-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.install-row > div {
  flex: 1;
  min-width: 180px;
}
.install-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0;
}
.install-panel summary {
  cursor: pointer;
  color: var(--gold);
  padding-top: 10px;
  font-size: 13px;
}
.install-panel button {
  min-height: 44px;
}
.install-panel [hidden] {
  display: none;
}
@media (display-mode: standalone) {
  body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
    overscroll-behavior-y: none;
  }
}
.mega-button {
  background: #463554;
  color: #eed0ff;
  border: 1px solid #a486ba;
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 14px;
}
.ability-bar {
  flex-wrap: wrap;
}
#modal-tabs {
  flex-wrap: wrap;
}
.mega-collection {
  background: #2e343f;
  border: 1px solid #726187;
  border-radius: 7px;
  padding: 16px;
  margin: 16px 0;
  color: #edd2ff;
}
.mega-collection p {
  margin-bottom: 0;
  font-size: 14px;
}
.mega-mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.mega-mission-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #203237;
  border: 1px solid #53605d;
  border-radius: 9px;
}
.mega-card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: radial-gradient(ellipse, #a17ec127, transparent 70%);
  margin-bottom: 12px;
}
.mega-card-art img {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
}
.mega-card-art span {
  color: var(--gold);
  font-size: 22px;
}
.mega-mission-card h3 {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  margin: 8px 0;
}
.mega-mission-card p {
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0;
}
.mega-mission-card .mega-requirement {
  flex: 1;
  color: #d8c69c !important;
}
.mega-mission-card button {
  margin-top: 12px;
  font-size: 14px;
}
.mega-reward {
  text-align: center;
  padding: 12px 0;
}
.mega-reward > img {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}
.mega-reward h3 {
  color: #edcaff;
  font-size: 27px;
  font-family: Georgia, serif;
}
#abandon-mega {
  display: block;
  margin-top: 12px;
}
@media (max-width: 650px) {
  .mega-mission-grid {
    grid-template-columns: 1fr;
  }
  .mega-button {
    font-size: 12px;
    padding: 9px;
  }
  .mega-mission-card {
    padding: 16px;
  }
  .mega-card-art img {
    width: 104px;
    height: 104px;
  }
  #modal-tabs {
    gap: 4px;
  }
  .tab {
    flex: 1 1 40%;
  }
}
.stamina-meter {
  height: 6px;
  width: 110px;
  background: #192f32;
  border: 1px solid #638274;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.stamina-meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: #80d5b1;
  transition: width 0.1s;
}
.ability-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0 0;
}
.power-button {
  padding: 10px 14px;
  border: 1px solid #947e51;
  background: #4a472d;
  color: #f9dfa0;
  border-radius: 5px;
  font-size: 14px;
}
#puzzle-status {
  font-size: 12px;
  color: #b4c4b7;
  text-align: right;
}
.companion-stats {
  font-size: 12px;
  line-height: 1.7;
  color: #d8dec9;
}
.companion-power {
  font-size: 12px !important;
  color: var(--gold) !important;
}
.restart-notice {
  padding: 13px;
  border: 1px solid #665e3e;
  background: #383e2e;
  border-radius: 6px;
  font-size: 14px;
}
.pokemon-choice .stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
  font-size: 15px;
  width: 100%;
  text-align: center;
}
.pokemon-choice .stat-grid small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.pokemon-choice .power-name {
  font-size: 14px;
  color: var(--gold);
  text-align: center;
}
.pokemon-choice .power-description {
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
  text-align: center;
}
.pokemon-choice .secondary,
.pokemon-choice .evolve-button {
  width: 100%;
  margin-top: 12px;
  font-size: 13px;
}
.evolve-button {
  background: #424b32;
  color: #edd394;
  border: 1px solid #8e895a;
  padding: 10px 7px;
  border-radius: 4px;
}
.xp-track {
  height: 5px;
  width: 100%;
  background: #394c44;
  margin: 10px 0 6px;
  border-radius: 3px;
  overflow: hidden;
}
.xp-track i {
  display: block;
  height: 100%;
  background: var(--gold);
}
.touch-actions {
  display: grid;
  grid-template-columns: repeat(2, 50px);
  align-items: center;
  gap: 5px;
}
#touch-power {
  background: #5a4c6b;
  border-color: #a688c3;
  color: #eddbff;
}
@media (max-width: 650px) {
  .ability-bar {
    align-items: flex-start;
    gap: 8px;
  }
  .power-button {
    font-size: 12px;
    white-space: nowrap;
    padding: 9px;
  }
  #puzzle-status {
    font-size: 12px;
  }
  .pokemon-grid {
    grid-template-columns: 1fr !important;
  }
  .hearts {
    font-size: 17px !important;
  }
  .stamina-meter {
    width: 85px;
    height: 5px;
    margin-top: 3px;
  }
  .boss-hud {
    top: 70px !important;
    width: 70% !important;
    left: 15% !important;
    font-size: 11px !important;
  }
  .touch-actions > button {
    width: 45px !important;
    height: 45px !important;
  }
  .game-hud #player-name {
    font-size: 10px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
button,
a,
canvas {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button {
  border: 0;
}
button:hover:not(:disabled) {
  filter: brightness(1.14);
}
.topbar {
  height: 90px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5%;
  gap: 24px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand-mark {
  font-size: 47px;
  color: var(--gold);
}
.brand small {
  font:
    500 10px "DM Sans",
    sans-serif;
  display: block;
  letter-spacing: 3px;
  color: var(--muted);
  margin-top: 4px;
}
.gold {
  color: var(--gold);
}
nav {
  display: flex;
  height: 100%;
  gap: 34px;
}
.nav {
  background: none;
  position: relative;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
}
.nav.active {
  color: var(--gold);
}
.nav.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}
.prototype {
  font-size: 10px;
  letter-spacing: 1.5px;
  border: 1px solid #425049;
  color: #b4c3ac;
  padding: 7px 10px;
  border-radius: 4px;
}
.icon-button {
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
}
main {
  max-width: 1650px;
  margin: auto;
  padding: 32px 3.5% 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--muted);
}
h1 {
  font:
    400 29px Georgia,
    serif;
  margin: 10px 0 0;
}
h1 em {
  font-weight: 400;
  color: #aab5aa;
}
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  margin: 8px 0;
}
.home-button {
  background: var(--gold);
  color: #26302b;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 5px;
  padding: 11px 16px;
  font-size: 18px;
  font-weight: 600;
}
.home-button kbd {
  background: #d1ac65;
  border-color: #c2a261;
  color: #574725;
}
.game-layout {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr) 216px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}
.journey {
  padding: 23px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 700;
  gap: 6px;
  color: #aebcb5;
}
.tiny {
  font-size: 9px;
  color: #718783;
  letter-spacing: 0.6px;
}
.world-card {
  margin-top: 23px;
}
.world-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
}
.world-icon {
  display: grid;
  place-items: center;
  background: #273b33;
  border: 1px solid #3e5444;
  color: #adcc8c;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 19px;
}
.world-card.locked {
  opacity: 0.46;
}
.world-card:nth-child(2) .world-icon {
  color: #8bbacc;
  background: #253844;
  border-color: #3a4f59;
}
.world-card:nth-child(3) .world-icon {
  color: #da9e7e;
  background: #3a302b;
  border-color: #5c4438;
}
.world-levels {
  margin: 12px 0 0 15px;
  border-left: 1px solid #3c4a40;
  display: grid;
  gap: 7px;
}
.level-link {
  background: transparent;
  text-align: left;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 9px 6px 9px 11px;
  width: calc(100% + 3px);
}
.level-link.selected {
  color: var(--gold);
  background: #353a2c;
  border: 1px solid #625a3d;
  margin-left: -1px;
}
.level-node {
  font-size: 10px;
  min-width: 10px;
}
.journey-bottom {
  margin-top: auto;
  padding-top: 36px;
  text-align: center;
  color: #809189;
  font-size: 11px;
  line-height: 1.7;
}
.sigil {
  font-size: 40px;
  color: #586c59;
}
.progress-track {
  height: 3px;
  background: #304039;
  margin: 18px 0 10px;
}
.progress-track i {
  display: block;
  background: var(--gold);
  height: 100%;
  transition: width 0.3s;
}
.play-column {
  padding: 22px 22px 18px;
  min-width: 0;
}
.level-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.level-heading .eyebrow {
  color: #9fba8a;
  font-size: 9px;
}
.level-heading h2 {
  font-size: 25px;
  margin-top: 7px;
}
.level-badge {
  font-size: 9px;
  letter-spacing: 1px;
  border: 1px solid #425046;
  background: #22332d;
  color: #b8c2ad;
  padding: 7px 9px;
  border-radius: 4px;
}
.game-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #506144;
  box-shadow: 0 4px 20px #070f1638;
  background: #2f573c;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 960/576;
  image-rendering: pixelated;
  touch-action: none;
}
.game-hud {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  text-shadow: 1px 2px #173727;
}
.hearts {
  font-size: 23px;
  letter-spacing: 1px;
  color: #ff7971;
}
.game-hud #player-name {
  font-size: 9px;
  color: #e6ecbd;
  font-weight: 700;
  letter-spacing: 1px;
}
.hud-items {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.hud-items span {
  background: #172b27dd;
  border: 1px solid #72907365;
  border-radius: 4px;
  padding: 7px 10px;
  color: #f2dc97;
  font-size: 12px;
}
.location-tag {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e4ecba;
  background: #19362cc9;
  padding: 8px 10px;
  border: 1px solid #83955a40;
}
.pause-button {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #183029db;
  width: 30px;
  height: 30px;
  border: 1px solid #728662;
  color: #e4dcad;
  border-radius: 4px;
}
.game-prompt {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  width: max-content;
  border-radius: 4px;
  background: #112621df;
  color: #fff4c9;
  font-size: 12px;
  padding: 8px 13px;
  text-align: center;
  pointer-events: none;
}
.objective {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #1d302e;
  border: 1px solid #3d5146;
  border-radius: 5px;
  padding: 15px;
  margin-top: 16px;
}
.objective-icon {
  font-size: 29px;
  color: var(--gold);
}
.objective .eyebrow {
  color: var(--gold);
  font-size: 9px;
}
.objective p {
  font-size: 13px;
  margin: 5px 0 0;
  line-height: 1.5;
}
.objective button {
  margin-left: auto;
  background: none;
  color: #b5c2ac;
  font-size: 11px;
  white-space: nowrap;
}
.objective button span {
  margin-left: 8px;
}
.control-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  font-size: 9px;
  color: var(--muted);
  padding-top: 17px;
  align-items: center;
}
.control-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
kbd {
  font:
    9px "DM Sans",
    sans-serif;
  background: #243238;
  border: 1px solid #465152;
  border-radius: 3px;
  padding: 3px 4px;
  color: #c5cec7;
}
.inventory-panel {
  border-left: 1px solid var(--line);
  padding: 23px 17px;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aed58f;
}
.companion {
  text-align: center;
  padding: 23px 0 20px;
}
.portrait {
  margin: auto;
  display: grid;
  place-items: center;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #4b50304d 0%,
    #353e3040 55%,
    transparent 56%
  );
  border: 1px solid #394839;
  outline: 1px dashed #334331;
  outline-offset: 7px;
}
.portrait img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 4px #070c1460);
}
.companion h2 {
  font-size: 25px;
  margin-top: 17px;
}
.type-badge {
  display: inline-block;
  color: #e5cf6c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  background: #3b3c27;
  border: 1px solid #555336;
  border-radius: 4px;
  padding: 4px 8px;
}
.companion p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.equipment {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.equipment .eyebrow {
  font-size: 9px;
}
.weapon-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1c2c31;
  border: 1px solid #354348;
  border-radius: 5px;
  padding: 11px 8px;
  margin-top: 10px;
}
.weapon-icon {
  font-size: 28px;
  color: #cddbcc;
}
.weapon-card strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.weapon-card small {
  display: block;
  font-size: 10px;
  color: #899c96;
  margin-top: 5px;
}
.bag {
  margin-top: 26px;
}
.bag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  font-size: 12px;
  color: #aebcb3;
}
.bag-row b {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: #e4e9d6;
}
.item-icon {
  font-size: 19px;
  width: 22px;
  text-align: center;
  color: var(--gold);
}
.workshop-link {
  background: transparent;
  border: 1px solid #46504a;
  width: 100%;
  padding: 10px;
  font-size: 11px;
  border-radius: 4px;
  margin-top: 23px;
  text-align: left;
}
.workshop-link span {
  float: right;
}
.save-note {
  font-size: 9px;
  color: #778d83;
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #647a75;
  font-size: 10px;
  padding: 22px 0 25px;
  gap: 20px;
}
footer > span:first-child {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: #8b9a8f;
}
.touch-controls {
  display: none;
}
.boss-hud {
  position: absolute;
  top: 70px;
  width: 46%;
  left: 27%;
  text-align: center;
  font-size: 12px;
  text-shadow: 1px 2px #000;
  color: #ffdfb0;
}
.boss-hud > div {
  background: #322027;
  border: 1px solid #c48a74;
  padding: 2px;
  margin-top: 5px;
}
.boss-hud i {
  display: block;
  height: 7px;
  background: #e66b5c;
}
.paused-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-direction: column;
  backdrop-filter: blur(4px);
  background: #122629b0;
  letter-spacing: 3px;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
dialog {
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow: auto;
  background: #18292e;
  border: 1px solid #67725b;
  border-radius: 12px;
  padding: 26px;
  color: var(--text);
  box-shadow: 0 30px 100px #000a;
}
dialog::backdrop {
  background: #08151bba;
  backdrop-filter: blur(5px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  font-size: 32px;
}
.dialog-head .eyebrow {
  font-size: 10px;
  color: var(--gold);
}
#modal-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0;
  border-bottom: 1px solid #425249;
  padding-bottom: 12px;
}
.tab {
  background: none;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 4px;
}
.tab.active {
  background: #414735;
  color: #efd18a;
}
#modal-content {
  font-size: 15px;
  line-height: 1.6;
}
#modal-content p {
  color: #b0bfb5;
}
.primary {
  background: var(--gold);
  color: #21312c;
  padding: 11px 20px;
  border-radius: 5px;
  font-weight: 600;
}
.secondary {
  background: #2e4645;
  border: 1px solid #516d5c;
  padding: 10px 16px;
  border-radius: 5px;
}
.recipe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #344741;
}
.recipe h3 {
  margin: 0;
  font-size: 17px;
}
.recipe p {
  margin: 5px 0;
  font-size: 13px;
}
.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.pokemon-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #203638;
  border: 1px solid #3d574a;
  border-radius: 8px;
  padding: 13px;
  font-size: 14px;
}
.pokemon-choice.chosen {
  border-color: var(--gold);
  background: #343f32;
}
.pokemon-choice img {
  width: 90px;
  height: 90px;
  image-rendering: pixelated;
}
.pokemon-choice small {
  color: #aebfaf;
  font-size: 11px;
}
.egg-center {
  text-align: center;
  padding: 20px;
}
.egg-visual {
  font-size: 70px;
}
.egg-center h3 {
  font-family: Georgia, serif;
  font-size: 28px;
}
.reward-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 18px;
  color: var(--gold);
}
.map-world {
  border: 1px solid #3b5548;
  border-radius: 7px;
  margin: 14px 0;
  padding: 18px;
}
.map-world h3 {
  margin: 0 0 12px;
}
.map-levels {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.map-levels button {
  background: #2b4240;
  padding: 10px;
  border: 1px solid #52715b;
  border-radius: 4px;
  font-size: 12px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: 0.25s;
  pointer-events: none;
  padding: 13px 22px;
  color: #f9e5b0;
  border: 1px solid #9e9460;
  border-radius: 6px;
  background: #24372b;
  z-index: 10;
  max-width: 90%;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.help-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
}
.help-list kbd {
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.eyebrow,
.section-heading,
.tiny,
.level-heading .eyebrow,
.level-badge,
.objective .eyebrow,
.equipment .eyebrow {
  font-size: 12px;
  letter-spacing: 0.8px;
}
.section-heading {
  flex-wrap: wrap;
}
.tiny {
  font-size: 12px;
}
.level-link,
.world-name,
.bag-row,
.weapon-card strong {
  font-size: 14px;
}
.companion p,
.weapon-card small,
.type-badge,
.journey-bottom,
.workshop-link,
.save-note,
.objective button,
.control-legend,
.control-legend kbd,
.pokemon-choice small {
  font-size: 12px;
}
.objective p {
  font-size: 14px;
}
.game-hud #player-name,
.location-tag {
  font-size: 12px;
  letter-spacing: 0.6px;
}
.companion p {
  line-height: 1.6;
}
.prototype {
  font-size: 12px;
}
.control-legend {
  gap: 10px;
}
.level-heading {
  gap: 12px;
}
.level-badge {
  white-space: nowrap;
}
.brand small {
  font-size: 12px;
  letter-spacing: 1px;
}
@media (min-width: 1500px) {
  .game-layout {
    grid-template-columns: 225px minmax(0, 1fr) 236px;
  }
  .play-column {
    padding: 24px;
  }
}
@media (max-width: 1180px) {
  main {
    padding: 24px 2% 0;
  }
  .topbar {
    padding: 0 2%;
  }
  .game-layout {
    grid-template-columns: 175px minmax(0, 1fr) 180px;
  }
  .play-column {
    padding: 17px 14px;
  }
  .journey {
    padding: 20px 10px;
  }
  .inventory-panel {
    padding: 20px 11px;
  }
  .prototype {
    display: none;
  }
  .control-legend {
    gap: 8px;
  }
  .level-heading h2 {
    font-size: 22px;
  }
  h1 {
    font-size: 26px;
  }
  .objective {
    padding: 11px;
  }
}
@media (max-width: 950px) {
  .game-layout {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .inventory-panel {
    display: none;
  }
  .topbar {
    height: 76px;
  }
  h1 {
    font-size: 24px;
  }
  nav {
    gap: 20px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .level-heading {
    align-items: flex-start;
  }
  .level-heading .eyebrow {
    font-size: 12px;
  }
  .level-badge {
    font-size: 12px;
  }
}
@media (max-width: 650px) {
  .topbar {
    height: 70px;
    gap: 10px;
    padding: 0 12px;
  }
  .brand {
    font-size: 18px;
    gap: 5px;
  }
  .brand-mark {
    font-size: 30px;
  }
  .brand small {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
  .nav {
    font-size: 19px;
  }
  .nav span {
    display: none;
  }
  nav {
    gap: 14px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions .icon-button {
    width: 29px;
    height: 29px;
  }
  main {
    padding: 22px 12px 0;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-heading .eyebrow {
    font-size: 12px;
  }
  h1 {
    font-size: 23px;
    line-height: 1.35;
    max-width: 260px;
  }
  h1 em {
    display: block;
  }
  .home-button {
    padding: 9px 10px;
    font-size: 15px;
    gap: 6px;
  }
  .home-button kbd {
    display: none;
  }
  .game-layout {
    display: block;
  }
  .journey {
    display: none;
  }
  .play-column {
    padding: 16px 10px;
  }
  .level-heading {
    margin-bottom: 12px;
  }
  .level-heading h2 {
    font-size: 22px;
  }
  .level-heading .eyebrow {
    font-size: 12px;
    letter-spacing: 0.4px;
  }
  .level-badge {
    font-size: 12px;
    padding: 5px;
  }
  .game-frame {
    margin: 0 -5px;
  }
  .game-hud {
    top: 8px;
    left: 9px;
    right: 9px;
  }
  .hearts {
    font-size: 16px;
  }
  .game-hud #player-name {
    font-size: 10px;
  }
  .hud-items {
    gap: 4px;
  }
  .hud-items span {
    padding: 4px 6px;
    font-size: 12px;
  }
  .location-tag {
    font-size: 10px;
    bottom: 9px;
    left: 8px;
    padding: 5px;
  }
  .game-prompt {
    font-size: 12px;
    bottom: 38px;
    padding: 5px 8px;
  }
  .boss-hud {
    top: 48px;
    font-size: 12px;
  }
  .objective {
    gap: 8px;
  }
  .objective p {
    font-size: 14px;
  }
  .objective button {
    font-size: 12px;
    padding: 0;
  }
  .touch-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4px 0;
  }
  .touch-controls button {
    width: 43px;
    height: 43px;
    margin: 2px;
    background: #283e3d;
    border: 1px solid #587060;
    border-radius: 6px;
    font-size: 19px;
    touch-action: none;
    user-select: none;
  }
  .touch-controls > div:last-child button:first-child {
    background: #635b3b;
    border-color: #bba269;
    color: #f1da99;
    width: 55px;
    height: 55px;
  }
  .dpad {
    display: grid;
    grid-template-columns: repeat(3, 43px);
    gap: 2px;
  }
  .dpad button {
    margin: 0;
  }
  .dpad button:first-child {
    grid-column: 2;
  }
  .dpad button:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .dpad button:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .dpad button:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
  }
  .control-legend {
    display: none;
  }
  footer {
    display: block;
    text-align: center;
    line-height: 1.8;
    font-size: 12px;
  }
  footer span {
    display: block;
  }
  dialog {
    padding: 20px;
  }
  .pokemon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .recipe {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .tab {
    padding: 8px 10px;
    font-size: 14px;
  }
}
@media (pointer: coarse) and (min-width: 651px) {
  .touch-controls {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
  }
  .touch-controls button {
    background: #324a41;
    padding: 14px;
    margin: 3px;
    border-radius: 5px;
    touch-action: none;
  }
  .control-legend {
    display: none;
  }
}
.dex-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  margin: 20px 0;
}
.dex-heading strong {
  color: var(--gold);
  font-size: 20px;
}
.dex-heading span,
.dex-number,
.dex-locked {
  font-size: 14px;
  color: var(--muted);
}
.dex-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
.dex-filters label,
.egg-generation {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.dex-filters label:first-child {
  flex: 1 1 220px;
}
.dex-filters input[type="search"],
.dex-filters select,
.egg-generation select {
  min-width: 0;
  width: 100%;
  background: #142c26;
  border: 1px solid #6b7d5d;
  color: #f7ecd0;
  padding: 11px;
  border-radius: 6px;
  font: inherit;
  font-size: 16px;
}
.dex-filters .dex-owned {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
}
.dex-owned input {
  width: 18px;
  height: 18px;
  accent-color: #d6c485;
}
.dex-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 24px 0;
}
.dex-pagination button {
  min-height: 44px;
}
.dex-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 0;
}
.dex-locked {
  display: block;
  border-top: 1px solid #536347;
  padding-top: 12px;
  margin-top: auto;
}
.egg-generation {
  max-width: 320px;
  margin: 20px auto;
  text-align: left;
}
.pokemon-choice {
  min-width: 0;
}
.pokemon-choice img {
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .dex-filters label {
    width: 100%;
  }
  .dex-pagination {
    gap: 10px;
  }
  .dex-pagination button {
    padding: 10px;
  }
}
#world-list {
  max-height: 620px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.world-card > summary {
  cursor: pointer;
  min-height: 44px;
  list-style: none;
}
.world-card > summary::after {
  content: "+";
  margin-left: auto;
}
.world-card[open] > summary::after {
  content: "−";
}
.map-levels {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  display: grid;
}
.map-levels button {
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
.save-panel label {
  display: block;
  margin: 18px 0 8px;
  font-size: 16px;
}
.save-panel textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 90px;
  resize: vertical;
  background: #142c26;
  color: #f7ecd0;
  border: 1px solid #6b7d5d;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  overflow-wrap: anywhere;
  margin-bottom: 12px;
}
