@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #f5f8ff;
  background: #0b1730;
  font-synthesis: none;
  --mint: #b2ffcf;
  --muted: #a4b8c8;
}
.save-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #93efd63b;
  border-radius: 14px;
  background: #0b2033;
}
.save-panel summary {
  cursor: pointer;
  color: var(--mint);
  font-size: 14px;
  padding: 4px;
}
.save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.save-actions button {
  border: 1px solid #93efd650;
  background: #214f48;
  color: #e0ffeb;
  padding: 12px 14px;
  border-radius: 12px;
  min-height: 44px;
}
.save-actions button[hidden] {
  display: none;
}
.save-panel p {
  line-height: 1.6;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}
.brand-text strong {
  font: 800 19px "Outfit";
  letter-spacing: 2px;
}
.brand-text small {
  font: 700 11px "Outfit";
  letter-spacing: 5px;
  color: var(--mint);
}
.level-theme {
  position: absolute;
  top: 67px;
  left: 0;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #d0f5df;
  background: #10263ecf;
  padding: 7px 12px;
  border-radius: 20px;
}
.map-card {
  width: min(880px, 100%);
  max-height: 90dvh;
  overflow: auto;
  padding: 28px;
  background: #112d44;
  border: 1px solid #93efd63b;
  border-radius: 24px;
}
.map-card header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}
.map-card h2 {
  font: 600 29px "Outfit";
  margin: 9px 0;
}
.map-card p {
  font-size: 12px;
  color: #b4cbd7;
}
.map-card .icon-button {
  flex-shrink: 0;
}
.level-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}
.level-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 59px;
  background: #203d53;
  border: 1px solid #ffffff20;
  border-radius: 10px;
  font-size: 15px;
  color: #bcd3e2;
}
.level-tile small {
  font-size: 11px;
}
.level-tile.boss {
  border-color: #ffb477;
  color: #ffcf9f;
}
.level-tile.superboss {
  border-color: #c29bff;
  color: #d7bcff;
}
.level-tile.megaboss {
  background: #375629;
  border-color: #b6ff73;
  color: #cdff9c;
}
.level-tile.completed {
  background: #214f48;
  color: var(--mint);
}
.level-tile.selected {
  outline: 2px solid var(--mint);
  outline-offset: 1px;
}
.level-tile:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.level-tile:not(:disabled):hover {
  background: #36677b;
}
.map-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #d4ebf7;
  font-size: 12px;
}
.map-note {
  line-height: 1.6;
}
#level-map {
  z-index: 25;
}
.playing .level-theme {
  pointer-events: none;
}
@media (max-width: 600px) {
  .brand-text strong {
    font-size: 13px;
    letter-spacing: 1.5px;
  }
  .brand-text small {
    font-size: 9px;
    letter-spacing: 3px;
  }
  .topbar .top-actions {
    gap: 6px;
  }
  .topbar .icon-button {
    width: 32px;
    height: 32px;
  }
  .topbar .music-picker {
    padding: 7px 9px;
    font-size: 10px;
  }
  .topbar .sound-slash {
    left: 12px;
    top: 3px;
  }
  .map-card {
    padding: 18px;
  }
  .map-card h2 {
    font-size: 22px;
  }
  .level-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
  }
  .map-legend {
    gap: 9px;
    font-size: 10px;
  }
  .level-theme {
    top: 106px;
    font-size: 10px;
  }
  .playing .boss-hud {
    top: 220px;
  }
  .world-label {
    bottom: 23%;
  }
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  overscroll-behavior: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 5px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.hidden {
  display: none !important;
}
#world {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(7, 20, 35, 0.86),
      rgba(7, 20, 35, 0.25) 43%,
      transparent 70%
    ),
    linear-gradient(0deg, rgba(7, 20, 35, 0.7), transparent 27%);
}
.playing .vignette {
  background: linear-gradient(
    180deg,
    rgba(7, 20, 35, 0.3),
    transparent 30%,
    transparent 80%,
    rgba(7, 20, 35, 0.3)
  );
}
.topbar {
  position: absolute;
  left: 4.5%;
  right: 4.5%;
  top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}
.brand {
  font:
    800 29px "Outfit",
    sans-serif;
  letter-spacing: 3px;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  color: var(--mint);
  font-size: 35px;
  line-height: 1;
  transform: rotate(-30deg);
}
.brand-tag {
  font:
    600 10px "DM Sans",
    sans-serif;
  letter-spacing: 2px;
  margin-left: 13px;
  border-left: 1px solid #ffffff40;
  padding-left: 20px;
  color: #bbceda;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.expedition {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  margin-right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.expedition i {
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
}
.icon-button {
  border: 1px solid #ffffff30;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  position: relative;
  background: #122d4260;
  font-size: 21px;
  backdrop-filter: blur(12px);
}
.icon-button:hover {
  background: #315367;
}
.sound-slash {
  position: absolute;
  left: 16px;
  top: 8px;
  color: white;
}
.intro {
  position: absolute;
  left: 7.5%;
  top: 26%;
  max-width: 540px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #bcefd7;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow > span {
  width: 21px;
  height: 1px;
  background: var(--mint);
}
h1 {
  font:
    600 clamp(55px, 6.3vw, 99px)/1.04 "Outfit",
    sans-serif;
  letter-spacing: -4px;
  margin: 25px 0 23px;
}
h1 em {
  font-style: normal;
  color: var(--mint);
}
.intro p {
  font-size: 17px;
  line-height: 1.8;
  color: #b9ccd7;
  margin: 0 0 28px;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--mint);
  color: #102b2a;
  min-height: 60px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 36px #acffc51b;
  transition:
    transform 0.2s,
    background 0.2s;
}
.primary-button:hover {
  background: #d0ffdf;
  transform: translateY(-2px);
}
.play-symbol {
  font-size: 13px;
}
.button-arrow {
  font-size: 23px;
  margin-left: 24px;
}
.play-note {
  font-size: 11px;
  color: #89a5b9;
  margin-top: 17px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.key-mini {
  font-size: 17px;
}
.world-label {
  position: absolute;
  right: 7%;
  bottom: 24%;
  display: flex;
  align-items: center;
  gap: 15px;
  background: #0d273461;
  backdrop-filter: blur(16px);
  padding: 19px 21px;
  border: 1px solid #d4faff25;
  border-radius: 16px;
  transform: rotate(-3deg);
}
.world-number {
  color: var(--mint);
  font: 500 37px "Outfit";
  border-right: 1px solid #ffffff30;
  padding-right: 15px;
}
.world-label div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.world-label small {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #a6c1cb;
}
.world-label strong {
  font: 500 18px "Outfit";
}
.world-label div > span {
  font-size: 11px;
  color: #9fb8c5;
}
.label-spark {
  font-size: 27px;
  color: var(--mint);
  margin-left: 24px;
}
.mission-strip {
  position: absolute;
  bottom: 12%;
  left: 7.5%;
  display: flex;
  gap: 38px;
}
.mission-strip > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
.mission-strip > div + div {
  border-left: 1px solid #ffffff20;
  padding-left: 32px;
}
.strip-icon {
  color: var(--mint);
  font-size: 27px;
}
.mission-strip div span:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mission-strip strong {
  font-size: 12px;
  font-weight: 500;
}
.mission-strip small {
  font-size: 10px;
  color: #92acbe;
}
footer {
  position: absolute;
  bottom: 25px;
  left: 4.5%;
  right: 4.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #819cad;
  font-size: 9px;
  letter-spacing: 1.7px;
}
footer > span:nth-child(2) {
  letter-spacing: 0;
  font-size: 11px;
}
.footer-star {
  color: var(--mint);
  margin: 0 10px;
}
.hud {
  position: absolute;
  top: 100px;
  left: 4.5%;
  right: 4.5%;
  display: flex;
  justify-content: space-between;
  align-items: start;
  pointer-events: none;
}
.player-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #0b213bcc;
  border: 1px solid #e0faff30;
  border-radius: 18px;
  backdrop-filter: blur(10px);
}
.robot-avatar {
  display: grid;
  place-items: center;
  background: #d2fff4;
  color: #15374c;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  font-size: 28px;
}
.player-stats small {
  font-size: 9px;
  letter-spacing: 1px;
  color: #acceda;
}
#hearts {
  color: #aeffd3;
  font-size: 20px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.stat-divider {
  height: 28px;
  width: 1px;
  background: #ffffff25;
}
.crystal-icon {
  color: #b8a4ff;
  font-size: 25px;
}
.player-stats > strong {
  font: 500 26px "Outfit";
  margin-left: -5px;
}
.count-total {
  font-size: 12px;
  color: #93afc6;
  margin-left: -9px;
}
.objective {
  font-size: 12px;
  padding: 13px 18px;
  border-radius: 30px;
  background: #0b213bb8;
  color: #d3e5e8;
  border: 1px solid #ffffff20;
}
.boss-hud {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: min(390px, 75%);
  pointer-events: none;
}
.boss-hud > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
#boss-name {
  font: 600 16px "Outfit";
  letter-spacing: 2px;
}
#boss-status {
  font-size: 9px;
  letter-spacing: 1px;
  color: #dcdfef;
}
.boss-track {
  height: 9px;
  background: #0b183ca8;
  border-radius: 20px;
  padding: 2px;
  border: 1px solid #ffffff30;
}
#boss-health {
  height: 100%;
  width: 100%;
  border-radius: 20px;
  background: #ffbd76;
  transition: width 0.2s;
}
.toast {
  position: absolute;
  bottom: 105px;
  left: 50%;
  transform: translate(-50%, 10px);
  opacity: 0;
  transition:
    opacity 0.25s,
    transform 0.25s;
  background: #10263edf;
  padding: 13px 22px;
  border: 1px solid #c6efff30;
  border-radius: 25px;
  color: #e7fcff;
  font-size: 13px;
  text-align: center;
  pointer-events: none;
  max-width: 90%;
  width: max-content;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.desktop-controls {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  white-space: nowrap;
  font-size: 11px;
  color: #d1e0e5;
  pointer-events: none;
}
.desktop-controls > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
kbd {
  font: 600 9px "DM Sans";
  padding: 6px 8px;
  letter-spacing: 1px;
  border: 1px solid #ffffff35;
  background: #0a223b80;
  border-radius: 5px;
  color: #e8f6ff;
}
.touch-controls {
  display: none;
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom));
  left: 25px;
  right: 25px;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
#joystick {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 1px solid #ffffff50;
  background: #10273b55;
  position: relative;
  pointer-events: auto;
  touch-action: none;
  backdrop-filter: blur(8px);
}
#stick {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #d9fff0b3;
  border: 2px solid #ecfff8;
  position: absolute;
  left: 34px;
  top: 34px;
  box-shadow: 0 4px 20px #0003;
  pointer-events: none;
}
.touch-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: auto;
}
.touch-actions button {
  border-radius: 50%;
  background: #10273b80;
  border: 1px solid #ffffff60;
  width: 72px;
  height: 72px;
  font-size: 28px;
  touch-action: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.touch-actions small {
  font: 700 9px "DM Sans";
  letter-spacing: 1px;
}
#jump {
  width: 86px;
  height: 86px;
  background: #b2ffcfd9;
  color: #0d3630;
}
.touch-actions button:active {
  transform: scale(0.92);
}
.modal {
  position: absolute;
  inset: 0;
  background: #07152899;
  backdrop-filter: blur(10px);
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(430px, 100%);
  padding: 38px;
  background: linear-gradient(145deg, #213e52, #0d253d);
  border: 1px solid #d4faff30;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 30px 100px #0004;
}
.modal-icon {
  font-size: 42px;
  color: var(--mint);
  margin-bottom: 18px;
}
.modal-card .eyebrow {
  justify-content: center;
  font-size: 9px;
}
.modal-card h2 {
  font: 600 43px "Outfit";
  letter-spacing: -1px;
  margin: 15px 0;
}
.modal-card p {
  font-size: 14px;
  line-height: 1.7;
  color: #b1cbd7;
}
.modal-card .primary-button {
  width: 100%;
  justify-content: center;
  margin-top: 26px;
  gap: 20px;
}
.secondary-button {
  background: none;
  color: #aac9d5;
  margin-top: 20px;
  font-size: 12px;
}
.secondary-button:hover {
  color: white;
}
.result-stats {
  padding: 16px;
  background: #0a203960;
  border-radius: 12px;
  margin-top: 20px;
  color: var(--mint);
  font-size: 15px;
}
.loading {
  position: absolute;
  inset: 0;
  background: #0b1730;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 25px;
  color: #aacbd6;
  font-size: 14px;
}
.loading-orbit {
  width: 44px;
  height: 44px;
  border: 2px solid #ffffff20;
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (pointer: coarse) {
  .playing .touch-controls {
    display: flex;
  }
  .desktop-controls {
    display: none !important;
  }
  .toast {
    bottom: 165px;
  }
}
@media (max-width: 800px) {
  .topbar {
    top: 22px;
  }
  .brand {
    font-size: 23px;
  }
  .brand-mark {
    font-size: 29px;
  }
  .brand-tag {
    display: none;
  }
  .expedition {
    font-size: 9px;
    margin-right: 0;
    letter-spacing: 1px;
  }
  .icon-button {
    width: 37px;
    height: 37px;
  }
  .sound-slash {
    left: 14px;
    top: 5px;
  }
  .intro {
    top: 22%;
    left: 7%;
    max-width: 65%;
  }
  h1 {
    font-size: 65px;
    letter-spacing: -3px;
  }
  .intro p {
    font-size: 14px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .world-label {
    right: 5%;
    bottom: 22%;
    padding: 14px;
  }
  .label-spark {
    display: none;
  }
  .world-label strong {
    font-size: 15px;
  }
  .world-label div > span {
    display: none;
  }
  .mission-strip {
    gap: 18px;
    left: 7%;
    bottom: 11%;
  }
  .mission-strip > div + div {
    padding-left: 18px;
  }
  .strip-icon {
    font-size: 23px;
  }
  .mission-strip strong {
    font-size: 11px;
  }
  .mission-strip small {
    font-size: 9px;
  }
  .hud {
    top: 80px;
    gap: 10px;
  }
  .objective {
    max-width: 200px;
    text-align: center;
    line-height: 1.5;
  }
  .player-stats {
    padding: 10px;
    gap: 8px;
  }
  .player-stats small {
    font-size: 8px;
  }
  #hearts {
    font-size: 16px;
  }
  .robot-avatar {
    width: 30px;
    height: 32px;
  }
  .count-total {
    margin-left: 0;
  }
  .boss-hud {
    top: 155px;
  }
}
@media (max-width: 540px) {
  .vignette {
    background: linear-gradient(
      180deg,
      #0b1a31a0,
      transparent 45%,
      #0b1a3180 78%,
      #0b1a31e6
    );
  }
  .intro {
    top: 16%;
    max-width: 88%;
    left: 7%;
  }
  h1 {
    font-size: 57px;
    line-height: 1;
    letter-spacing: -2px;
    margin: 18px 0;
  }
  h1 br {
    display: none;
  }
  h1 {
    max-width: 340px;
  }
  .intro p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .intro .primary-button {
    min-height: 51px;
    padding: 0 18px;
    font-size: 14px;
  }
  .button-arrow {
    margin-left: 0;
  }
  .play-note {
    font-size: 9px;
    margin-top: 11px;
  }
  .world-label {
    bottom: 23%;
    right: 7%;
    padding: 11px 14px;
    border-radius: 12px;
  }
  .world-number {
    font-size: 27px;
  }
  .world-label small {
    font-size: 8px;
  }
  .world-label strong {
    font-size: 14px;
  }
  .mission-strip {
    bottom: 10%;
    left: 7%;
    right: 7%;
    justify-content: space-between;
    gap: 8px;
  }
  .mission-strip > div {
    flex-direction: column;
    align-items: start;
    gap: 5px;
  }
  .mission-strip > div + div {
    padding-left: 13px;
  }
  .mission-strip small {
    font-size: 8px;
  }
  .mission-strip strong {
    font-size: 10px;
  }
  .strip-icon {
    font-size: 20px;
  }
  .expedition {
    font-size: 8px;
  }
  .top-actions {
    gap: 8px;
  }
  footer {
    bottom: 19px;
    font-size: 8px;
  }
  footer > span:nth-child(2) {
    display: none;
  }
  .objective {
    position: absolute;
    top: 65px;
    left: 0;
    max-width: none;
    font-size: 10px;
    padding: 8px 12px;
  }
  .player-stats {
    gap: 12px;
  }
  .boss-hud {
    top: 196px;
    width: 84%;
  }
  #boss-status {
    font-size: 8px;
  }
  .playing .topbar .expedition {
    display: none;
  }
  .touch-controls {
    left: 20px;
    right: 20px;
  }
  .touch-actions {
    gap: 9px;
  }
  .toast {
    font-size: 11px;
  }
  .modal-card {
    padding: 28px;
  }
  .modal-card h2 {
    font-size: 35px;
  }
}
@media (max-height: 550px) {
  .topbar {
    top: 12px;
  }
  .intro {
    top: 22%;
  }
  h1 {
    font-size: 47px;
    margin: 12px 0;
  }
  .intro p {
    display: none;
  }
  .play-note {
    margin-top: 8px;
  }
  .primary-button {
    min-height: 45px;
  }
  .mission-strip {
    bottom: 10%;
    left: 7%;
  }
  .world-label {
    bottom: 25%;
  }
  footer {
    bottom: 10px;
  }
  .hud {
    top: 65px;
  }
  .boss-hud {
    top: 74px;
    left: 70%;
    width: 240px;
  }
  .objective {
    display: none;
  }
  .touch-controls {
    bottom: 15px;
  }
  .modal-card {
    padding: 20px;
  }
  .modal-icon {
    display: none;
  }
  .modal-card h2 {
    font-size: 30px;
    margin: 10px 0;
  }
  .modal-card .primary-button {
    margin-top: 15px;
  }
  .toast {
    bottom: 35px;
  }
  .desktop-controls {
    bottom: 15px;
  }
}
.music-picker {
  padding: 9px 13px;
  border-radius: 20px;
  border: 1px solid #ffffff30;
  background: #122d4260;
  color: #c9e6df;
  font-size: 11px;
  white-space: nowrap;
}
.music-picker:hover {
  background: #315367;
}
.music-picker.loaded {
  color: var(--mint);
}
@media (max-width: 540px) {
  .topbar .expedition {
    display: none;
  }
  .music-picker {
    font-size: 10px;
    padding: 8px 10px;
  }
}
@media (max-width: 600px) {
  .playing .touch-controls {
    display: flex;
  }
  .desktop-controls {
    display: none !important;
  }
  .toast {
    bottom: 165px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
