@font-face {
  font-family: Roboto;
  src: url("eccomi-arcade-roboto-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("eccomi-arcade-roboto-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("eccomi-arcade-roboto-black-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #110e21;
  --ink: #fcf8ff;
  --muted: #b7afcc;
  --outline: #383050;
  --panel: #1b162d;
  --sun: #ffdc78;
  --red: #f95077;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  font-family: Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse 70% 48% at 52% 24%, #2c1b42 0%, transparent 100%), var(--background);
}
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.masthead { border-bottom: 1px solid #2c2542; background: #121021e8; }
.masthead-inner {
  width: min(1140px, calc(100% - 64px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand, .masthead-actions { display: flex; align-items: center; }
.brand { gap: 10px; color: var(--ink); text-decoration: none; }
.brand:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; }
.brand-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ee3156;
  color: white;
  font: 700 31px/1 Roboto, Arial, sans-serif;
  box-shadow: inset 0 -3px 0 #a6173d, 0 0 17px #ef31563d;
  padding-bottom: 3px;
}
.wordmark { font-size: 20px; font-weight: 700; letter-spacing: -.055em; white-space: nowrap; }
.wordmark span { color: #ff597c; }
.brand-section, .data-label {
  font: 700 10px/1.4 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-section { padding-left: 13px; margin-left: 4px; border-left: 1px solid #473b5f; letter-spacing: .19em; }
.masthead-actions { gap: 9px; }
.utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  min-height: 37px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: #211a35;
  color: #ebe5fa;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s;
}
.utility-button .icon { width: 16px; height: 16px; }
.utility-button:hover { background: #322747; border-color: #6c548c; color: white; }

.page { width: min(1140px, calc(100% - 64px)); margin: 28px auto 34px; }
.console {
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 22px 55px #07061575;
}
.dashboard {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 24px;
  background: linear-gradient(110deg, #241a38, #1b172d 58%);
}
.location { display: flex; align-items: center; gap: 11px; }
.location-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid #f9c96a40;
  border-radius: 9px;
  color: var(--sun);
  background: #3b2d3d;
}
.location-icon .icon { width: 19px; height: 19px; }
.location strong { display: block; margin-top: 1px; font-size: 16px; white-space: nowrap; }
.location-index { color: var(--sun); }
.scores { display: flex; align-items: center; justify-content: flex-end; }
.score {
  min-width: 113px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 19px;
  border-left: 1px solid #3b3054;
}
.score:last-child { padding-right: 0; min-width: 101px; }
.digits { font: 700 21px/1.18 var(--mono); letter-spacing: .035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hearts, .record-line { min-height: 24px; display: flex; align-items: center; gap: 5px; }
.hearts .icon { width: 18px; height: 18px; color: var(--red); fill: var(--red); stroke-width: 1; }
.hearts .lost { fill: #38304d; color: #746485; }
.record-line { gap: 6px; color: var(--sun); }
.record-line .icon { width: 16px; height: 16px; }
.record-line .digits { font-size: 19px; }

.world {
  position: relative;
  isolation: isolate;
  height: clamp(426px, 42vw, 506px);
  overflow: hidden;
  border-block: 1px solid #463053;
  background: #331d49;
  outline: none;
}
.backdrop, .world-shading, .splash-art, #flightCanvas, .world-overlay {
  position: absolute;
  inset: 0;
}
.backdrop {
  background: url("eccomi-arcade-roma.webp") center 56% / cover no-repeat, linear-gradient(155deg, #251b46 30%, #a35269 64%, #f8b171);
  transform: scale(1.025);
  will-change: transform;
}
.world-shading {
  background: linear-gradient(90deg, #141126f7 0%, #1c1237de 29%, #28144835 60%, transparent 79%),
    linear-gradient(0deg, #130d27a6, transparent 36%);
  pointer-events: none;
}
.world:not([data-mode="menu"]) .world-shading {
  background: linear-gradient(180deg, #18122cbb 0%, #18122c25 23%, #21153d22 65%, #160f2e88 100%);
}
.splash-art { z-index: 1; pointer-events: none; }
.hero-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 24% 75% at 70% 40%, #da81ff7d 0%, #783dff28 58%, transparent 100%);
}
.cover-hero {
  position: absolute;
  bottom: 2%;
  right: 14%;
  width: 36%;
  height: 94%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 0 2px #f7d1ffe0) drop-shadow(0 0 21px #c46aff9e) drop-shadow(9px 15px 18px #180c3ab3);
}
.motion-line {
  position: absolute;
  width: 19%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e99bffa6, #fff4f5);
  transform: rotate(-25deg);
  border-radius: 100px;
  box-shadow: 0 0 13px #b854ff9e;
}
.motion-line-one { top: 73%; right: 39%; }
.motion-line-two { top: 58%; right: 42%; width: 14%; opacity: .55; }
.motion-line-three { top: 82%; right: 29%; width: 25%; opacity: .5; }
.spark {
  position: absolute;
  width: 21px;
  height: 21px;
  background: #ffe5a7;
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
}
.spark-one { top: 20%; right: 17%; }
.spark-two { top: 37%; right: 43%; width: 11px; height: 11px; background: #f6d0ff; }
.splash {
  position: relative;
  z-index: 2;
  width: min(54%, 540px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 0 18px clamp(24px, 5vw, 66px);
  pointer-events: none;
}
.splash h1 {
  position: relative;
  margin: 0 0 20px;
  color: #fffcf5;
  font: italic 900 clamp(57px, 8vw, 112px)/.81 Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: -.065em;
  white-space: nowrap;
  text-shadow: 1px 2px 0 #1d112e, 2px 5px 0 #66264f, 4px 8px 0 #221335, 6px 12px 26px #120b29c4;
}
.splash h1 span { display: block; }
.splash h1 span:last-child {
  color: var(--sun);
  margin: .07em 0 0 .01em;
  text-shadow: 1px 2px 0 #52254c, 2px 5px 0 #a63c56, 4px 8px 0 #481b46, 6px 12px 24px #160d2c;
}
.splash p { max-width: 305px; margin: 5px 0 24px; color: #f0e8ff; font-size: clamp(16px, 1.63vw, 20px); line-height: 1.45; }
.splash-actions { display: flex; align-items: center; gap: 22px; pointer-events: auto; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #ffe59a;
  border-radius: 8px;
  background: #ffd366;
  color: #271633;
  box-shadow: 0 4px 0 #a96042, 0 7px 18px #140c26a6;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .14s, box-shadow .14s, background .14s;
}
.primary-button:hover { background: #ffe494; transform: translateY(-2px); box-shadow: 0 6px 0 #a96042, 0 9px 20px #140c26a6; }
.primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #a96042; }
.primary-button .icon { width: 19px; height: 19px; }
.pilots { padding-left: 21px; border-left: 1px solid #c0a4e549; }
.pilots .data-label { display: block; margin-bottom: 5px; color: #efe4ff; font-size: 9px; }
.pilot-options { display: flex; gap: 7px; }
.pilot-button {
  width: 34px;
  height: 34px;
  padding: 0;
  position: relative;
  border: 1px solid #a297bd;
  border-radius: 7px;
  background: #2a2141;
  transition: background .16s, border-color .16s;
}
.pilot-button:hover { background: #4c3669; }
.pilot-button[aria-pressed="true"] { background: #523467; border-color: var(--sun); box-shadow: 0 0 0 1px var(--sun); }
.pilot-avatar { display: block; width: 100%; height: 100%; border-radius: 6px; background-repeat: no-repeat; }
.pilot-female { background-image: url("eccomi-arcade-supereroina.webp"); background-position: 55% 2%; background-size: 225% auto; }
.pilot-male { background-image: url("eccomi-arcade-supereroe.webp"); background-position: 55% 0; background-size: 230% auto; }
.pilot-check {
  display: none;
  position: absolute;
  right: -4px;
  bottom: -4px;
  background: var(--sun);
  color: #251732;
  border-radius: 50%;
  padding: 1px;
}
.pilot-button[aria-pressed="true"] .pilot-check { display: block; }
.pilot-check .icon { width: 11px; height: 11px; stroke-width: 3; }

#flightCanvas { display: block; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.world[data-mode="playing"] { touch-action: none; cursor: move; }
.flight-controls {
  position: absolute;
  z-index: 3;
  inset: 16px 17px auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.mission-progress, .timer, .pause-button, .flight-arrow {
  background: #211631ed;
  border: 1px solid #8d74ad96;
  border-radius: 8px;
}
.mission-progress { min-width: 154px; padding: 9px 10px; }
.mission-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 5px; }
.mission-progress .digits { font-size: 13px; }
.mission-progress .data-label { font-size: 9px; color: #ebd9ff; }
progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 10px; overflow: hidden; background: #514265; color: var(--sun); }
progress::-webkit-progress-bar { background: #514265; }
progress::-webkit-progress-value { background: var(--sun); }
progress::-moz-progress-bar { background: var(--sun); }
.flight-actions { display: flex; align-items: stretch; gap: 6px; pointer-events: auto; }
.timer { display: flex; gap: 6px; align-items: center; padding: 0 10px; }
.timer .icon { width: 16px; height: 16px; color: #c8b7e2; }
.timer .digits { font-size: 15px; }
.timer.urgent, .timer.urgent .icon { color: #ff86a5; }
.pause-button { width: 43px; min-height: 43px; padding: 0; }
.mobile-flight-controls { display: none; }
.world-overlay {
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 14px;
  background: #140d24b0;
  backdrop-filter: blur(5px);
}
.game-panel, .help-dialog {
  border: 1px solid #5c487b;
  border-radius: 14px;
  background: #231931;
  box-shadow: 0 16px 55px #0a061aa8;
}
.game-panel {
  display: grid;
  justify-items: center;
  width: min(345px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 21px 22px 17px;
  text-align: center;
  outline: none;
}
.panel-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: #473054; color: var(--sun); }
.game-panel h2 { margin: 12px 0 5px; font-size: clamp(24px, 4vw, 32px); }
.game-panel p { margin: 2px 0 17px; color: #e0d6f0; font-size: 15px; line-height: 1.45; }
.text-button { min-height: 42px; background: transparent; border: 0; color: #e7d6ff; font-size: 13px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.help-dialog { width: min(460px, calc(100% - 32px)); color: var(--ink); padding: 23px; }
.help-dialog::backdrop { background: #100b1fc9; backdrop-filter: blur(4px); }
.help-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-header h2 { margin: 0; font-size: 26px; }
.close-button { width: 39px; min-height: 39px; padding: 0; }
.help-dialog p, .help-dialog li { color: #e7dff1; font-size: 15px; line-height: 1.6; }
.help-dialog strong { color: white; }
.help-dialog ul { padding-left: 20px; margin: 0 0 19px; }
.help-dialog li + li { margin-top: 8px; }

.control-bar {
  min-height: 49px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 17px;
  padding: 8px 10px;
  background: #201833;
}
.control-hint { display: flex; align-items: center; gap: 5px; color: #d0c6e0; font-size: 12px; }
.control-hint .icon { margin-right: 4px; color: #bc9ddd; width: 18px; height: 18px; }
.control-divider { width: 1px; height: 20px; background: #413455; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 1px 3px;
  border: 1px solid #645578;
  border-radius: 4px;
  background: #332846;
  color: #fcf9ff;
  box-shadow: 0 1px 0 #171022;
  font: 700 11px/1 var(--mono);
}
.control-hint .control-action { margin-left: 3px; }

.field-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.guide-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #3b3150;
  border-radius: 10px;
  background: linear-gradient(115deg, #241b37, #1b172b);
}
.package-card { --accent: #ffcc77; --accent-bg: #473541; --accent-border: #a47458; }
.mail-card { --accent: #9ce4ff; --accent-bg: #293952; --accent-border: #5b819b; }
.storm-card { --accent: #ffa3b7; --accent-bg: #44273f; --accent-border: #91546f; }
.guide-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
}
.guide-card h2 { margin: 0 0 3px; font-size: 15px; }
.guide-card p { margin: 0; color: #c3b9d4; font-size: 12px; white-space: nowrap; }
.guide-value {
  color: var(--accent);
  font: 700 11px/1 var(--mono);
  white-space: nowrap;
  padding: 6px 7px;
  border-radius: 5px;
  background: var(--accent-bg);
}
.noscript { margin: 1em; text-align: center; }

@media (any-pointer: coarse), (max-width: 620px) {
  .mobile-flight-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: #1b152b;
    border-bottom: 1px solid #413455;
  }
  .flight-arrow { width: 47px; min-height: 46px; padding: 0; touch-action: manipulation; }
  .flight-arrow .icon { width: 21px; height: 21px; }
}

@media (max-width: 880px) {
  .masthead-inner, .page { width: calc(100% - 38px); }
  .splash { width: 59%; padding-left: 32px; }
  .cover-hero { width: 45%; right: 6.5%; }
  .guide-card { gap: 8px; padding: 10px; }
  .guide-icon { width: 34px; height: 34px; }
  .guide-value { padding: 5px; }
}

@media (max-width: 620px) {
  .masthead-inner, .page { width: calc(100% - 24px); }
  .masthead-inner { min-height: 59px; }
  .page { margin-top: 13px; margin-bottom: 20px; }
  .brand { gap: 7px; }
  .brand-mark { width: 29px; height: 29px; font-size: 26px; }
  .wordmark { font-size: 17px; }
  .brand-section { display: none; }
  .masthead-actions { gap: 6px; }
  .masthead-actions .utility-button { min-height: 36px; padding: 0 8px; font-size: 11px; }
  .masthead-actions #soundButton { width: 36px; padding: 0; }
  .masthead-actions #soundLabel { display: none; }
  .dashboard { align-items: stretch; gap: 10px; flex-direction: column; padding: 10px 12px; }
  .location-icon { width: 30px; height: 30px; border-radius: 7px; }
  .location-icon .icon { width: 16px; height: 16px; }
  .location strong { font-size: 14px; }
  .scores { justify-content: space-between; border-top: 1px solid #3b3054; padding-top: 8px; }
  .score, .score:last-child { flex: 1 1 0; padding: 0 8px 0 10px; min-width: 0; gap: 0; }
  .score:first-child { padding-left: 0; border-left: none; }
  .score:last-child { padding-right: 0; }
  .digits, .record-line .digits { font-size: 17px; }
  .hearts, .record-line { min-height: 21px; }
  .hearts .icon { width: 16px; height: 16px; }
  .world { height: clamp(425px, 122vw, 536px); }
  .world:not([data-mode="menu"]) { height: clamp(343px, 60svh, 490px); }
  .backdrop { background-position: 65% 53%; }
  .world-shading {
    background: linear-gradient(0deg, #181029 3%, #1c1237ed 25%, #1c123745 54%, transparent 74%),
      linear-gradient(90deg, #18102978, transparent 67%);
  }
  .hero-halo { background: radial-gradient(ellipse 48% 45% at 60% 32%, #da81ff7d 0%, #783dff28 58%, transparent 100%); }
  .cover-hero { top: -1%; bottom: auto; right: 3%; width: 77%; height: 69%; object-position: top center; }
  .motion-line-one { top: 42%; right: 47%; width: 29%; }
  .motion-line-two { top: 36%; right: 47%; }
  .motion-line-three { top: 49%; right: 25%; }
  .spark-one { top: 16%; right: 11%; width: 17px; height: 17px; }
  .spark-two { top: 20%; right: 80%; }
  .splash { justify-content: flex-end; width: 100%; padding: 0 15px 22px; }
  .splash h1 { font-size: clamp(49px, 13.25vw, 73px); margin-bottom: 12px; }
  .splash p { max-width: 240px; margin: 4px 0 13px; font-size: 15px; }
  .splash-actions { gap: 13px; }
  .pilots { padding-left: 12px; }
  .splash .primary-button { min-height: 44px; padding-inline: 15px; }
  .flight-controls { inset: 9px 9px auto; }
  .mission-progress { min-width: 114px; padding: 8px 7px; }
  .timer { padding: 0 7px; }
  .pause-button { width: 37px; min-height: 37px; }
  .control-bar { gap: 6px; min-height: 43px; padding: 7px 3px; }
  .control-hint { gap: 3px; font-size: 10px; }
  .control-hint .icon { width: 15px; height: 15px; margin-right: 1px; }
  .control-hint .control-action { display: none; }
  .control-divider { height: 16px; }
  kbd { min-width: 16px; height: 17px; }
  .field-guide { grid-template-columns: 1fr; gap: 7px; margin-top: 10px; }
  .guide-card { min-height: 52px; padding: 7px 10px; }
}
@media (max-width: 340px) {
  .masthead-inner, .page { width: calc(100% - 16px); }
  .masthead-actions #helpButton { gap: 3px; padding: 0 5px; }
  .control-hint span:not(.control-action) { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.world[data-mission="2"] .backdrop {
  filter: brightness(.68) saturate(.84);
  background-color: #141531;
  background-blend-mode: luminosity;
}
.world[data-mission="2"] .world-shading {
  background-color: #20245d40;
}
.world[data-mission="3"] .backdrop {
  filter: brightness(.88) saturate(1.23);
}
.world[data-mission="3"] .world-shading {
  background-color: #17484538;
}
.mission-select { margin-top: 20px; }
.mission-select h2 {
  margin: 0 0 10px;
  font-size: 19px;
  color: var(--ink);
}
.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mission-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: #211a34;
  border: 1px solid #443654;
  border-radius: 9px;
}
.mission-button[aria-pressed="true"] { border-color: #e1ad5f; background: #38263d; }
.mission-button:focus-visible { outline: 2px solid #ffd777; outline-offset: 2px; }
.mission-button:disabled { color: #c7bdd5; cursor: default; }
.mission-number { font: 700 13px/1 var(--mono); color: #ffdb88; }
.mission-button strong, .mission-button small { display: block; }
.mission-button strong { font-size: 13px; }
.mission-button small { margin-top: 3px; font-size: 10px; color: #c7bdd5; }
.mission-status {
  font-size: 10px;
  color: #eadbb9;
  border: 1px solid #64536c;
  border-radius: 4px;
  padding: 4px 5px;
}
.mission-progress .mission-perk {
  display: block;
  margin-top: 4px;
  color: #aeffe8;
  font-size: 11px;
}
.energy-card { --accent: #8fffe1; --accent-bg: #1d403f; --accent-border: #478375; }
#replayButton { margin-top: 8px; }
@media (max-width: 850px) {
  .mission-button { grid-template-columns: auto minmax(0, 1fr); }
  .mission-status { grid-column: 2; justify-self: start; }
}
@media (max-width: 620px) {
  .mission-grid { grid-template-columns: 1fr; }
  .mission-button { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 51px; }
  .mission-status { grid-column: auto; }
}
