/* Original stepped glyphs on an eight-unit em. The inline font also works offline. */
@font-face {
  font-family: 'Sunwove Pixel';
  src: url("data:font/woff;base64,d09GRgABAAAAAAm8AAoAAAAALgQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAEQAAABOYxll9GNtYXAAAAE4AAAAKQAAACwADACxZ2x5ZgAAAWQAAAYMAAAoPDUpXFxoZWFkAAAHcAAAAC4AAAA2JpYPfmhoZWEAAAegAAAAHQAAACQGAgLhaG10eAAAB8AAAABEAAABgACAAABsb2NhAAAIBAAAAQ0AAAGEAAe8HG1heHAAAAkUAAAAGAAAACAAagApbmFtZQAACSwAAAB8AAABABIMKkJwb3N0AAAJqAAAABMAAAAg/3cASHjaY2BgcmCcwMDKwMAUwaTGwMBQAaEZ4xhSgJiBiZuVmYmJmZmJBSjHyIAEgsP9wxgcGBQY6pgb/gP5zA2MDAALlQfQeNpjYGBgZGAGYgYGHgYWBgUgzQKEIH7d//9AUuH///8PwXwGAFEcBroAAAB42s1a227cOAylpEyDoAiKoiiCxT7swz70N/XhY6m2JYoXUbY8nSw2gGOMx5Z4PTykB15g/fMxRAjwCl/hG4BTf+UOgARu+x9h/b8duZ4B1qfhvl8v95VvHd7lt3sA9wC+rlwHn9tWWfbn/Lrn6Dk8PMqFZ990+hv+6fWx9BNyqCOzMz8gcj3x2JbLQGfxFIjv8akg5P33XGKU2oGUTstgSl+vO7r/QO/RAdFV7TPt8trF0g/4WHWCWetzfZqXQepD18tVH8s5VXnQK6le97h6bKu8KTmLlJvlf83ZfhC9Uk5mLQckt9aP/FaedqgPZkPzTxJ2X+oZ9Vuiyjqo+QPD/AHMH2Wh266L9CMc2eBMN1czMw9kDnT35b2H9gSJKgFsu6WI6LHvHf12Z2gRAQ/FwkQm8RzMIhc1ooyehuZrjBVPq1XUXpH0q9QB45TjRI1RdSW3ZYpMDo7jKEcVR27T0G+Ph/JUXQwwhnGDXW92D/cbxoR/IB7H55prIDEDYocVtDfuPIlnTXoAUZ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JIBB8x3+BXeyAXJCI2hzm7swsEJLg43hGHM1g+EKr92OXOxbKn6cuyz4neciBjImPgzUjDhwLDg4qvqCZVltrW5LQ7nlmZhpgb0c7FU9nSqTcytv3Fvv7/nwEtqCRneNpjYGYAg/8lDB4MWAAAKLkBvwA=") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #090909;
  --game-type: 'Sunwove Pixel', 'SFMono-Regular', Consolas, monospace;
  --ui-type-size: 1rem;
  --ui-pixel: calc(var(--ui-type-size) / 8);
  --mast-height: 64px;
  font-family: var(--game-type);
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
html, body, main, #landing, #game, #surface { background-color: #fff; }
body { margin: 0; padding-top: env(safe-area-inset-top); font: 400 var(--ui-type-size)/1.5 var(--game-type); container: page / inline-size; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px dashed currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }
.masthead {
  height: var(--mast-height); display: grid; place-items: center;
  grid-template-columns: minmax(0, 1fr) 208px minmax(0, 1fr);
  padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
  border-bottom: 1px solid #161616; background: #fff;
}
.masthead h1 { grid-column: 2; grid-row: 1; margin: 0; line-height: 0; }
#cart-toggle {
  grid-column: 1; grid-row: 1; justify-self: start; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; touch-action: manipulation;
}
#cart-toggle:focus-visible { background: var(--ink); outline-offset: -2px; }
@media (hover: hover) {
  #cart-toggle:hover { background: var(--ink); }
  #cart-toggle:hover .ui-icon { filter: invert(1); }
}
/* Give the cart its own row when it would crowd the centered logo. */
@container page (max-width: 335px) {
  .masthead, main { --mast-height: 88px; }
  .masthead h1 { grid-column: 1 / -1; grid-row: 2; }
}
#cart-screen {
  min-height: calc(100svh - var(--mast-height) - env(safe-area-inset-top));
  padding: 0 max(16px, env(safe-area-inset-right)) calc(var(--mast-height) + env(safe-area-inset-top)) max(16px, env(safe-area-inset-left));
  display: grid; grid-template-columns: minmax(0, 1fr); place-items: center;
}
.cart-reminder { width: min(100%, 660px); text-align: center; }
#cart-message { margin: 0; font: inherit; text-wrap: balance; }
#cart-message:focus { outline: none; }
#logo-home {
  display: grid; place-items: center; min-height: 44px;
  padding: 0; border: 0; background: transparent; touch-action: manipulation;
}
.wordmark { display: block; width: 208px; height: auto; }
#landing {
  min-height: calc(100vh - var(--mast-height));
  min-height: calc(100svh - var(--mast-height) - env(safe-area-inset-top));
  display: grid; place-items: center; position: relative;
}
#play {
  display: grid; place-items: center; background: transparent; border: 0;
  padding: 8px; margin-top: -1.5svh; touch-action: manipulation;
}
#play-glyph {
  display: block; aspect-ratio: 72 / 66; width: calc(72 * var(--ui-pixel));
  /* Five hand-pixelled poses share one grid and the same stationary base. */
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAABCAQMAAABAa95yAAAABlBMVEX///8AAABVwtN+AAAB3ElEQVR42uWW222DMBSGiZCSFxpGYIVu0FUyQjbAm3SFjMAoHsFSXqhklRb7XO0TK32q1PrpD/70x5yb6bq/s6ZtX6sQLWhO4lMIY+HewaefJ0fCsKS9Pu8elv49bX0shiVDsLH0b2krCpotETqCuBzB6MI0WTJEYstL0rVlgzagH9EDiNcXoG8GTdC3GJC+Z5oSJ+kB6RHpkGlKqrQcSTikd+7GSVWWDoVHej/DjZOqLD2KgPSYaEqqsgwoItL9TnNSlWVEsSHdJZoCryw3Eg7puaKjgpLwSE8VzZYexYr06ZvmpGrLFUVEus/0XdBeQklsSHeZDoJeJZSFQ3rO9Mx0lFAWHukp0xPTbOkfeY+CdpV3ee5e0L48dxmTnNTCOz6Kd05qce7VzCWJIiberBP6kyLezqxBeoEil3Z9U3B0nUS7dyjwugaD3ZeUVF3f3u557R2qntfzRJ/bl/OkmFU6Jk5B9RzU8dbQGcT1DPRV5XIoIJvGOumeolMNGhAJGFFXru8aGkGEEcZf4N4xILi3wgijNXBfMk0QTGsW3PNsSRC8HAueJ2xZQZKGWdWwlDTMwRMo3xA8Y3+dpnunh0dLS9Cd9hRN9+UBHrmW4A+s+gutIYyvv4b4F+sLK7JlrrZ6c9kAAAAASUVORK5CYII=") no-repeat 0% 50% / 500% 100%;
  image-rendering: pixelated; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  #play-glyph { animation: arcade-key-idle 2s step-end infinite; }
}
/* Rest, lift, peak, settle on frames 0, 8, 10 and 12 of a 24-frame loop. */
@keyframes arcade-key-idle {
  0%, 58.333333%, 100% { background-position-x: 0%; }
  33.333333%, 50% { background-position-x: 25%; }
  41.666667% { background-position-x: 50%; }
}
@media (hover: hover) {
  #play:hover #play-glyph { animation: none; background-position-x: 75%; }
}
#play:focus-visible #play-glyph { animation: none; background-position-x: 75%; }
#play:active #play-glyph { animation: none; background-position-x: 100%; }
noscript { position: absolute; bottom: 20%; }
#game {
  --side: clamp(12px, 3vw, 55px);
  min-height: calc(100svh - var(--mast-height) - env(safe-area-inset-top));
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: center;
  padding: 12px max(var(--side), env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(var(--side), env(safe-area-inset-left));
}
.arcade { --map-ratio: 2.2916667; width: min(100%, 1660px, calc((100svh - var(--mast-height) - 88px) * var(--map-ratio))); min-width: 0; }
.toolbar,.scores,.tools,.panel-actions { display: flex; align-items: center; }
.toolbar { justify-content: space-between; margin-bottom: 9px; gap: 8px; }
.scores { gap: clamp(10px, 2.4vw, 36px); }
.scores > span { display: inline-flex; align-items: center; gap: 6px; }
.scores #lives { width: calc(29 * var(--ui-pixel)); flex-direction: row; gap: var(--ui-pixel); }
#walker-count-pixels { display: block; width: calc(27 * var(--ui-pixel)); height: calc(7 * var(--ui-pixel)); image-rendering: pixelated; }
.tools { gap: 6px; flex-shrink: 0; }
.toolbar > .tools { margin-left: auto; }
.tools button {
  background: #fff; border: var(--ui-pixel) solid #111; width: 44px; height: 44px;
  display: grid; place-items: center; padding: 0; touch-action: manipulation;
}
.tools button:focus-visible { background: #111; color: #fff; }
.ui-icon { display: inline-flex; }
.ui-icon canvas { display: block; width: calc(9 * var(--ui-pixel)); height: calc(9 * var(--ui-pixel)); image-rendering: pixelated; }
.ui-icon[data-icon="pause"] canvas { width: calc(8 * var(--ui-pixel)); height: calc(8 * var(--ui-pixel)); }
.ui-icon[data-icon="walker"] canvas { width: calc(15 * var(--ui-pixel)); height: calc(12 * var(--ui-pixel)); }
.ui-icon[data-icon="speaker"] canvas { width: calc(11 * var(--ui-pixel)); }
.ui-icon[data-icon="cart"] canvas { width: calc(12 * var(--ui-pixel)); height: calc(11 * var(--ui-pixel)); }
button:focus-visible .ui-icon { filter: invert(1); }
@media (hover: hover) {
  .tools button:hover { background: #111; color: #fff; }
  .tools button:hover .ui-icon { filter: invert(1); }
}
.map-scroll {
  width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain; background: #fff; box-shadow: inset 0 0 0 1px #111;
}
.map { position: relative; width: 100%; aspect-ratio: 880 / 384; background: #fff; isolation: isolate; }
#world { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#tunnel-pixels { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
#switches { position: absolute; inset: 0; pointer-events: none; }
.switch {
  pointer-events: auto; position: absolute; padding: 0; background: transparent;
  border: 0; border-radius: 0; touch-action: none; user-select: none;
}
.switch:focus-visible { outline: 2px dashed #111; outline-offset: -2px; box-shadow: inset 0 0 0 3px white; }
#surface {
  min-height: calc(100svh - var(--mast-height) - env(safe-area-inset-top));
  display: grid; grid-template-columns: minmax(0, 1fr); place-items: center;
  padding: 12px max(12px, 3vw, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(12px, 3vw, env(safe-area-inset-left));
}
.surface-inner { position: relative; min-width: 0; width: min(100%, 1200px, max(620px, calc((100svh - var(--mast-height) - 220px) * 2.083333))); }
#field { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.surface-actions { position: absolute; right: 0; top: 0; display: flex; }
.drop { text-align: center; margin: clamp(10px, 2.5vh, 24px) auto 0; }
.drop h2 { margin: 0; font: inherit; }
.drop h2 span { display: block; }
.drop h2 span + span { margin: 8px auto 0; }
.signup-form { display: flex; width: min(100%, 420px); margin: 16px auto 0; }
.signup-form input, .signup-form button { border: var(--ui-pixel) solid #111; border-radius: 0; min-height: 44px; font: inherit; }
.signup-form input { flex: 1; min-width: 0; background: white; color: black; padding: 9px 12px; }
.signup-form button { background: #111; color: white; padding: 9px 16px; margin-left: calc(-1 * var(--ui-pixel)); }
.signup-form button:disabled { cursor: default; }
.signup-form input:focus-visible { outline: 2px solid black; outline-offset: -3px; }
.signup-form button:focus-visible { outline-color: black; outline-offset: 2px; }
.signup-status { margin: 8px auto 0; }
.signup-status:empty { margin: 0; }
@media (max-width: 320px) {
  #cart-form { flex-direction: column; gap: 4px; }
  #cart-submit { margin-left: 0; }
}
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
dialog { padding: 0; border: var(--ui-pixel) solid #090909; box-shadow: 4px 4px #090909; color: #090909; background: #fff; max-width: min(390px, calc(100vw - 32px)); max-height: min(90svh, calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px)); overflow-y: auto; overscroll-behavior: contain; }
dialog::backdrop { background: rgb(255 255 255 / .84); }
.panel-content { padding: 24px; margin: 0; }
.panel-content h2 { text-align: center; font: inherit; margin: 0; }
/* Keep the info message on one line along the game's horizontal axis, including rotated phones. */
#panel[data-mode="rules"] { max-width: calc(var(--play-width, 100vw) - 8px); }
#panel[data-mode="rules"] .panel-content {
  padding-inline: clamp(2px, calc((var(--play-width, 100vw) - 14rem - 12px) / 2), 24px);
}
#panel[data-mode="rules"] #panel-title {
  white-space: nowrap;
  font-size: min(var(--ui-type-size), calc((var(--play-width, 100vw) - 16px) / 14));
}
.panel-actions { gap: 8px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.panel-actions button { width: 44px; height: 44px; }
#primary { background: #111; }
#primary .ui-icon { filter: invert(1); }
@media (max-width: 600px), (max-height: 600px), (pointer: coarse) {
  html:has(#game:not([hidden])) { overflow: hidden; }
  body:has(#game:not([hidden])) {
    --play-width: 100vw;
    --play-height: 100vh;
    --play-width: 100dvw;
    --play-height: 100dvh;
    --play-top: env(safe-area-inset-top, 0px);
    --play-bottom: env(safe-area-inset-bottom, 0px);
    --play-left: env(safe-area-inset-left, 0px);
    --play-right: env(safe-area-inset-right, 0px);
    position: fixed; left: 0; top: 0; width: var(--play-width); height: var(--play-height);
    padding: var(--play-top) 0 0; overflow: hidden;
  }
  #game {
    height: calc(var(--play-height) - var(--mast-height) - var(--play-top));
    min-height: 0; padding: 4px max(8px, var(--play-right)) max(4px, var(--play-bottom)) max(8px, var(--play-left));
    position: relative; container: playfield / inline-size;
  }
  body:has(#game:not([hidden])) .masthead {
    padding-left: max(8px, var(--play-left)); padding-right: max(8px, var(--play-right));
  }
  .arcade {
    --map-height: calc(var(--play-height) - var(--mast-height) - var(--play-top) - max(4px, var(--play-bottom)) - 4px);
    width: 100%;
  }
  .toolbar {
    position: absolute; top: calc(0px - var(--mast-height)); left: calc(48px + max(8px, var(--play-left))); right: calc(48px + max(8px, var(--play-right)));
    height: var(--mast-height); margin: 0; gap: 0; pointer-events: none;
  }
  .toolbar .tools { gap: 4px; pointer-events: auto; }
  .scores { gap: 10px; }
  .scores > span { gap: 4px; }
  .map-scroll { width: min(100%, 1660px, calc(var(--map-height) * var(--map-ratio))); margin-inline: auto; overflow: hidden; touch-action: manipulation; }
  .switch { touch-action: manipulation; }
  .switch::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
  }
  .panel-content { padding: 14px 18px 16px; }
  .panel-actions { margin-top: 12px; }
}
@media (max-width: 600px) and (orientation: portrait), (pointer: coarse) and (orientation: portrait) {
  /* Rotate the common parent of the canvas and its HTML hit targets exactly once. */
  body:has(#game:not([hidden])) {
    --play-width: 100dvh; --play-height: 100dvw;
    --play-top: env(safe-area-inset-right, 0px); --play-bottom: env(safe-area-inset-left, 0px);
    --play-left: env(safe-area-inset-top, 0px); --play-right: env(safe-area-inset-bottom, 0px);
    left: 100dvw; transform-origin: top left; transform: rotate(90deg);
  }
  /* A native modal is in the browser's top layer, outside the body's transform. */
  body:has(#game:not([hidden])) dialog[open] {
    max-width: min(390px, calc(100dvh - 32px)); max-height: calc(100dvw - 32px);
    transform: rotate(90deg);
  }
}
/* On narrow playfields, move the four game controls below the masthead. */
@container playfield (max-width: 704px) {
  .map-scroll { width: min(100%, calc((var(--map-height) - 48px) * var(--map-ratio))); }
  .toolbar { position: static; width: 100%; height: 44px; margin-bottom: 4px; }
}
@container playfield (max-width: 325px) {
  .scores { flex-direction: column; align-items: flex-start; gap: 3px; }
}
@container playfield (max-width: 255px) {
  .map-scroll { width: min(100%, calc((var(--map-height) - 72px) * var(--map-ratio))); }
  .toolbar { height: 68px; flex-direction: column; justify-content: space-between; }
  .scores { flex-direction: row; }
  .toolbar > .tools { margin-left: 0; }
}
@media (max-width: 540px) {
  .surface-inner { padding-top: 44px; }
}
@media (max-height: 540px) and (min-width: 520px) and (orientation: landscape) {
  .surface-inner { width: min(100%, 900px); }
  #field { max-height: 49svh; width: auto; max-width: 100%; margin: auto; }
  #surface { padding-top: 4px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .drop { margin-top: 4px; }
  #early-access { margin-top: 8px; }
}
