/* Grub Dash styles: page basics, fonts, the loading screen, key prompts, shared animations. */

:root {
  /* (the colors, sizes and type are the Sticker Street kit's tokens, --gd-*: css/kit/tokens.css) */
  --font: "Fredoka", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
/* (no kerning: Fredoka's pairs, like IV and AV, pull letters into each other at our heavy weights, so an
   I could vanish into the V of DELIVERED. The feature setting also reaches buttons and anything with a
   `font:` shorthand, which resets font-kerning) */
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1d24; font-family: var(--font); font-kerning: none; font-feature-settings: "kern" 0; color: #fff; -webkit-user-select: none; user-select: none; touch-action: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* (100lvh: on an iPhone, installed as an app, the page's "full height" can stop short of the home-bar strip; the game's view reaches the bottom edge anyway) */
/* An iPhone Home Screen app: the page is sized to the whole screen, not the
   short page iOS gives it, from the first frame (the class: js/ios-app.js, in
   <head>; install.js fitStandalone keeps it right). */
html.ios-app, html.ios-app body { height: 100vh; height: 100lvh; }
#app > canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: calc(100lvh + var(--vgap, 0px)); } /* (--vgap: install.js fitStandalone) */
#app { position: fixed; inset: 0; }
canvas { display: block; }
.hidden { display: none !important; }
/* a key or button prompt: the Sticker Street kit's SVG (phone/kit.js icon()) */
.ki { display: inline-block; vertical-align: middle; flex: none; overflow: visible; }
/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(circle at 50% 40%, #ff7a3d, #c9321f); transition: opacity .5s; }
#loading.done { opacity: 0; pointer-events: none; }
/* (the loading bar: a white sticker filling with mustard) */
#loading .bar { width: min(320px, 70vw); height: 18px; border-radius: 9px; background: #fff; border: var(--gd-line) solid var(--gd-ink); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); overflow: hidden; }
#loading .bar i { display: block; height: 100%; width: 0; background: var(--gd-mustard); border-right: 2px solid var(--gd-ink); transition: width .2s; }
#loading p { margin: 0; font: 600 14px/1.3 var(--gd-font); }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.05); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes copText { 50% { color: #5a8dff; } }
body.jail #app::after { content: ""; position: fixed; inset: 0; z-index: 9; background: repeating-linear-gradient(90deg, rgba(30,30,36,.9) 0 18px, transparent 18px 90px), rgba(0,0,0,.45); animation: jailIn .5s ease-out; }
@keyframes jailIn { from { transform: translateY(-100%); } }
@keyframes wiggle { 0%,100% { rotate: 0deg; } 25% { rotate: -2deg; } 75% { rotate: 2deg; } }
@keyframes noteIn { from { opacity: 0; transform: translateY(-20px); } }
@keyframes breathe { 50% { background: rgba(255,255,255,.35); } }
@keyframes pop { 50% { transform: scale(1.2); } }
@keyframes radar { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes calloutPulse { 50% { transform: translateX(-50%) scale(1.05); } }

/* Line icons (js/glyphs.js): the color of the text around them */
.gl { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
button .gl, .btn .gl { vertical-align: -0.22em; }
.btn > .gl { margin-right: 3px; }
