:root {
  color-scheme: light;
  --ink: #243b37;
  --paper: #f4f3ed;
  --muted: #7d8982;
  --green: #2f6651;
  --line: #dddfd5;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.7;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #e5ac55;
  outline-offset: 4px;
}
.masthead {
  height: 88px;
  max-width: 1320px;
  margin: auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1.2px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--paper);
  border-radius: 10px;
  width: 35px;
  height: 35px;
  font-weight: 900;
  font-style: italic;
  font-size: 28px;
  line-height: 1;
}
.brand-light {
  font-size: 19px;
  font-weight: 400;
  color: #7a8680;
  letter-spacing: -0.6px;
}
.edition {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66a181;
}
.home-link {
  font-size: 12px;
}
.home-link span {
  margin-left: 12px;
}
main {
  max-width: 1248px;
  padding: 0 32px;
  margin: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0 28px;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 2px;
  color: var(--green);
}
.eyebrow span {
  border: 1px solid #ccd4c9;
  border-radius: 4px;
  padding: 2px 5px;
  letter-spacing: 0.5px;
  margin-left: 9px;
}
h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2.8px;
  line-height: 1.12;
}
.title-dot {
  color: #9aad83;
}
.subtitle {
  font-size: 13px;
  color: #7a847d;
  margin: 12px 0 0;
}
.level-label {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 16px;
}
.tiny-star {
  font-size: 38px;
  font-weight: 300;
  color: #819278;
}
.level-label div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.level-label div span {
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 1.6px;
  color: #8a9188;
}
.level-label strong {
  font-size: 14px;
  font-weight: 550;
}
.game-shell {
  border-radius: 16px;
  overflow: hidden;
  border: 5px solid #e6e7de;
  box-shadow: 0 18px 45px -25px #243b3766;
  background: #1c303a;
}
.stage {
  position: relative;
  aspect-ratio: 1.92;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none !important;
  touch-action: none;
}
.hud {
  position: absolute;
  left: 26px;
  right: 24px;
  top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff1d8;
  pointer-events: none;
  gap: 10px;
}
.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.world-chip {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1px;
}
.world-chip span {
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 500;
  margin-left: 7px;
  color: #e2dfd4;
}
.coin-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 30px;
  background: #182e3b70;
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.coin-chip > span:last-child {
  color: #b6bbb4;
  font-size: 10px;
}
.coin-icon {
  color: #ffd180;
  font-size: 25px;
  line-height: 18px;
}
.clock {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.icon-button {
  position: relative;
  pointer-events: auto;
  display: grid;
  place-items: center;
  border: 1px solid #e5ead02b;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  background: #18333e45;
  color: #ecead7;
  font-size: 17px;
}
.icon-button:hover {
  background: #18333eaa;
}
.sound-off {
  position: absolute;
  font-size: 13px;
  right: 3px;
  top: 0;
}
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #172b3d15, #172b3d05);
  pointer-events: none;
}
.overlay[hidden] {
  display: none;
}
.welcome {
  pointer-events: auto;
  text-align: center;
  color: #fff1da;
  padding: 28px 42px 24px;
  border: 1px solid #eadbca30;
  border-radius: 15px;
  background: #203745d9;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 50px #18343b25;
}
.welcome-label {
  font-size: 8px;
  letter-spacing: 2.5px;
  color: #adccbd;
  font-weight: 650;
}
h2 {
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -1.7px;
  margin: 16px 0 12px;
  font-weight: 650;
}
.welcome p {
  font-size: 12px;
  line-height: 1.7;
  color: #c5cdc1;
  margin: 0 0 21px;
}
.primary-button {
  display: block;
  margin: 0 auto;
  background: #f3ce87;
  border: 0;
  border-radius: 8px;
  padding: 13px 26px;
  color: #344039;
  font-size: 12px;
  font-weight: 750;
  min-width: 190px;
  box-shadow: 0 3px 0 #9e7d50;
  transition:
    transform 0.15s,
    background 0.15s;
}
.primary-button:hover {
  background: #ffdc99;
  transform: translateY(-1px);
}
.start-hint {
  display: block;
  font-size: 9px;
  color: #a8bbb0;
  margin-top: 17px;
}
.notice {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 40px;
  color: #edf7de;
  background: #1b3a3be6;
  padding: 9px 18px;
  font-size: 11px;
  letter-spacing: 0.4px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.notice.show {
  opacity: 1;
}
.progress-track {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: #142f3b55;
  width: 100%;
}
#progress {
  width: 0;
  height: 100%;
  background: #f3ca81;
  transition: width 0.1s linear;
}
.under-game {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 3px 26px;
  border-bottom: 1px solid var(--line);
}
.instructions {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #7b887e;
  font-size: 10px;
}
.instructions > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.instructions i {
  font-style: normal;
  color: #9ca499;
}
kbd {
  font-family: inherit;
  font-size: 9px;
  line-height: 20px;
  min-width: 23px;
  padding: 0 5px;
  text-align: center;
  border: 1px solid #d8ded1;
  background: #ecefe5;
  border-radius: 4px;
  color: #6b7c6b;
}
.text-button {
  background: none;
  border: 0;
  color: #6b7b6e;
  font-size: 11px;
}
.text-button:hover {
  color: #203d2c;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 26px;
  color: #8a948a;
  font-size: 10px;
}
footer p {
  display: flex;
  align-items: center;
  gap: 10px;
}
footer > span {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.footer-star {
  font-size: 23px;
  color: #93a186;
}
.footer-separator {
  margin: 0 12px;
  color: #b9c1b5;
}
.touch-controls {
  display: none;
}
.error {
  padding: 16px;
  background: #fae3d9;
  border-radius: 8px;
  font-size: 13px;
}
.game-shell:fullscreen {
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #172c39;
}
.game-shell:fullscreen .stage {
  height: 100%;
  aspect-ratio: auto;
}
.game-shell:fullscreen .touch-controls {
  flex-shrink: 0;
}
@media (pointer: coarse) {
  .touch-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 19px;
    background: #e7eade;
    gap: 12px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .direction-pad {
    display: flex;
    gap: 10px;
  }
  .touch-controls button {
    width: 62px;
    height: 49px;
    border: 1px solid #c8d2bf;
    border-bottom: 3px solid #b8c6ac;
    background: #f6f7ef;
    border-radius: 11px;
    color: #3d624b;
    font-size: 26px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .touch-controls button.active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    background: #d6e2c8;
  }
  .touch-controls .jump-button {
    width: 105px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1px;
    background: #f2d89e;
    border-color: #d7bd83;
    color: #56583b;
  }
  .jump-button span {
    margin-left: 6px;
    font-size: 22px;
  }
  .touch-hint {
    font-size: 7px;
    letter-spacing: 1px;
    color: #88947e;
  }
  .instructions {
    display: none;
  }
  .start-hint {
    font-size: 10px;
  }
  .under-game {
    justify-content: flex-end;
    padding: 12px 3px;
  }
  .game-shell:fullscreen .stage {
    min-height: 0;
    flex: 1;
  }
}
@media (max-width: 700px) {
  .masthead {
    height: 68px;
    padding: 0 20px;
  }
  .brand {
    font-size: 21px;
  }
  .brand-light {
    font-size: 17px;
  }
  .brand-mark {
    height: 30px;
    width: 30px;
    font-size: 24px;
  }
  .edition {
    display: none;
  }
  .home-link {
    font-size: 10px;
  }
  main {
    padding: 0 14px;
  }
  .intro {
    padding: 27px 5px 22px;
  }
  .eyebrow {
    font-size: 8px;
    margin-bottom: 9px;
  }
  h1 {
    font-size: 39px;
    letter-spacing: -2px;
  }
  .subtitle {
    font-size: 11px;
    max-width: 235px;
    line-height: 1.6;
    margin-top: 8px;
  }
  .level-label {
    display: none;
  }
  .game-shell {
    border-width: 3px;
    border-radius: 12px;
  }
  .stage {
    aspect-ratio: 1.22;
  }
  .hud {
    left: 12px;
    right: 12px;
    top: 12px;
    gap: 6px;
  }
  .hud-left,
  .hud-right {
    gap: 7px;
  }
  .world-chip {
    display: none;
  }
  .coin-chip {
    padding: 6px 9px;
    font-size: 11px;
  }
  .clock {
    font-size: 10px;
  }
  .icon-button {
    width: 28px;
    height: 28px;
  }
  .expand {
    display: none;
  }
  .welcome {
    padding: 23px 27px 20px;
    border-radius: 12px;
  }
  h2 {
    font-size: 34px;
    margin: 12px 0;
  }
  .welcome p {
    font-size: 11px;
    margin-bottom: 17px;
  }
  .welcome-label {
    font-size: 7px;
  }
  .primary-button {
    padding: 12px 20px;
    min-width: 180px;
  }
  .start-hint {
    font-size: 8px;
    margin-top: 14px;
  }
  .touch-controls {
    padding: 13px 12px;
  }
  .touch-hint {
    display: none;
  }
  .touch-controls button {
    width: 63px;
    height: 52px;
  }
  .touch-controls .jump-button {
    width: 100px;
  }
  footer {
    padding: 10px 4px 20px;
  }
  footer > span {
    max-width: 125px;
    text-align: right;
    font-size: 7px;
    line-height: 1.9;
    letter-spacing: 1px;
  }
  .footer-separator {
    display: none;
  }
  footer p {
    font-size: 9px;
    gap: 5px;
  }
  .instructions {
    gap: 10px;
    font-size: 9px;
  }
  .instructions i {
    display: none;
  }
  .instructions > span:last-child {
    display: none;
  }
  .notice {
    font-size: 10px;
    bottom: 18px;
  }
}
@media (max-height: 500px) and (pointer: coarse) {
  .masthead,
  .intro,
  .under-game,
  footer {
    display: none;
  }
  main {
    padding: 0;
  }
  .game-shell {
    height: 100dvh;
    border: 0;
    border-radius: 0;
    position: relative;
  }
  .stage {
    height: 100%;
    aspect-ratio: auto;
  }
  .touch-controls {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    background: none;
    pointer-events: none;
    padding: 0;
  }
  .touch-controls button {
    pointer-events: auto;
    opacity: 0.86;
  }
  .hud {
    top: 12px;
  }
  .welcome {
    padding: 16px 25px;
  }
  h2 {
    font-size: 29px;
    margin: 8px;
  }
  .welcome p {
    margin-bottom: 10px;
  }
  .start-hint {
    margin-top: 12px;
  }
  .touch-hint {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

#app,
#app > .wrela-viewport {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
}
#app canvas {
  width: 100%;
  height: 100%;
  object-fit: fill;
}
#wrela-failure:not([hidden]) {
  position: absolute;
  z-index: 10;
  background: #fae3d9;
  color: #6e3427;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
}
