:root {
  font-family:
    Trebuchet MS,
    Arial,
    sans-serif;
  color: #f5f6e9;
  background: #102b36;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 0, #285450 0, #102b36 65%);
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #ffffff30;
  background: #ffffff0b;
  color: inherit;
  border-radius: 9px;
  padding: 10px 15px;
  font-weight: bold;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #ffffff20;
}
button:active {
  transform: translateY(2px);
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid #ffdc78;
  outline-offset: 4px;
}
header {
  height: 76px;
  max-width: 1500px;
  margin: auto;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hub {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}
.hub span {
  color: #a0bdb9;
}
.edition {
  font-size: 11px;
  letter-spacing: 3px;
  color: #c3d5ce;
}
header > div {
  display: flex;
  gap: 8px;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 0 28px;
}
#stage {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #7b9e9440;
  box-shadow: 0 25px 80px #0005;
  background: #80cad0;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 3% 7%;
  background: linear-gradient(90deg, #112f4360, #18454415, #112f4330);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 5px;
  font-weight: bold;
  color: #ffe8a6;
}
h1 {
  font-size: clamp(48px, 6.6vw, 100px);
  line-height: 0.84;
  margin: 18px 0 12px;
  text-align: center;
  letter-spacing: -4px;
  color: #fff5cf;
  text-shadow:
    0 5px 0 #285949,
    0 9px 0 #143e3c,
    0 13px 24px #103a4470;
  transform: rotate(-3deg);
}
h1 > span {
  display: block;
  color: #ffd366;
  font-size: 0.88em;
  margin-top: 10px;
}
.title-star {
  font-size: 0.54em;
  position: absolute;
  margin: 9px 0 0 14px;
}
.intro {
  font-size: 15px;
  letter-spacing: 0.2px;
  color: #f6fff3;
  text-shadow: 0 2px 5px #234944;
  margin: 15px 0 20px;
}
.hero-picker {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 670px;
}
.hero-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 8px 10px 10px;
  background: #123d45d9;
  border: 2px solid #d6f6ea25;
  border-radius: 14px;
  box-shadow: 0 5px 0 #12353666;
}
.hero-card[aria-pressed="true"] {
  border-color: #ffdc78;
  background: #1a514eda;
  box-shadow:
    0 0 0 3px #ffdc7820,
    0 5px 0 #1a393366;
}
.hero-card canvas {
  width: 80px;
  height: 76px;
}
.hero-card b {
  font-size: 16px;
}
.hero-card small {
  font-size: 10px;
  color: #c3dad2;
  margin-top: 5px;
}
.menu-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 24px;
  width: 100%;
  max-width: 670px;
  background: #0e313bcf;
  padding: 15px 20px;
  border-radius: 12px;
}
.menu-bottom label {
  display: block;
  letter-spacing: 2px;
  font-size: 9px;
  color: #b6d5cd;
  margin-bottom: 5px;
}
select {
  border: 0;
  background: transparent;
  color: #fff4cd;
  font-weight: bold;
  font-size: 17px;
  max-width: 100%;
}
option {
  background: #173c40;
}
small#progressText {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: #b6d5cd;
}
.primary {
  background: #ffcf63;
  color: #293c32;
  box-shadow: 0 4px 0 #c58f32;
  border: 0;
  font-size: 17px;
  padding: 17px 24px;
  white-space: nowrap;
}
.primary:hover {
  background: #ffe291;
}
.primary span {
  margin-left: 15px;
}
.instructions {
  font-size: 11px;
  color: #e1f3df;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  text-shadow: 0 1px 3px #14352c;
}
kbd {
  font-family: inherit;
  border: 1px solid #efffe570;
  border-radius: 4px;
  background: #20453675;
  padding: 3px 6px;
}
.instructions > span {
  opacity: 0.5;
  margin: 0 4px;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 62px;
  padding: 0 9px;
  font-size: 12px;
  color: #a9c4bd;
}
footer i {
  font-style: normal;
  color: #d4b978;
  padding: 0 9px;
}
footer button {
  border: 0;
  font-size: 12px;
  color: #deeee4;
}
#hud {
  position: absolute;
  inset: 20px 25px auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  pointer-events: none;
}
.hud-left,
.hud-right {
  background: #143540dc;
  border: 1px solid #ffffff35;
  border-radius: 12px;
  padding: 12px 17px;
  backdrop-filter: blur(8px);
}
.hud-left span {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: #bddecf;
  margin-bottom: 4px;
}
.hud-left strong {
  font-size: 18px;
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 17px;
}
.hud-right button {
  pointer-events: auto;
  padding: 4px 10px;
}
#hearts {
  color: #ff8691;
  letter-spacing: 3px;
}
.star-counter {
  color: #ffda7d;
}
#powerLabel {
  font-size: 12px;
  color: #9fedda;
}
#toast {
  position: absolute;
  bottom: 16%;
  left: 50%;
  transform: translateX(-50%);
  background: #143b45eb;
  color: #fff6cc;
  border: 1px solid #dceacd45;
  padding: 14px 24px;
  border-radius: 12px;
  text-align: center;
  font-size: 15px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  max-width: 80%;
}
#toast.visible {
  opacity: 1;
}
.overlay {
  position: absolute;
  inset: 0;
  background: #071d34a8;
  backdrop-filter: blur(7px);
  display: grid;
  place-items: center;
  padding: 18px;
}
.dialog {
  width: 560px;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  background: #f9f7e9;
  border: 4px solid #fffef6;
  border-radius: 22px;
  color: #233c42;
  padding: 30px;
  text-align: center;
  box-shadow: 0 20px 80px #031d3a70;
}
.dialog .eyebrow {
  color: #588575;
  letter-spacing: 3px;
  font-size: 10px;
}
h2 {
  font-size: 32px;
  margin: 14px 0;
  line-height: 1.18;
}
#dialogText {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}
#answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#answers button {
  background: #e5eddd;
  border: 2px solid #b9cec0;
  color: #234a40;
  font-size: 23px;
  padding: 13px;
}
#answers button:hover {
  background: #d2e5c9;
}
#answers button.wrong {
  opacity: 0.48;
}
#answers button.correct {
  background: #b0ddb8;
  border-color: #45946e;
}
#answers button:disabled {
  cursor: default;
}
#feedback {
  min-height: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: #39775b;
}
#dialogButtons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
#dialogButtons button:not(.primary) {
  color: #436554;
  border-color: #9dbbac;
}
#touch {
  position: absolute;
  bottom: 22px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
#touch > div {
  display: flex;
  gap: 14px;
}
#touch button {
  pointer-events: auto;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #173b4699;
  border: 2px solid #e7f7db88;
  font-size: 24px;
  touch-action: none;
  user-select: none;
}
#touch .jump {
  background: #ffc958dd;
  color: #344539;
  width: 76px;
  height: 76px;
}
#touch small {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
}
[hidden] {
  display: none !important;
}
#stage:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  aspect-ratio: auto;
}
#stage:fullscreen canvas#game {
  object-fit: contain;
  background: #102b36;
}
@media (max-width: 850px) {
  header {
    height: 56px;
    padding: 0 18px;
  }
  .edition {
    display: none;
  }
  main {
    padding: 0 10px;
  }
  .screen {
    padding: 2% 4%;
  }
  h1 {
    font-size: 7vw;
    margin: 9px 0;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 3px;
  }
  .intro {
    font-size: 11px;
    margin: 8px 0 10px;
  }
  .hero-picker {
    gap: 7px;
    max-width: 510px;
  }
  .hero-card {
    padding: 4px;
  }
  .hero-card canvas {
    width: 48px;
    height: 45px;
  }
  .hero-card b {
    font-size: 12px;
  }
  .hero-card small {
    font-size: 8px;
  }
  .menu-bottom {
    margin-top: 12px;
    padding: 10px 14px;
    max-width: 510px;
  }
  .primary {
    font-size: 13px;
    padding: 12px 16px;
  }
  select {
    font-size: 13px;
  }
  .instructions {
    font-size: 9px;
    margin-top: 10px;
    gap: 4px;
  }
  .instructions kbd {
    padding: 2px 4px;
  }
  footer {
    font-size: 10px;
  }
  #hud {
    inset: 10px;
  }
  .hud-left,
  .hud-right {
    padding: 7px 10px;
  }
  .hud-left strong {
    font-size: 14px;
  }
  .hud-right {
    gap: 8px;
  }
  h2 {
    font-size: 25px;
  }
  .dialog {
    padding: 17px;
  }
  #dialogText {
    margin: 10px 0;
    font-size: 14px;
  }
  #feedback {
    margin: 10px 0;
  }
  #answers button {
    font-size: 20px;
    padding: 8px;
  }
}
@media (max-width: 550px) and (orientation: portrait) {
  header .hub {
    font-size: 10px;
    letter-spacing: 1px;
  }
  header button {
    font-size: 11px;
    padding: 8px;
  }
  #stage {
    aspect-ratio: 3/5;
    max-height: calc(100svh - 105px);
  }
  canvas#game {
    object-fit: cover;
  }
  .screen {
    padding: 9% 5%;
    background: #133d4560;
  }
  h1 {
    font-size: 18vw;
    margin: 22px 0 15px;
  }
  .intro {
    font-size: 12px;
    text-align: center;
    max-width: 220px;
    line-height: 1.5;
  }
  .hero-picker {
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
  }
  .hero-card {
    flex: 1 0 40%;
    padding: 7px;
  }
  .hero-card canvas {
    width: 53px;
    height: 50px;
  }
  .hero-card b {
    font-size: 14px;
  }
  .hero-card small {
    font-size: 9px;
  }
  .menu-bottom {
    margin-top: 18px;
    display: block;
    text-align: center;
    padding: 12px;
  }
  .menu-bottom .primary {
    margin-top: 13px;
    width: 100%;
    font-size: 16px;
  }
  .instructions {
    font-size: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .instructions kbd,
  .instructions {
    display: none;
  }
  footer > span:nth-child(2) {
    display: none;
  }
  #hud {
    gap: 5px;
  }
  .hud-right {
    gap: 5px;
    font-size: 12px;
  }
  #powerLabel {
    position: absolute;
    top: 64px;
    right: 0;
    background: #143540cc;
    padding: 5px;
    border-radius: 5px;
  }
  #toast {
    font-size: 12px;
    bottom: auto;
    top: 15%;
    width: 85%;
  }
  .dialog {
    padding: 20px;
  }
  h2 {
    font-size: 26px;
  }
  #dialogText {
    font-size: 16px;
  }
  #answers button {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
