/* Project Oso: the interface. A hand-painted boardwalk (run 4).
   Everything on screen is something that could be painted on the wall of Osoberto's or taped to
   its window: signboards with a tile border, surf shop stickers with a white die-cut outline,
   order tickets, masking tape with marker on it. The flag's colors (GDD 15.1): white, a red star,
   grizzly brown and green, with the Pacific's teal and a sign painter's gold.
   Headings are lettered by ui/sign.js. Everything else is Verdana, which every machine had in 2004. */
:root {
  --white: #fffaf0;
  --red: #d6342a;
  --red-deep: #8a1f1a;
  --brown: #5a3a22;
  --brown-deep: #24150c;
  --green: #2f7d4f;
  --green-deep: #174a2c;
  --gold: #f2b63c;
  --teal: #1f9aa8;
  --pink: #e8457a;
  --paper: #fff6dc;
  --paper-2: #f1e1bb;
  --tape: #f3e4ae;
  --wood: #b08458;
  --ink: rgba(36, 21, 12, 0.72);
  --body: Verdana, Geneva, Tahoma, "DejaVu Sans", sans-serif;
  --hud-font: var(--body);
  --mono: "Courier New", Courier, monospace;
  /* a painted tile, the kind on the risers of the beach steps: a border is a row of them */
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cdefs%3E%3Cg id='t'%3E%3Crect width='12' height='12' fill='%23fff6dc'/%3E%3Cpath d='M6 1.7 L10.3 6 L6 10.3 L1.7 6Z' fill='%231f9aa8'/%3E%3Ccircle cx='6' cy='6' r='1.5' fill='%23f2b63c'/%3E%3Cpath d='M0 0h3.2L0 3.2zM12 0v3.2L8.8 0zM0 12v-3.2L3.2 12zM12 12h-3.2L12 8.8z' fill='%23d6342a'/%3E%3Crect x='.4' y='.4' width='11.2' height='11.2' fill='none' stroke='%2324150c' stroke-width='.8'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23t'/%3E%3Cuse href='%23t' x='12'/%3E%3Cuse href='%23t' x='24'/%3E%3Cuse href='%23t' y='12'/%3E%3Cuse href='%23t' x='24' y='12'/%3E%3Cuse href='%23t' y='24'/%3E%3Cuse href='%23t' x='12' y='24'/%3E%3Cuse href='%23t' x='24' y='24'/%3E%3C/svg%3E");
  /* a sand dollar */
  --sand-dollar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='21.5' fill='%23f6e8c6' stroke='%2324150c' stroke-width='3'/%3E%3Ccircle cx='24' cy='24' r='17.5' fill='none' stroke='%23e2cf9e' stroke-width='2'/%3E%3Cg fill='%23d9bd82' stroke='%23a07c46' stroke-width='1.2' stroke-linejoin='round'%3E%3Cpath d='M24 22 Q20.5 14 24 6.5 Q27.5 14 24 22Z'/%3E%3Cpath d='M26 23.4 Q33.5 19 40.6 21 Q35 27 26 23.4Z'/%3E%3Cpath d='M25.2 26 Q32 31 32.4 39.4 Q25 35.6 25.2 26Z'/%3E%3Cpath d='M22.8 26 Q16 31 15.6 39.4 Q23 35.6 22.8 26Z'/%3E%3Cpath d='M22 23.4 Q14.5 19 7.4 21 Q13 27 22 23.4Z'/%3E%3C/g%3E%3Ccircle cx='24' cy='24' r='2.4' fill='%23a07c46'/%3E%3Cpath d='M9 16 Q14 8 22 5.6' fill='none' stroke='%23fffaf0' stroke-width='2' stroke-linecap='round' opacity='.8'/%3E%3C/svg%3E");
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

html, body {
  margin: 0;
  height: 100%;
  background: #120c08;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  font-family: var(--body);
  /* a phone must not enlarge long passages by itself (it did, on the flip phone's history, held sideways) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#view {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  touch-action: none;
  outline: none;
}
/* (a picture whose pixels are not a whole number of the screen's is stretched smoothly: core/quality.js) */
#view.smooth { image-rendering: auto; }

/* --- the display face (ui/sign.js): one svg a word, as tall as --sign says ------------------------------ */
.sign { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 0.3em; line-height: 0; }
.sign-svg { display: block; height: var(--sign, 1.4em); width: auto; flex: none; overflow: visible; }
/* the words themselves, for a screen reader and for the harness: in the page, not on the screen */
.sign-said { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- the pieces everything is made of ------------------------------------------------------------------ */
/* a painted button: thick, with a lip of darker paint under it that it is pushed down onto */
.btn, #hud .hud-times button, #hud .hud-tools button {
  -webkit-appearance: none; appearance: none;
  font: 900 13px/1 var(--body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brown-deep);
  text-shadow: none;
  background: var(--paper);
  background-image: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 42%), linear-gradient(rgba(36, 21, 12, 0) 62%, rgba(36, 21, 12, 0.14));
  border: 3px solid var(--brown-deep);
  border-radius: 7px;
  box-shadow: 0 4px 0 var(--brown-deep), 0 6px 0 rgba(36, 21, 12, 0.3);
  cursor: pointer;
  touch-action: manipulation;
}
.btn:active, .btn.down, #hud .hud-times button:active, #hud .hud-tools button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brown-deep), 0 2px 0 rgba(36, 21, 12, 0.3); }
.btn.go { background-color: var(--green); color: var(--white); text-shadow: 0 2px 0 var(--green-deep); }
.btn.stop { background-color: var(--red); color: var(--white); text-shadow: 0 2px 0 var(--red-deep); }
.btn.sure { background-color: var(--gold); }
.btn:disabled { filter: grayscale(0.7); opacity: 0.6; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* a key on a keyboard, for a prompt */
kbd, .key {
  display: inline-block; min-width: 1.5em; box-sizing: border-box; padding: 0.12em 0.4em 0.2em; margin-right: 0.5em;
  font: 900 0.92em/1.1 var(--body); text-align: center; text-shadow: none;
  color: var(--brown-deep); background: var(--white);
  border: 2px solid var(--brown-deep); border-radius: 5px; box-shadow: 0 3px 0 var(--brown-deep);
  position: relative; top: -2px;
}
/* a strip of masking tape with marker on it: torn at both ends, never quite level */
.tape {
  background: var(--tape);
  background-image: repeating-linear-gradient(90deg, rgba(120, 96, 52, 0) 0 5px, rgba(120, 96, 52, 0.07) 5px 6px);
  color: var(--brown-deep);
  text-shadow: none;
  font-weight: 700;
  clip-path: polygon(5px 0, calc(100% - 4px) 0, 100% 18%, calc(100% - 4px) 36%, 100% 55%, calc(100% - 5px) 76%, calc(100% - 1px) 100%, 4px 100%, 0 80%, 5px 62%, 1px 42%, 5px 22%);
  filter: drop-shadow(0 3px 0 rgba(36, 21, 12, 0.35));
}

/* --- the boot card: a postcard from Bear Island ---------------------------------------------------------- */
#boot {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f6f78;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 14px, rgba(0, 0, 0, 0.04) 14px 28px);
  z-index: 50;
  transition: opacity 0.7s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-card {
  width: min(640px, 90vw);
  box-sizing: border-box;
  padding: 12px 12px 10px;
  background: var(--white);
  border: 2px solid var(--brown-deep);
  box-shadow: 0 8px 0 rgba(36, 21, 12, 0.45), 0 0 0 6px rgba(255, 250, 240, 0.1);
  transform: rotate(-2.2deg);
  color: var(--brown-deep);
}
.boot-art {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(#3d6fb8 0%, #b88ab0 30%, #ff9a52 58%, #ffd27a 72%, #1f7f8e 72.4%, #17586a 100%);
  border: 2px solid var(--brown-deep);
}
.boot-scene { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.boot-greet { position: absolute; left: 5%; top: 7%; --sign: clamp(20px, 6.2vw, 40px); transform: rotate(-5deg); transform-origin: left center; }
.boot-title { position: absolute; left: 0; right: 0; top: 30%; --sign: clamp(40px, 15.5vw, 104px); display: flex; justify-content: center; gap: 0 0.14em; flex-wrap: wrap; line-height: 0; }
.boot-greet svg, .boot-title svg { display: block; height: var(--sign); width: auto; overflow: visible; }
.boot-foot { display: flex; align-items: center; gap: 10px; padding: 9px 2px 0; }
.boot-words { flex: 1; min-width: 0; }
.boot-sub { font: italic 700 13px/1.3 Georgia, "Times New Roman", serif; color: var(--red-deep); letter-spacing: 0.02em; }
.boot-msg { margin-top: 2px; font: 700 12px/1.3 var(--body); color: var(--brown); }
/* the stamp, and the wavy lines the post office cancels it with */
.boot-star {
  flex: none; width: 46px; height: 52px; box-sizing: border-box;
  display: grid; place-items: center;
  font-size: 28px; line-height: 1; color: var(--red);
  background: var(--paper);
  border: 2px dashed var(--brown);
  outline: 3px solid var(--white); outline-offset: -1px;
  box-shadow: 0 0 0 1px var(--brown);
}
.boot-mark { flex: none; width: 74px; height: 40px; opacity: 0.6; background: repeating-linear-gradient(176deg, rgba(36, 21, 12, 0) 0 5px, var(--brown-deep) 5px 6.5px); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); }
@media (max-height: 430px) {
  .boot-card { width: min(470px, 74vw); padding: 8px 8px 6px; }
  .boot-title { --sign: clamp(40px, 11vw, 78px); }
  .boot-greet { --sign: clamp(18px, 4.4vw, 30px); }
}

/* --- the CRT filter (the flip phone's Settings turns it on and off; on by default on every device) ------------ */
/* Since sprint 7C the whole filter is the game's own (src/core/crt.js): the color, the scan lines, the stripes, the
   dark corners and the tube's rounded corners and glare are worked out in the game's shaders. The page lays nothing
   over the picture: one full-screen sheet here cost a fifth of the frame rate on a laptop. */
#crt { display: none; }

/* --- the F3 overlay: what is being drawn, and how fast (src/ui/f3.js) ---------------------------------------- */
.f3 {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 60;
  margin: 0;
  padding: 8px 10px;
  font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace;
  color: #eaffea;
  background: rgba(8, 14, 10, 0.78);
  border: 1px solid rgba(160, 255, 170, 0.35);
  border-radius: 4px;
  pointer-events: none;
  white-space: pre;
}
.f3[hidden] { display: none; }

/* --- the HUD ---------------------------------------------------------------------------------------------- */
#hud {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
  color: var(--white);
  font-weight: 700;
  text-shadow: 0 2px 0 var(--ink), 0 0 6px rgba(0, 0, 0, 0.35);
}
#hud .panel { position: absolute; }
#hud button {
  pointer-events: auto;
  touch-action: none;
}

/* the build's name: a star to tap for the tools and the frame counter. Its words are for the tools. */
.hud-build {
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.06em;
  line-height: 1.15;
  pointer-events: auto;
}
.hud-build .star {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); color: var(--red);
  display: grid; place-items: center;
  font-size: 15px; text-shadow: none;
  box-shadow: 0 0 0 2px var(--brown-deep), 0 3px 0 2px var(--ink);
}
.hud-build .t1 { font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.hud-build .t2 { font-size: 8.5px; opacity: 0.92; text-transform: uppercase; letter-spacing: 0.1em; }
#hud:not(.dev) .hud-build .t1, #hud:not(.dev) .hud-build .t2 { display: none; }
#hud:not(.dev) .hud-build { opacity: 0.85; }
.hud-fps { font: 700 10.5px/1.2 var(--mono); color: #d6ffd0; }

/* top right: the hour, lettered; under it the phone, and the tools when they are out */
.hud-time {
  right: calc(12px + var(--safe-r));
  top: calc(8px + var(--safe-t));
  text-align: right;
}
.hud-clock { --sign: 30px; display: flex; justify-content: flex-end; gap: 0 7px; line-height: 0; text-shadow: none; }
.hud-label { font-size: 10.5px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: #ffe6b0; margin-top: 1px; }
.hud-times { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
/* M0's tools (the hour, the CRT filter, the postcard) stay out of the way until the star is tapped */
#hud:not(.dev) .hud-times, #hud:not(.dev) .hud-dev-only { display: none; }
#hud .hud-times button, #hud .hud-tools button { min-width: 36px; height: 30px; padding: 0 8px; font-size: 11px; border-width: 2px; box-shadow: 0 3px 0 var(--brown-deep); }
#hud .hud-times button.on { background-color: var(--gold); }
.hud-tools { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
#hud .hud-tools button.on { background-color: #a8dcb4; }
/* the phone in your pocket: a little clamshell, shut (the same phone ui/phone.js opens): its aerial, the
   strip of screen on its lid, the hinge. It is the one button a player needs. */
#hud .hud-tools .hud-phone {
  position: relative;
  width: 44px; min-width: 44px; height: 52px; padding: 0; margin-top: 8px;
  font-size: 0; color: transparent;
  border-radius: 6px 6px 13px 13px;
  background-color: #d5dbe5;
  background-image:
    linear-gradient(#12287a, #12287a),
    linear-gradient(#1d2030, #1d2030),
    linear-gradient(90deg, #17727d, #3fc0cc 30%, #1f9aa8 70%, #105961),
    linear-gradient(180deg, #f2f5f9, #d5dbe5 35%, #9aa3b4);
  background-size: 18px 8px, 24px 14px, 100% 6px, 100% 100%;
  background-position: 50% 19px, 50% 16px, 0 0, 0 0;
  background-repeat: no-repeat;
  border-width: 3px;
  box-shadow: 0 4px 0 var(--brown-deep), 0 6px 0 rgba(36, 21, 12, 0.3);
  transform-origin: 50% 80%;
}
/* its aerial */
#hud .hud-tools .hud-phone::before { content: ""; position: absolute; right: 3px; top: -12px; width: 6px; height: 10px; background: #4a5060; border: 2px solid var(--brown-deep); border-bottom: 0; border-radius: 4px 4px 0 0; }
#hud .hud-tools .hud-phone:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brown-deep); }
/* a text has come: it rings in the pocket */
#hud .hud-tools .hud-phone.ring { animation: phone-ring 1.5s ease-in-out; }
@keyframes phone-ring {
  0%, 100% { transform: rotate(0); }
  5%, 15%, 25%, 55%, 65%, 75% { transform: rotate(-11deg) translateY(-2px); }
  10%, 20%, 30%, 60%, 70%, 80% { transform: rotate(11deg) translateY(-2px); }
  35%, 50% { transform: rotate(0); }
}

/* bottom middle: the keys, on a strip of tape that comes off once you have walked about */
.hud-hint {
  left: 50%;
  bottom: calc(10px + var(--safe-b));
  transform: translateX(-50%) rotate(-0.4deg);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 7px 18px;
  transition: opacity 0.6s ease;
}
.hud-hint b { color: var(--red-deep); font-weight: 900; }
.hud-hint.fade { opacity: 0; }

/* what E does here: an order ticket, with the key on it */
.hud-prompt {
  left: 50%;
  bottom: calc(54px + var(--safe-b));
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 900;
  padding: 8px 16px 9px;
  color: var(--brown-deep);
  background: var(--white);
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 100% 5px; background-repeat: no-repeat;
  border: 3px solid var(--brown-deep);
  border-radius: 4px 4px 9px 9px;
  box-shadow: 0 4px 0 var(--brown-deep), 0 7px 0 rgba(36, 21, 12, 0.3);
  text-shadow: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  white-space: nowrap;
}
.hud-prompt.show { opacity: 1; }
.hud-prompt span { vertical-align: baseline; }

/* a line someone calls out, or a word from the game: tape */
.hud-say {
  overflow-wrap: anywhere;
  left: 50%;
  bottom: calc(108px + var(--safe-b));
  transform: translateX(-50%) rotate(-0.7deg);
  width: max-content;
  max-width: min(560px, 86vw);
  font-size: 14.5px;
  line-height: 1.3;
  padding: 9px 20px 10px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hud-say.show { opacity: 1; }
.hud-say b { color: var(--red-deep); font-weight: 900; }

/* --- touch controls ------------------------------------------------------------------------------------------ */
.touch { display: none; }
body.touch-ui .touch { display: block; }
body.touch-ui .hud-hint { display: none; }
/* on a phone the prompt is a button between the thumbs: the words, and one tap */
body.touch-ui .hud-prompt { bottom: calc(14px + var(--safe-b)); padding: 12px 16px; min-height: 44px; box-sizing: border-box; font-size: 14px; max-width: 46vw; white-space: normal; text-align: center; }
body.touch-ui .hud-prompt.show { pointer-events: auto; }
body.touch-ui .hud-prompt kbd { display: none; }
/* the stick: a ring of painted tile, and a sand dollar under the thumb */
.stick {
  position: absolute;
  left: calc(22px + var(--safe-l));
  bottom: calc(26px + var(--safe-b));
  width: 124px; height: 124px;
  box-sizing: border-box;
  border-radius: 50%;
  pointer-events: none;
}
/* (the ring is its own layer, so cutting its middle out does not cut the sand dollar out with it) */
.stick::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(214, 52, 42, 0.62) 0 15deg, rgba(255, 246, 220, 0.62) 15deg 30deg, rgba(31, 154, 168, 0.62) 30deg 45deg, rgba(255, 246, 220, 0.62) 45deg 60deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 0 76%, #000 78% 100%);
  mask-image: radial-gradient(circle closest-side, transparent 0 76%, #000 78% 100%);
}
.stick::after {
  content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(36, 21, 12, 0.75), inset 0 0 0 15px rgba(36, 21, 12, 0), inset 0 0 0 17px rgba(36, 21, 12, 0.6);
  background: radial-gradient(circle closest-side, rgba(36, 21, 12, 0.22) 0 74%, transparent 76%);
}
.stick .nub {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  background: var(--sand-dollar) center / contain no-repeat;
  filter: drop-shadow(0 4px 0 var(--ink));
}
.stick.run::before { filter: saturate(1.5) brightness(1.15); }
.pad {
  position: absolute;
  right: calc(20px + var(--safe-r));
  bottom: calc(24px + var(--safe-b));
  width: 178px; height: 156px;
  pointer-events: none;
}
/* the buttons: stickers. A round of color, a white die-cut edge, and the word lettered on it. */
#hud .pad button {
  position: absolute;
  -webkit-appearance: none; appearance: none;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--brown-deep);
  box-shadow: inset 0 0 0 3px var(--white), inset 0 -7px 0 3px rgba(36, 21, 12, 0.16), 0 5px 0 var(--brown-deep);
  background-image: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 46%);
  color: var(--white);
  font: 900 12px/1 var(--body);
  display: grid; place-items: center;
  --sign: 19px;
}
.pad button:active, .pad button.down { transform: translateY(3px); box-shadow: inset 0 0 0 3px var(--white), inset 0 -7px 0 3px rgba(36, 21, 12, 0.16), 0 2px 0 var(--brown-deep); filter: brightness(1.1); }
.pad .b-jump { right: 0; bottom: 0; width: 76px; height: 76px; background-color: var(--red); transform: rotate(4deg); }
.pad .b-run { right: 88px; bottom: 6px; width: 64px; height: 64px; background-color: var(--gold); transform: rotate(-5deg); }
.pad .b-board { right: 162px; bottom: 2px; width: 58px; height: 58px; background-color: var(--teal); transform: rotate(5deg); --sign: 13px; }
.pad .b-board:active, .pad .b-board.down { transform: rotate(5deg) translateY(3px); }
.pad .b-run.on { box-shadow: inset 0 0 0 3px var(--white), 0 5px 0 var(--brown-deep), 0 0 0 5px rgba(255, 250, 240, 0.9); }
.pad .b-act { right: 28px; bottom: 86px; width: 70px; height: 70px; background-color: var(--green); transform: rotate(-3deg); opacity: 0.5; --sign: 20px; }
.pad .b-act.ready { opacity: 1; box-shadow: inset 0 0 0 3px var(--white), 0 5px 0 var(--brown-deep), 0 0 0 5px rgba(255, 250, 240, 0.9); }
.pad .b-hand { right: 108px; bottom: 84px; width: 54px; height: 54px; background-color: var(--brown); transform: rotate(6deg); --sign: 15px; }
#hud .pad .b-hand[hidden] { display: none; }
.pad .b-jump:active, .pad .b-jump.down { transform: rotate(4deg) translateY(3px); }
.pad .b-run:active, .pad .b-run.down { transform: rotate(-5deg) translateY(3px); }
.pad .b-act:active, .pad .b-act.down { transform: rotate(-3deg) translateY(3px); }
.pad .b-hand:active, .pad .b-hand.down { transform: rotate(6deg) translateY(3px); }

@media (max-width: 520px) {
  /* upright, the thumbs take the whole bottom edge: the prompt goes above them */
  body.touch-ui .hud-prompt { bottom: calc(200px + var(--safe-b)); max-width: 84vw; }
  body.touch-ui .hud-say { bottom: calc(258px + var(--safe-b)); }
  .hud-clock { --sign: 25px; }
  #hud .hud-times button { min-width: 30px; padding: 0 6px; }
}
@media (max-height: 430px) {
  .stick { width: 108px; height: 108px; bottom: calc(16px + var(--safe-b)); }
  .stick .nub { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .pad { bottom: calc(14px + var(--safe-b)); transform: scale(0.9); transform-origin: bottom right; }
  .hud-clock { --sign: 24px; }
  #hud .hud-times button, #hud .hud-tools button { height: 28px; }
  #hud .hud-tools .hud-phone { width: 44px; min-width: 44px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-prompt, .hud-say, .hud-hint { transition: none; }
}
/* the game's own switch for the same thing (the phone's Settings): nothing flies, slams or spins */
body.calm *, body.calm *::before, body.calm *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
