/* Broski Town: one full-screen canvas. The page itself never scrolls, zooms or selects. */
@font-face {
  font-family: "Permanent Marker";
  src: url(fonts/permanent-marker-latin.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Patrick Hand";
  src: url(fonts/patrick-hand-latin.woff2) format("woff2");
  font-display: swap;
}
:root {
  --paper: #fdfdf9;
  --ink: #1c1a19;
  --soft: #4a4a52;
  --rule: #bcd1f0;
  --yellow: #ffe27a;
  --marker: #2453c9;
  color-scheme: light;
}
html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  font-family: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", cursive;
}
#game {
  position: fixed;
  left: 0;
  top: 0;
  display: block;
  touch-action: none;
  outline: none;
}
/* measures the notch / home-bar insets for the game code */
#safe {
  position: fixed;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

/* desktop: "this is a phone game" card */
#desk {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
  touch-action: auto;
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px),
    var(--paper);
}
#desk[hidden] { display: none; }
.card {
  max-width: 560px;
  text-align: center;
  font-size: 21px;
  line-height: 1.4;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px 4px 9px 5px;
  padding: 28px 28px 22px;
  box-shadow: 6px 7px 0 rgba(28, 26, 25, 0.15);
}
.card h1 {
  font-family: "Permanent Marker", "Comic Sans MS", cursive;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1;
  margin: 0 0 12px;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.card p { margin: 0 0 14px; }
.card img { display: block; margin: 4px auto 6px; width: 200px; height: 200px; image-rendering: pixelated; }
.card .url { font-family: "Permanent Marker", cursive; font-size: 24px; margin-bottom: 18px; }
.card button {
  font: 26px "Permanent Marker", "Comic Sans MS", cursive;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 10px 6px 12px 7px;
  padding: 8px 22px;
  cursor: pointer;
  box-shadow: 4px 5px 0 rgba(28, 26, 25, 0.16);
}
.card button:hover { transform: translateY(-1px); }
.card button:focus-visible { outline: 3px dashed var(--marker); outline-offset: 4px; }
.card .keys { margin: 18px 0 0; font-size: 17px; color: var(--soft); }
.card kbd {
  font: 15px "Patrick Hand", cursive;
  border: 1.5px solid var(--ink);
  border-radius: 4px 5px 3px 6px;
  padding: 0 6px;
  background: #fff;
  color: var(--ink);
}
