/* RuneScape Car: the game fills the screen; everything else stays out of its way. */

html, body {
  margin: 0; height: 100%; overflow: hidden; background: #000; color: #f3ece2;
  font: 18px/1.4 system-ui, -apple-system, Segoe UI, sans-serif;
  /* The page handles every touch itself: no browser zoom, scroll, text
     selection or long-press menu fighting the game. */
  touch-action: none; overscroll-behavior: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}

#stage { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; background: #000; }
#stage canvas { position: absolute; display: block; }
#stage canvas[hidden] { display: none; }

#msg {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%;
  padding: 18px 26px; border-radius: 16px; background: rgba(23, 18, 13, .92); text-align: center; font-size: 1.15rem;
}
#msg button { margin-top: 12px; }

#gate {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 90vw);
  padding: 24px 28px; border-radius: 18px; background: #17120d; text-align: center;
}
#gate h1 { margin: 0 0 8px; font-size: 1.5rem; }
#gate p { color: #cfc3b3; font-size: .95rem; }
#gate input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1.6rem; letter-spacing: .15em; text-align: center; text-transform: uppercase;
  padding: 12px; margin: 8px 0 14px; border-radius: 12px; border: 2px solid #4a3c2c; background: #0a0806; color: #f3ece2;
  user-select: text; -webkit-user-select: text;
}
.err { color: #ff8a7a !important; min-height: 1.2em; }

button {
  font: inherit; font-weight: 700; min-height: 56px; padding: 0 22px; border-radius: 999px; border: 0;
  background: #f0a23b; color: #1b1207; touch-action: manipulation;
}

/* A small tab at the top centre opens the menu, so the game's own corner
   buttons (minimap, inventory, chat) are never covered. */
.tab {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); min-height: 0; height: 26px; width: 64px; padding: 0;
  border-radius: 0 0 14px 14px; background: rgba(23, 18, 13, .55); color: #f3ece2; font-size: 16px; line-height: 26px; z-index: 5;
}
#bar {
  position: fixed; top: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px; max-width: 96vw; padding: 10px 14px; border-radius: 18px; background: rgba(23, 18, 13, .9); z-index: 5;
}
#bar[hidden] { display: none; }
#bar button { background: #2a221a; color: #f3ece2; }
#stats { color: #a89c8c; font-size: .8rem; padding: 0 6px; }

.pill {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 6;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .55);
}
#typing {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; z-index: 6;
  padding: 6px 8px 6px 18px; border-radius: 0 0 16px 16px; background: rgba(23, 18, 13, .9); font-size: .9rem; color: #cfc3b3;
}
#typing[hidden] { display: none; }
#typing button { min-height: 40px; padding: 0 18px; }

/* The input that brings up the car's keyboard: present and focusable, but
   invisible.  16px font so the browser doesn't zoom in on focus. */
#kbdForm { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
#kbd { font-size: 16px; width: 1px; height: 1px; border: 0; padding: 0; }
