@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./vendor/fonts/font-0.ttf) format("truetype");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./vendor/fonts/font-1.ttf) format("truetype");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(./vendor/fonts/font-2.ttf) format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./vendor/fonts/font-3.ttf) format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./vendor/fonts/font-4.ttf) format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./vendor/fonts/font-5.ttf) format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./vendor/fonts/font-6.ttf) format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(./vendor/fonts/font-7.ttf) format("truetype");
}
:root {
  --ui-scale: 1;
  font-family: "DM Sans", sans-serif;
  color: #f6fbff;
  --navy: #142b3c;
  --lime: #d7f578;
  --gold: #ffd36b;
  --muted: #afc4cf;
  --line: #ffffff18;
  --surface: #172e40;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  background: #96c4d3;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  transition:
    transform 0.18s var(--ease),
    background 0.18s,
    box-shadow 0.18s;
}
button:hover {
  filter: brightness(1.09);
}
button:active {
  transform: scale(0.96);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
button i {
  pointer-events: none;
}
i {
  display: inline-flex;
  font-style: normal;
}
i svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
small {
  font-size: 12px;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: max(24px, env(safe-area-inset-top))
    max(26px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(26px, env(safe-area-inset-left));
  z-index: 2;
}
#hud button,
#hud nav,
#joystick {
  pointer-events: auto;
}
.glass {
  background: #142b3ce8;
  border: 1px solid #ffffff1c;
  box-shadow: 0 6px 25px #15333b12;
  backdrop-filter: blur(12px);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--navy);
  text-shadow: 0 1px 1px #fff4;
}
.brand-mark,
.load-mark {
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: -5px;
  background: var(--navy);
  color: white;
  width: 45px;
  height: 47px;
  border-radius: 13px;
  transform: rotate(-6deg);
}
.brand-mark span,
.load-mark span {
  color: var(--lime);
  display: inline;
  margin-top: -34px;
  margin-left: 13px;
}
.brand strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 27px;
  letter-spacing: 1px;
  display: block;
  line-height: 1;
}
.brand strong span {
  font-weight: 600;
}
.brand small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 800;
}
.stats {
  display: flex;
  gap: 8px;
}
.stat {
  min-width: 132px;
  background: #142b3cf0;
  border: 1px solid #ffffff14;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 17px;
  text-align: left;
  box-shadow: 0 5px 16px #21413412;
}
.stat i {
  color: var(--lime);
  padding: 8px;
  border-radius: 11px;
  background: #d7f57813;
}
.stat strong {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  display: block;
  letter-spacing: 0.5px;
}
.stat small {
  color: #a9bccb;
  display: block;
  letter-spacing: 1.1px;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 3px;
}
.stat.coins i {
  color: var(--gold);
  background: #ffd36b12;
}
.stat.rebirths i {
  color: #bea6ff;
  background: #bea6ff14;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #ffffff0b;
  flex-shrink: 0;
}
.zone-badge {
  position: absolute;
  top: 114px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 15px;
  border-radius: 30px;
  font-size: 13px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px #d7f57055;
}
.zone-mult {
  color: var(--lime);
  padding: 5px 9px;
  border-radius: 20px;
  background: #d7f5781a;
  font-weight: 800;
}
.side-nav {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-48%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-nav button {
  position: relative;
  width: 76px;
  height: 68px;
  border: 1px solid #ffffff25;
  background: #142b3cee;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-shadow: 0 6px 20px #16343b12;
}
.side-nav button:first-child {
  background: var(--lime);
  color: var(--navy);
  border-color: #fff6;
}
.side-nav span {
  font-size: 11px;
  font-weight: 700;
}
.side-nav b {
  position: absolute;
  top: -4px;
  right: -4px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--navy);
  padding: 2px 5px;
  font-size: 10px;
  min-width: 17px;
}
.quest-peek {
  position: absolute;
  right: 26px;
  top: 126px;
  width: 236px;
  padding: 20px;
  border-radius: 18px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.eyebrow i svg {
  width: 15px;
  height: 15px;
}
.quest-peek strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 25px;
  margin-top: 13px;
  letter-spacing: 0.2px;
}
.quest-peek p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 16px;
}
.progress {
  background: #ffffff13;
  border-radius: 10px;
  overflow: hidden;
  height: 6px;
}
.progress > span {
  height: 100%;
  background: var(--lime);
  display: block;
  transition: width 0.3s;
}
.quest-peek footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-top: 9px;
  color: var(--muted);
}
.quest-peek footer button {
  font-size: 10px;
  color: var(--lime);
  background: none;
  padding: 4px 0;
}
.right-tools {
  position: absolute;
  right: 26px;
  top: 325px;
  display: flex;
  gap: 7px;
}
.right-tools button {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  padding: 11px;
  font-size: 11px;
}
.right-tools svg {
  width: 18px;
  height: 18px;
}
.world-caption {
  position: absolute;
  left: 125px;
  bottom: 175px;
  color: var(--navy);
  pointer-events: none;
  text-shadow: 0 2px 20px #c3e0d8;
}
.world-caption small {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
}
.world-caption strong {
  display: block;
  margin-top: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 34px;
  line-height: 1.03;
  font-weight: 600;
  letter-spacing: 0.1px;
}
.bottom-hud {
  position: absolute;
  bottom: 40px;
  left: 26px;
  right: 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.equipped {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 15px;
  padding: 16px;
  border-radius: 16px;
  width: max-content;
  max-width: 100%;
}
.equipped > i {
  color: var(--lime);
  padding: 11px;
  background: #ffffff0a;
  border-radius: 13px;
}
.equipped small {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.equipped strong {
  font-size: 14px;
  display: block;
}
.equipped div > span {
  font-size: 11px;
  color: var(--lime);
  display: block;
  margin-top: 5px;
}
.key-hint {
  font-size: 9px;
  padding: 5px;
  background: #ffffff0b;
  border-radius: 4px;
  color: var(--muted);
  margin-left: 8px;
}
.train-wrap {
  text-align: center;
  align-self: end;
  position: relative;
}
.train {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  min-width: 232px;
  height: 78px;
  border-radius: 19px;
  background: var(--lime);
  color: var(--navy);
  border: 1px solid #ffffff85;
  box-shadow:
    0 5px 0 #779d39,
    0 12px 28px #16352b35;
  touch-action: none;
  user-select: none;
}
.train > i svg {
  width: 34px;
  height: 34px;
}
.train > span:not(#train-fill) {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
}
.train small {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 1.8px;
  margin-top: 6px;
}
.train kbd {
  background: #142b3c13;
  color: #203626;
}
.train:active,
.train.held {
  box-shadow:
    0 2px 0 #779d39,
    0 8px 22px #16352b22;
  transform: translateY(3px);
}
#train-fill {
  position: absolute;
  z-index: -1;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: #fff3;
  pointer-events: none;
}
.train-hint {
  position: absolute;
  top: 91px;
  left: -20px;
  right: -20px;
  color: #244846;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.desktop-controls {
  justify-self: end;
  display: grid;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  border-radius: 13px;
  padding: 14px 17px;
}
.desktop-controls span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.desktop-controls span:last-child {
  font-size: 9px;
  color: #89a3b3;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  padding: 4px 6px;
  border: 1px solid #ffffff15;
  border-radius: 4px;
  background: #ffffff0a;
  color: #ecf3f6;
}
.save-status {
  position: absolute;
  bottom: 9px;
  left: 27px;
  font-size: 9px;
  color: #244846;
}
.interact {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 14px;
  padding: 12px 18px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  display: flex;
}
.interact[hidden] {
  display: none;
}
.interact kbd {
  color: var(--lime);
}
#joystick,
.touch-jump,
.touch-run {
  display: none;
}
#world-labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.world-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  white-space: nowrap;
  will-change: transform;
  filter: drop-shadow(0 2px 3px #18374633);
}
.world-label b {
  display: block;
  color: #fff;
  text-transform: uppercase;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  text-shadow: 0 2px 5px #142b3caa;
}
.world-label span {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 30px;
  font-size: 10px;
  color: var(--navy);
  background: var(--lime);
  font-weight: 800;
  margin-top: 4px;
}
.world-label.gold span {
  background: var(--gold);
}
#floats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}
.float {
  position: absolute;
  left: 50%;
  top: 45%;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 32px;
  color: #edffb5;
  text-shadow:
    0 2px 2px #14362b,
    0 0 8px #14362b;
  font-weight: 800;
  animation: float-up 1.15s forwards;
}
.float.coin-float {
  color: #ffe09c;
  font-size: 23px;
  top: 51%;
}
@keyframes float-up {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.75);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -16px) scale(1.12);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -95px) scale(1);
  }
}
#toasts {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
  width: min(390px, calc(100% - 30px));
}
.toast {
  padding: 14px 18px;
  border: 1px solid #ffffff25;
  border-radius: 13px;
  background: #142b3cf5;
  color: white;
  font-size: 13px;
  box-shadow: 0 8px 30px #10253230;
  animation: toast-in 0.2s;
}
.toast.error {
  border-color: #ff9a8c;
  color: #ffc7be;
}
.toast.success {
  border-color: #d7f578;
  color: #e4ffa7;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #152e3e;
  z-index: 50;
  transition: opacity 0.4s;
  gap: 10px;
}
#loading h1 {
  font-family: "Barlow Condensed";
  font-size: 46px;
  margin: 12px 0 0;
}
#loading p {
  font-size: 14px;
  color: var(--muted);
}
.load-mark {
  width: 65px;
  height: 65px;
  font-size: 37px;
  background: #203e51;
}
.load-mark span {
  margin-top: -45px;
  margin-left: 18px;
}
.load-line {
  width: 170px;
  height: 4px;
  background: #ffffff15;
  border-radius: 3px;
  overflow: hidden;
}
.load-line:after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: var(--lime);
  animation: loading 1s infinite alternate;
}
@keyframes loading {
  to {
    transform: translateX(150%);
  }
}
[hidden] {
  display: none !important;
}
dialog {
  padding: 0;
  border: 1px solid #ffffff22;
  background: #142b3cfb;
  color: #f6fbff;
  border-radius: 24px;
  width: min(860px, calc(100% - 36px));
  max-height: calc(100dvh - 72px);
  box-shadow: 0 25px 100px #051a3680;
  overflow: hidden;
}
dialog::backdrop {
  background: #08233380;
  backdrop-filter: blur(8px);
}
.modal-header {
  padding: 25px 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal-header h1 {
  font:
    700 36px/1 "Barlow Condensed",
    sans-serif;
  margin: 9px 0 0;
  letter-spacing: 0.5px;
}
#menu-tabs {
  display: flex;
  gap: 6px;
  padding: 16px 28px 0;
  overflow-x: auto;
}
#menu-tabs:empty {
  display: none;
}
#menu-tabs button {
  padding: 10px 17px;
  border-radius: 9px;
  background: #ffffff08;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
#menu-tabs button.active {
  color: var(--navy);
  background: var(--lime);
  font-weight: 800;
}
#menu-content {
  overflow: auto;
  max-height: calc(100dvh - 240px);
  padding: 24px 28px 28px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #557582 transparent;
}
.muted {
  color: var(--muted);
}
.intro {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 20px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff04;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.card.owned {
  border-color: #d7f57860;
}
.card h3 {
  font-size: 15px;
  margin: 0;
}
.card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.card .visual {
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--item-color, var(--lime));
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--item-color, var(--lime)) 15%, transparent),
    transparent 70%
  );
  font-size: 44px;
}
.visual i svg {
  width: 53px;
  height: 53px;
  stroke-width: 1.4;
}
.tag {
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--item-color, var(--lime));
  text-transform: uppercase;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
}
.price {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}
.btn {
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  background: var(--lime);
  color: var(--navy);
  min-height: 42px;
}
.btn.secondary {
  background: #ffffff0d;
  color: #edf5f8;
  border: 1px solid var(--line);
}
.btn.danger {
  background: #ef827415;
  color: #ffae9f;
  border: 1px solid #ef82744a;
}
.btn.wide {
  width: 100%;
}
.pill {
  padding: 4px 8px;
  border-radius: 6px;
  background: #ffffff09;
  color: var(--muted);
  font-size: 11px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar select,
select {
  background: #203d50;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  font-size: 13px;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  line-height: 1.8;
}
.empty i {
  display: flex;
  justify-content: center;
  color: var(--lime);
  margin-bottom: 16px;
}
.empty svg {
  width: 46px;
  height: 46px;
}
.empty h2 {
  font-family: "Barlow Condensed";
  color: white;
  font-size: 30px;
}
.pet-actions {
  display: flex;
  gap: 5px;
}
.pet-actions button {
  background: #ffffff08;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  color: var(--muted);
}
.pet-actions button.on {
  color: var(--gold);
  background: #ffd36b15;
}
.pet-actions svg {
  width: 16px;
  height: 16px;
}
.list {
  display: grid;
  gap: 10px;
}
.list-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff04;
  padding: 17px;
  display: flex;
  gap: 17px;
  align-items: center;
}
.list-row > .badge {
  height: 48px;
  width: 48px;
  flex-shrink: 0;
  background: #d7f5780a;
  color: var(--lime);
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.list-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.list-row h3 {
  font-size: 14px;
  margin: 0 0 6px;
}
.list-row p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  color: var(--muted);
}
.list-row .progress {
  margin-top: 10px;
  height: 4px;
}
.list-row .btn {
  flex-shrink: 0;
}
.large-value {
  font-family: "Barlow Condensed";
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
}
.rebirth-summary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  text-align: center;
  padding: 25px;
  background: #bca4ff08;
  border: 1px solid #bca4ff33;
  border-radius: 16px;
  margin-bottom: 20px;
}
.rebirth-summary .large-value {
  color: #c9b6ff;
}
.note {
  padding: 16px;
  border-radius: 12px;
  background: #ffffff05;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 15px 0;
}
.note strong {
  color: #fff;
}
.confirmation {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin: 20px 0;
}
.confirmation input {
  width: 20px;
  height: 20px;
  accent-color: var(--lime);
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.settings-row label {
  font-size: 14px;
}
.settings-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.switch {
  appearance: none;
  width: 43px;
  height: 25px;
  background: #49606d;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.switch:after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  top: 4px;
  left: 4px;
  transition: transform 0.2s;
}
.switch:checked {
  background: #8faf4e;
}
.switch:checked:after {
  transform: translateX(18px);
}
input[type="range"] {
  accent-color: var(--lime);
  width: 130px;
}
.days {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.day {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 10px;
}
.day.current {
  border-color: var(--lime);
  background: #d7f5780a;
}
.day strong {
  display: block;
  font-size: 13px;
  margin-bottom: 12px;
}
.day i {
  color: var(--gold);
  margin: 6px;
}
.day span {
  display: block;
  font-size: 12px;
  color: var(--gold);
}
.day small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}
.zone-card {
  border-left: 3px solid var(--item-color);
  padding-left: 16px;
}
.zone-card .visual {
  font-family: "Barlow Condensed";
  font-size: 38px;
  font-weight: 700;
}
.egg-odds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.egg-odds > div {
  padding: 15px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
}
.egg-odds b {
  font-size: 35px;
  display: block;
  margin-bottom: 9px;
}
.egg-odds strong {
  display: block;
  font-size: 12px;
  margin: 6px 0;
}
.egg-odds span {
  font-size: 12px;
  color: var(--gold);
}
.egg-odds small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.hatch-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.hatch-actions .btn {
  min-width: 150px;
}
.hatch-scene {
  text-align: center;
  padding: 50px 25px;
  min-height: 300px;
}
.hatch-scene h2 {
  font: 700 38px "Barlow Condensed";
  margin: 12px;
}
.hatch-scene p {
  font-size: 13px;
  color: var(--muted);
}
.hatch-eggs {
  font-size: 85px;
  padding: 20px;
  letter-spacing: 20px;
  animation: wobble 0.18s infinite alternate;
}
.hatch-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 25px 0;
}
.hatch-pet {
  border: 1px solid var(--item-color);
  background: radial-gradient(
    ellipse at top,
    color-mix(in srgb, var(--item-color) 22%, transparent),
    transparent
  );
  border-radius: 18px;
  padding: 24px;
  min-width: 160px;
  animation: reveal 0.45s var(--ease);
}
.hatch-pet > span {
  font-size: 60px;
  display: block;
}
.hatch-pet h3 {
  font-size: 17px;
}
.hatch-pet p {
  color: var(--item-color);
}
@keyframes wobble {
  from {
    transform: rotate(-7deg) scale(0.98);
  }
  to {
    transform: rotate(7deg) scale(1.04);
  }
}
@keyframes reveal {
  from {
    transform: translateY(15px) scale(0.8);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.boost-pill {
  padding: 7px 10px;
  color: var(--gold);
  font-size: 11px;
  background: #142b3cee;
  border: 1px solid #ffd36b44;
  border-radius: 9px;
  margin-top: 6px;
}
#boost-status {
  position: absolute;
  right: 26px;
  bottom: 180px;
}
.section-title {
  font-family: "Barlow Condensed";
  font-size: 24px;
  margin: 25px 0 12px;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.help-grid .note {
  margin: 0;
}
.no-motion * {
  animation: none !important;
  transition: none !important;
}

/* Production layout: keep the header fixed and let only menu content scroll. */
#menu[open] {
  display: flex;
  flex-direction: column;
}
#menu .modal-header,
#menu-tabs {
  flex-shrink: 0;
}
#menu-content {
  min-height: 0;
  max-height: none;
  flex: 1;
}
dialog[open] {
  animation: menu-in 0.18s var(--ease);
}
dialog.closing {
  animation: menu-out 0.14s ease-in forwards;
  pointer-events: none;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
@keyframes menu-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}
#world-transition {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: #142b3c;
  opacity: 0;
  transition: opacity 0.18s;
}
#world-transition.active {
  opacity: 1;
}
.no-motion #world-transition {
  transition: none;
}
.shortfall,
.affordable {
  font-size: calc(12px * var(--ui-scale));
  line-height: 1.5;
}
.shortfall {
  color: #f0c595;
}
.affordable,
.bonus-preview {
  color: var(--lime) !important;
}
.range-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.range-control output {
  font-size: 12px;
  color: var(--lime);
  min-width: 4ch;
  text-align: right;
}
input[type="range"] {
  min-height: 44px;
  touch-action: pan-y;
}
.settings-row {
  flex-wrap: wrap;
}
.settings-row label {
  flex: 1;
  min-width: 125px;
}
#install-panel p {
  margin: 8px 0;
}
#install-panel .btn {
  margin: 6px 8px 0 0;
}
.hatch-pet {
  animation-fill-mode: both;
}
.low-quality .glass,
.low-quality dialog::backdrop {
  backdrop-filter: none;
}
.low-quality .world-label {
  filter: none;
}
.no-script {
  position: fixed;
  inset: 20%;
  z-index: 100;
  padding: 24px;
  background: var(--navy);
}
body.dark-world .brand,
body.dark-world .world-caption,
body.dark-world .train-hint,
body.dark-world .save-status {
  color: #e2edfa;
  text-shadow: 0 2px 8px #071324;
}
@media (min-width: 1600px) {
  .topbar {
    max-width: 1800px;
    margin: auto;
  }
  .quest-peek {
    width: 260px;
  }
  .world-caption {
    bottom: 210px;
    font-size: 40px;
  }
}
@media (max-width: 1100px) {
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 24px;
  }
  .stat {
    min-width: 112px;
    padding: 10px 12px;
  }
  .quest-peek {
    width: 207px;
    padding: 16px;
  }
  .desktop-controls {
    display: none;
  }
  .bottom-hud {
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
  }
  .train-wrap {
    grid-column: 2;
  }
  .equipped {
    gap: 10px;
    padding: 13px;
  }
  .equipped .key-hint {
    display: none;
  }
  .equipped strong {
    font-size: 12px;
  }
  .world-caption {
    left: 120px;
  }
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  #hud {
    padding: 14px 14px;
  }
  .topbar {
    gap: 7px;
    align-items: flex-start;
  }
  .brand > div:last-child {
    display: none;
  }
  .brand-mark {
    width: 36px;
    height: 40px;
    font-size: 22px;
    border-radius: 10px;
  }
  .brand-mark span {
    margin-top: -30px;
  }
  .stats {
    gap: 5px;
    flex: 1;
    justify-content: center;
  }
  .stat {
    min-width: 0;
    flex: 1;
    max-width: 128px;
    padding: 9px 8px;
    gap: 7px;
    border-radius: 11px;
  }
  .stat i {
    padding: 0;
    background: none !important;
  }
  .stat svg {
    width: 20px;
    height: 20px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat small {
    font-size: 7px;
    letter-spacing: 0.6px;
  }
  .topbar > .icon-btn {
    width: 37px;
    height: 46px;
    border-radius: 10px;
  }
  .topbar > .icon-btn svg {
    width: 20px;
    height: 20px;
  }
  .zone-badge {
    top: 82px;
    font-size: 11px;
    padding: 5px 6px 5px 12px;
    gap: 7px;
  }
  .zone-mult {
    padding: 4px 7px;
  }
  .side-nav {
    left: 12px;
    top: 50%;
    gap: 6px;
    transform: translateY(-48%);
  }
  .side-nav button {
    width: 53px;
    height: 52px;
    border-radius: 12px;
    gap: 2px;
  }
  .side-nav span {
    font-size: 9px;
  }
  .side-nav svg {
    width: 21px;
    height: 21px;
  }
  .side-nav b {
    font-size: 9px;
    min-width: 14px;
  }
  .quest-peek {
    top: 135px;
    right: 12px;
    width: 157px;
    padding: 12px;
    border-radius: 13px;
  }
  .quest-peek .eyebrow {
    font-size: 7px;
    letter-spacing: 0.8px;
    gap: 4px;
  }
  .quest-peek .eyebrow svg {
    width: 12px;
    height: 12px;
  }
  .quest-peek strong {
    font-size: 21px;
    margin-top: 10px;
  }
  .quest-peek p {
    font-size: 10px;
    line-height: 1.5;
    margin-bottom: 11px;
  }
  .quest-peek footer {
    font-size: 9px;
  }
  .quest-peek footer button {
    font-size: 9px;
  }
  .right-tools {
    right: 12px;
    top: 300px;
    gap: 6px;
  }
  .right-tools button {
    padding: 9px;
  }
  .right-tools span {
    display: none;
  }
  .world-caption {
    display: none;
  }
  .bottom-hud {
    left: 12px;
    right: 12px;
    bottom: 28px;
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  .equipped {
    padding: 10px;
    border-radius: 12px;
    gap: 8px;
    position: absolute;
    bottom: 0;
    left: 0;
    max-width: calc(100% - 160px);
  }
  .equipped > i {
    padding: 0;
    background: none;
  }
  .equipped > i svg {
    width: 22px;
    height: 22px;
  }
  .equipped small {
    font-size: 7px;
    letter-spacing: 0.7px;
  }
  .equipped strong {
    font-size: 10px;
    max-width: 125px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .equipped div > span {
    font-size: 9px;
    margin-top: 3px;
  }
  .train-wrap {
    margin-left: auto;
  }
  .train {
    min-width: 142px;
    height: 65px;
    border-radius: 16px;
    gap: 10px;
  }
  .train > span:not(#train-fill) {
    font-size: 26px;
  }
  .train > i svg {
    width: 25px;
    height: 25px;
  }
  .train kbd {
    display: none;
  }
  .train small {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .train-hint {
    display: none;
  }
  .save-status {
    bottom: 6px;
    left: 14px;
    font-size: 8px;
  }
  .interact {
    bottom: 205px;
    font-size: 11px;
    padding: 10px 13px;
    max-width: 75%;
    white-space: nowrap;
  }
  .world-label b {
    font-size: 17px;
    letter-spacing: 1px;
  }
  .world-label span {
    font-size: 8px;
    padding: 4px 8px;
  }
  #boost-status {
    bottom: 220px;
    right: 12px;
  }
  .boost-pill {
    font-size: 9px;
    padding: 5px 8px;
  }
  dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 19px;
  }
  .modal-header {
    padding: 20px;
  }
  .modal-header h1 {
    font-size: 30px;
  }
  #menu-tabs {
    padding: 13px 18px 0;
    gap: 5px;
  }
  #menu-tabs button {
    padding: 10px 13px;
    font-size: 12px;
    min-height: 42px;
  }
  #menu-content {
    padding: 20px 18px;
    max-height: calc(100dvh - 170px);
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .card {
    padding: 13px;
    gap: 8px;
  }
  .card h3 {
    font-size: 13px;
  }
  .card p {
    font-size: 11px;
  }
  .card .visual {
    height: 52px;
  }
  .card-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .card-foot .btn {
    width: 100%;
    min-height: 44px;
  }
  .btn {
    font-size: 12px;
    min-height: 44px;
  }
  .list-row {
    padding: 13px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .list-row > .badge {
    width: 36px;
    height: 36px;
  }
  .list-row h3 {
    font-size: 13px;
  }
  .list-row p {
    font-size: 11px;
  }
  .list-row .btn {
    padding: 10px;
  }
  .pet-actions button {
    min-width: 44px;
    min-height: 44px;
  }
  .egg-odds {
    grid-template-columns: repeat(2, 1fr);
  }
  .days {
    grid-template-columns: repeat(2, 1fr);
  }
  .hatch-actions .btn {
    min-width: 0;
    flex: 1;
  }
  .help-grid {
    grid-template-columns: 1fr;
  }
  .rebirth-summary {
    padding: 20px 10px;
    gap: 7px;
  }
  .rebirth-summary .large-value {
    font-size: 38px;
  }
  .hatch-scene {
    padding: 25px 15px;
  }
  .hatch-pet {
    padding: 16px;
    min-width: 120px;
  }
  .hatch-pet > span {
    font-size: 45px;
  }
  .hatch-eggs {
    font-size: 60px;
    letter-spacing: 0;
  }
  #toasts {
    top: 113px;
  }
  .toast {
    font-size: 12px;
  }
  .toolbar > div {
    flex-wrap: wrap;
  }
}
@media (pointer: coarse),
  (max-width: 760px),
  (max-width: 960px) and (max-height: 610px) {
  #joystick {
    position: absolute;
    left: 28px;
    bottom: 112px;
    width: 106px;
    height: 106px;
    border-radius: 50%;
    border: 1px solid #fff5;
    background: #142b3c40;
    display: grid;
    place-items: center;
    touch-action: none;
    box-shadow: inset 0 0 20px #142b3c20;
  }
  #joystick > div {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: #ffffffb0;
    box-shadow: 0 3px 10px #14334a33;
    pointer-events: none;
  }
  .touch-jump,
  .touch-run {
    display: grid;
    place-items: center;
    position: absolute;
    right: 22px;
    bottom: 117px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid #fff5;
    background: #142b3cad;
    touch-action: none;
  }
  .touch-run {
    right: 90px;
    width: 44px;
    height: 44px;
    bottom: 124px;
  }
  .touch-run[aria-pressed="true"] {
    color: var(--lime);
    border-color: var(--lime);
  }
  .desktop-controls {
    display: none;
  }
}
@media (max-height: 610px) {
  .quest-peek {
    display: none;
  }
  .right-tools {
    top: 100px;
  }
  .side-nav {
    flex-direction: row;
    top: 100px;
    left: 14px;
    transform: none;
  }
  .side-nav button {
    width: 48px;
    height: 48px;
  }
  .zone-badge {
    top: 82px;
    left: 50%;
  }
  .world-caption {
    display: none;
  }
  .bottom-hud {
    bottom: 25px;
  }
  .interact {
    bottom: 130px;
  }
  #joystick {
    bottom: 100px;
    width: 85px;
    height: 85px;
  }
  .touch-jump {
    bottom: 105px;
  }
  .touch-run {
    bottom: 112px;
  }
  .side-nav {
    max-width: 50%;
    flex-wrap: wrap;
  }
  .brand {
    display: none;
  }
  .topbar {
    max-width: 650px;
    margin: auto;
  }
  #boost-status {
    bottom: 180px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.modal-toasts {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 20px;
  display: grid;
  gap: 8px;
  pointer-events: none;
  z-index: 3;
}
.modal-toasts .toast {
  box-shadow: 0 8px 30px #081b32aa;
}
.side-nav button[aria-label] {
  font: inherit;
}
.card .visual {
  height: 84px;
}
.visual img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.egg-odds img {
  display: block;
  margin: auto;
  object-fit: contain;
}
.hatch-eggs {
  display: flex;
  justify-content: center;
  gap: 5px;
}
.hatch-eggs img {
  max-width: 30%;
  height: auto;
  object-fit: contain;
}
.hatch-pet img {
  display: block;
  margin: auto;
  max-width: 100%;
  object-fit: contain;
}
@media (max-width: 480px) {
  .topbar .brand {
    display: none;
  }
  .topbar > .icon-btn {
    width: 44px;
    height: 48px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat > div {
    min-width: 0;
  }
  .stats {
    gap: 5px;
  }
  .stat {
    padding: 10px 8px;
  }
}
@media (max-width: 760px) {
  .right-tools button {
    min-width: 44px;
    min-height: 44px;
  }
  .quest-peek footer button {
    min-height: 44px;
  }
  .right-tools {
    top: 336px;
  }
}
@media (max-width: 760px) and (min-height: 611px) {
  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, 53px);
    top: 135px;
    transform: none;
    gap: 7px;
  }
  .right-tools {
    top: 336px;
  }
  .quest-peek {
    width: 155px;
  }
  .brand small {
    font-size: 9px;
  }
  .side-nav span {
    font-size: 10px;
  }
}

#hatch-dialog {
  overflow: auto;
}
@media (max-width: 760px) {
  .hatch-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hatch-pet {
    display: grid;
    grid-template-columns: 64px 1fr;
    text-align: left;
    column-gap: 14px;
    padding: 12px;
    min-width: 0;
  }
  .hatch-pet img {
    grid-column: 1;
    grid-row: 1 / 5;
    width: 64px;
    height: 64px;
  }
  .hatch-pet h3 {
    font-size: 15px;
    margin: 0;
  }
  .hatch-pet p {
    font-size: 12px;
    margin: 4px 0;
  }
  .hatch-pet strong {
    font-size: 12px;
  }
  .hatch-scene h2 {
    font-size: 29px;
  }
  .hatch-results {
    margin: 18px 0;
  }
}
/* Responsive and accessibility overrides are kept together. */
html,
body {
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
#hud button,
#joystick,
.pet-actions button {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#hud {
  padding-top: max(14px, env(safe-area-inset-top));
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}
.bottom-hud {
  bottom: max(40px, calc(env(safe-area-inset-bottom) + 28px));
}
.save-status {
  bottom: max(6px, env(safe-area-inset-bottom));
}
#menu,
#hatch-dialog {
  max-height: calc(
    100dvh - max(24px, env(safe-area-inset-top)) -
      max(24px, env(safe-area-inset-bottom))
  );
}
#menu-content {
  max-height: none;
}
.modal-header {
  min-width: 0;
  gap: 12px;
}
.modal-header > div {
  min-width: 0;
}
.modal-header h1 {
  overflow-wrap: anywhere;
}
.btn,
select,
.pet-actions button,
.right-tools button,
#menu-tabs button {
  min-height: 44px;
}
.pet-actions button {
  min-width: 44px;
}
.switch {
  width: 52px;
  height: 44px;
  border: 9px solid var(--navy);
}
.switch:after {
  top: 4px;
  left: 2px;
  width: 18px;
  height: 18px;
}
.switch:checked:after {
  transform: translateX(14px);
}
#menu-content .intro,
#menu-content .note {
  font-size: calc(14px * var(--ui-scale));
}
#menu-content .card p,
#menu-content .list-row p,
#menu-content .settings-row small,
#menu-content .egg-odds strong {
  font-size: calc(13px * var(--ui-scale));
}
#menu-content .card h3,
#menu-content .list-row h3,
#menu-content .settings-row label {
  font-size: calc(15px * var(--ui-scale));
}
#menu-content .btn,
#menu-content select {
  font-size: calc(13px * var(--ui-scale));
  padding: calc(11px * var(--ui-scale)) calc(14px * var(--ui-scale));
}
#menu-content .price,
#menu-content .pill {
  font-size: calc(12px * var(--ui-scale));
}
.card .row {
  flex-wrap: wrap;
  gap: 5px;
}
#menu-content .card {
  padding: calc(14px * var(--ui-scale));
}
.stat strong {
  font-size: calc(28px * var(--ui-scale));
}
#loading p {
  max-width: min(520px, 88vw);
  text-align: center;
  line-height: 1.6;
}
#loading:has(.btn) .load-line {
  display: none;
}
@media (hover: none) {
  button:hover {
    filter: none;
  }
}
@media (max-width: 760px) {
  .stat strong {
    font-size: calc(21px * var(--ui-scale));
  }
  .stat small {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .side-nav span {
    font-size: 11px;
  }
  .bottom-hud {
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  }
  .equipped strong {
    font-size: 12px;
    max-width: 100%;
  }
  .equipped small {
    font-size: 9px;
  }
  .equipped div > span {
    font-size: 11px;
  }
  .equipped > i {
    display: none;
  }
  .equipped {
    min-height: 64px;
    max-width: calc(100% - 152px);
  }
  .train {
    min-width: 140px;
  }
  .quest-peek p,
  .quest-peek footer {
    font-size: 12px;
  }
  .quest-peek footer {
    flex-wrap: wrap;
    gap: 0 8px;
  }
  .quest-peek footer button {
    font-size: 12px;
  }
  .quest-peek .eyebrow {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
  .quest-peek strong {
    font-size: 22px;
  }
  .right-tools {
    top: 356px;
  }
  .settings-row label {
    min-width: 135px;
  }
  .range-control input {
    width: 118px;
  }
  .list-row > .btn {
    margin-left: auto;
  }
  .modal-header {
    padding: 16px 18px;
  }
  #menu-tabs {
    padding: 10px 14px 0;
  }
  #menu-content {
    padding: 16px 14px;
  }
  .modal-header .eyebrow {
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.8px;
  }
  .modal-toasts {
    bottom: 10px;
    left: 10px;
    right: 10px;
  }
}
@media (max-width: 380px) {
  .stat {
    gap: 4px;
    padding: 9px 6px;
  }
  .stat svg {
    width: 17px;
  }
  .quest-peek {
    width: 146px;
    right: 12px;
    padding: 12px;
  }
  .side-nav {
    left: 12px;
  }
  .settings-row {
    gap: 8px;
  }
  .settings-row label {
    min-width: 115px;
  }
  .range-control input {
    width: 108px;
  }
  .cards {
    gap: 8px;
  }
}
@media (pointer: coarse),
  (max-width: 760px),
  (max-width: 960px) and (max-height: 610px) {
  #joystick {
    left: max(22px, env(safe-area-inset-left));
    bottom: max(120px, calc(env(safe-area-inset-bottom) + 100px));
  }
  .touch-jump {
    right: max(20px, env(safe-area-inset-right));
    bottom: max(122px, calc(env(safe-area-inset-bottom) + 105px));
  }
  .touch-run {
    right: max(90px, calc(env(safe-area-inset-right) + 70px));
    bottom: max(129px, calc(env(safe-area-inset-bottom) + 112px));
  }
}
@media (max-height: 610px) {
  .quest-peek,
  .world-caption {
    display: none;
  }
  .right-tools {
    top: max(84px, calc(env(safe-area-inset-top) + 66px));
    right: max(14px, env(safe-area-inset-right));
  }
  .right-tools span {
    display: none;
  }
  .side-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: none;
    top: max(84px, calc(env(safe-area-inset-top) + 66px));
    left: max(14px, env(safe-area-inset-left));
    transform: none;
    gap: 6px;
  }
  .side-nav button {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .side-nav svg {
    width: 19px;
    height: 19px;
  }
  .side-nav span {
    font-size: 10px;
  }
  .zone-badge {
    top: 145px;
    max-width: calc(100% - 40px);
    white-space: nowrap;
    font-size: 12px;
  }
  .interact {
    bottom: 110px;
  }
  .world-label {
    opacity: 0.85;
  }
  .bottom-hud {
    bottom: max(26px, calc(env(safe-area-inset-bottom) + 16px));
  }
  #joystick {
    bottom: max(122px, calc(env(safe-area-inset-bottom) + 108px));
    width: 85px;
    height: 85px;
  }
  .touch-jump {
    bottom: max(126px, calc(env(safe-area-inset-bottom) + 112px));
  }
  .touch-run {
    bottom: max(133px, calc(env(safe-area-inset-bottom) + 119px));
  }
  #menu .modal-header {
    padding: 12px 18px;
  }
  .modal-header h1 {
    font-size: 28px;
    margin-top: 4px;
  }
  #menu-tabs {
    padding-top: 8px;
  }
  .hatch-scene {
    padding: 20px;
  }
  .hatch-results {
    margin: 14px 0;
  }
  .train-hint {
    display: none;
  }
}
@media (max-height: 610px) and (max-width: 520px) {
  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, 48px);
  }
  .zone-badge {
    top: 82px;
  }
  .side-nav,
  .right-tools {
    top: 138px;
  }
}
@media (max-height: 450px) and (min-width: 521px) {
  .zone-badge {
    top: 145px;
  }
  .equipped {
    padding: 10px;
  }
  .equipped > i {
    display: none;
  }
  .train {
    height: 64px;
    min-width: 180px;
  }
  .train > span:not(#train-fill) {
    font-size: 28px;
  }
  .topbar {
    max-width: 520px;
  }
  .stat {
    min-width: 0;
    padding: 8px 12px;
  }
  .stat i {
    padding: 0;
  }
  #boost-status {
    bottom: 205px;
  }
}

.right-tools button {
  min-width: 44px;
}
