/* SANDBOX browser demo (dirtnapgame.com/sandbox). GENERATED by
   web-demos/sandbox/tools/sync_site.py from the demo's index.html <style>
   block - edit THERE, never here. The site CSP is style-src 'self':
   every rule lives in this file. */

@font-face {
  font-family: "Silkscreen";
  src: url("/assets/fonts/silkscreen-regular.woff2") format("woff2");
  font-display: swap;
}

  html, body { margin: 0; height: 100%; background: #070503; overflow: hidden; }
  canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: none;
    background: #070503;
  }
  /* logo + wishlist sit in the top-left corner as crisp DOM */
  #topui {
    position: fixed; top: 14px; left: 16px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    pointer-events: none;
  }
  #logo {
    width: min(20vw, 220px);
    image-rendering: auto;
  }
  #wishlist {
    pointer-events: auto;
    font-family: Silkscreen, monospace; font-size: 14px; letter-spacing: 1px;
    color: #e8dcc8; text-decoration: none;
    background: rgba(38, 26, 15, 0.85);
    border: 2px solid #c9a04a;
    padding: 6px 14px;
    cursor: pointer;
  }
  #wishlist:hover {
    background: rgba(74, 50, 27, 0.95);
    border-color: #ffd25a;
    color: #ffe9b0;
  }
  /* SHARE button hangs centered right under the square's bottom edge:
     the square always ends at world y 314 of the 360-tall view, and the
     canvas is exactly viewport-high, so 314/360 of 100vh IS that edge */
  #share-btn {
    position: fixed; top: calc(87.223vh + 10px);
    left: 50%; transform: translateX(-50%); z-index: 5;
    font-family: Silkscreen, monospace; font-size: 17px; letter-spacing: 1px;
    color: #ffe9b0; background: rgba(38, 26, 15, 0.85);
    border: 2px solid #c9a04a; padding: 10px 20px; cursor: pointer;
  }
  #share-btn:hover { background: rgba(74, 50, 27, 0.95); border-color: #ffd25a; }
  /* brush palette, bottom center: click to activate, keys 1-7; only the
     ACTIVE brush wears an outline */
  #brushbar {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; z-index: 5;
  }
  #brushbar button {
    font-family: Silkscreen, monospace; font-size: 15px; letter-spacing: 1px;
    color: #e8dcc8; background: rgba(38, 26, 15, 0.85);
    border: 2px solid transparent; padding: 9px 13px; cursor: pointer;
  }
  #brushbar button:hover { background: rgba(74, 50, 27, 0.95); }
  #brushbar button.active {
    border-color: #ffd25a;
    background: rgba(74, 50, 27, 0.95);
  }
  #brushbar .k { color: #8a7c64; margin-right: 6px; font-size: 12px; }
  #b-dirt { color: #d8ac52; }
  #b-water { color: #7fd0ea; }
  #b-lava { color: #ff9c46; }
  #b-mud { color: #b6996a; }
  #b-snow { color: #e8f2fa; }
  #b-tnt { color: #e05a48; }
  #b-reset { margin-left: 12px; }
  /* share popup: dark backdrop + card with the framed snapshot, platform
     intents and copy/save. The preview is a CANVAS on purpose - no data:
     urls involved, so the site CSP never enters the picture */
  #share-pop {
    position: fixed; inset: 0; z-index: 20;
    background: rgba(4, 2, 1, 0.75);
    display: none; align-items: center; justify-content: center;
  }
  #share-pop.show { display: flex; }
  #share-card {
    background: #1a120a; border: 2px solid #c9a04a;
    padding: 14px 16px 12px; max-width: 92vw;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
  }
  #share-head {
    align-self: stretch; display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
    font-family: Silkscreen, monospace; font-size: 15px; letter-spacing: 1px;
    color: #ffd25a;
  }
  #share-close {
    font-family: Silkscreen, monospace; font-size: 14px; line-height: 1;
    color: #e8dcc8; background: #261a0f; border: 0;
    width: 26px; height: 26px; padding: 0; cursor: pointer;
  }
  #share-close:hover { color: #ffe9b0; background: #3a2817; }
  #share-view {
    width: min(52vh, 76vw, 440px); height: auto;
    cursor: auto;   /* the bare canvas rule hides the OS cursor - not here */
  }
  #share-sub {
    align-self: stretch; text-align: center; margin-top: 2px;
    font-family: Silkscreen, monospace; font-size: 12px; letter-spacing: 1px;
    color: #8a7c64;
  }
  #share-row, #share-row2 {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  }
  #share-row { margin-top: 12px; }
  #share-row button, #share-row2 button {
    font-family: Silkscreen, monospace; font-size: 13px; letter-spacing: 1px;
    color: #e8dcc8; background: rgba(38, 26, 15, 0.85);
    border: 0; padding: 9px 13px; cursor: pointer;
  }
  #share-row button:hover, #share-row2 button:hover {
    background: rgba(74, 50, 27, 0.95); color: #ffe9b0;
  }
  #share-note {
    min-height: 16px;
    font-family: Silkscreen, monospace; font-size: 11px; letter-spacing: 1px;
    color: #8a7c64; text-align: center;
  }
  #share-note.hot { color: #ffd25a; font-size: 13px; }
  /* trailer box: game.js injects the YouTube iframe after a minute */
  #trailer {
    position: fixed; right: 16px; bottom: 16px;
    border: 2px solid #c9a04a; background: #000;
    display: none;
  }
  #trailer.show { display: block; }
  #trailer-label {
    display: block;
    font-family: Silkscreen, monospace; font-size: 12px; letter-spacing: 1px;
    color: #ffd25a; background: #261a0f;
    padding: 6px 10px; text-align: center;
    text-decoration: none; cursor: pointer;
  }
  #trailer-label:hover { color: #ffe9b0; background: #3a2817; }
  #trailer iframe {
    display: block; border: 0;
    width: min(32vw, 400px); aspect-ratio: 16 / 9;
  }
  #trailer-close {
    position: absolute; top: -12px; right: -12px; width: 24px; height: 24px;
    font-family: Silkscreen, monospace; font-size: 12px; line-height: 1;
    color: #e8dcc8; background: #261a0f; border: 2px solid #c9a04a;
    padding: 0; cursor: pointer;
  }
  #trailer-close:hover { color: #ffe9b0; border-color: #ffd25a; }
  /* touch-only devices get a full-screen note: the demo needs kb+mouse */
  #mobile-note {
    position: fixed; inset: 0; z-index: 10;
    background: #070503;
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; padding: 24px; text-align: center;
  }
  #mobile-note img { width: min(80vw, 400px); }
  #mobile-note .big {
    font-family: Silkscreen, monospace; font-size: 26px; letter-spacing: 2px;
    color: #ffd25a;
    text-shadow: 2px 2px #141008, -2px 2px #141008,
      2px -2px #141008, -2px -2px #141008;
  }
  #mobile-note a {
    font-family: Silkscreen, monospace; font-size: 16px; letter-spacing: 1px;
    color: #e8dcc8; text-decoration: none;
    background: rgba(38, 26, 15, 0.85);
    border: 2px solid #c9a04a;
    padding: 10px 20px;
  }
  #mobile-trailer iframe {
    display: block;
    width: min(86vw, 420px); aspect-ratio: 16 / 9;
  }
  @media (hover: none) and (pointer: coarse) {
    #mobile-note { display: flex; }
  }
