SOURCE / PINNED RELEASE
Made of little things.
Big Rig Rush
- Release
- ec9b6549f752…
- Author-recorded commit
- 74b729258b1a…
- License
- LICENSE
- Author’s source reference
- nostr://npub1sj2vketepqw9v6fmge5fdzuj7atj9sv6qv2jss05n2z6rl64lcfqumdsnt/wss%3A%2F%2Fgit.napplet.soy%2F/n-0a99f0cae40
Archive hash verified: 900e22810340ccb1…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
/*
Big Rig Rush: app-owned "road furniture" look (see docs/brief.md).
Menus are green highway signs, buttons are yellow plates, the HUD is a row of
asphalt dashboard chips with hard offset shadows over a smooth vector city.
*/
:root {
--ink: #15141b;
--asphalt: #2b2c35;
--paper: #f4ecd8;
--sign-green: #1f6a46;
--sign-yellow: #ffcc33;
--pickup: #4ade80;
--drop: #ff8a3d;
--danger: #ff4d5e;
--font: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
--pad: 52px;
--gap: 6px;
color-scheme: dark;
font: 700 12px/1.25 var(--font);
}
* {
box-sizing: border-box;
}
html,
body,
#app {
height: 100%;
margin: 0;
}
body {
overflow: hidden;
background: var(--ink);
color: var(--paper);
-webkit-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.app {
position: relative;
width: 100%;
overflow: hidden;
outline: none;
}
.view {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
touch-action: none;
}
button {
font: inherit;
color: inherit;
cursor: pointer;
}
button:focus-visible {
outline: 3px solid var(--sign-yellow);
outline-offset: 2px;
}
/* --- HUD: asphalt dashboard chips. */
.hud {
position: absolute;
top: max(var(--gap), env(safe-area-inset-top));
left: max(var(--gap), env(safe-area-inset-left));
right: max(var(--gap), env(safe-area-inset-right));
display: flex;
flex-wrap: wrap;
align-items: stretch;
gap: var(--gap);
pointer-events: none;
}
.gauge {
display: flex;
align-items: center;
gap: 6px;
min-height: 26px;
padding: 3px 8px;
background: var(--asphalt);
border: 2px solid var(--ink);
box-shadow: 2px 2px 0 var(--ink);
letter-spacing: 0.04em;
white-space: nowrap;
}
.gauge-key {
color: color-mix(in srgb, var(--paper) 70%, transparent);
}
.gauge-value {
font-variant-numeric: tabular-nums;
}
.gauge-score .gauge-value {
color: var(--sign-yellow);
}
.gauge-job[data-kind="pickup"] .gauge-key {
color: var(--pickup);
}
.gauge-job[data-kind="deliver"] .gauge-key {
color: var(--drop);
}
.gauge-damage {
flex: 1 1 70px;
max-width: 180px;
}
.bar {
position: relative;
flex: 1;
height: 8px;
min-width: 30px;
background: var(--ink);
}
.bar i {
position: absolute;
inset: 0 auto 0 0;
width: 0;
background: var(--pickup);
}
.bar[data-level="mid"] i {
background: var(--sign-yellow);
}
.bar[data-level="high"] i {
background: var(--danger);
}
.pause {
pointer-events: auto;
margin-left: auto;
min-width: 32px;
min-height: 26px;
padding: 0 8px;
background: var(--asphalt);
border: 2px solid var(--ink);
box-shadow: 2px 2px 0 var(--ink);
letter-spacing: -0.1em;
}
.app:not([data-phase="playing"]):not([data-phase="paused"]) .pause {
visibility: hidden;
}
@media (max-width: 459px) {
.job-district {
display: none;
}
.gauge-damage {
max-width: 120px;
}
}
/* --- Choice dialog (tow service). */
.choice {
background: rgba(21, 20, 27, 0.35);
}
.choice-buttons {
display: grid;
gap: 8px;
margin-top: 12px;
}
.choice-buttons .plate {
margin-top: 0;
width: 100%;
text-align: left;
}
.choice-buttons .plate span {
float: right;
opacity: 0.7;
}
/* The A-10's gun heat while it cools down after overheating. */
.bar[data-level="locked"] i {
background: #ff4d5e;
animation: cooling 0.5s steps(2) infinite;
}
@keyframes cooling {
50% {
opacity: 0.4;
}
}
@media (prefers-reduced-motion: reduce) {
.bar[data-level="locked"] i {
animation: none;
}
}
/* --- The family's favors: tap to call a hit. */
.gauge-favor {
pointer-events: auto;
cursor: pointer;
font: inherit;
color: inherit;
border: 0;
}
.gauge-favor .gauge-key,
.gauge-favor .gauge-value {
color: #b06cff;
}
.gauge-favor:focus-visible {
outline: 2px solid #b06cff;
outline-offset: 1px;
}
/* --- Clock. */
.gauge-clock .gauge-value {
color: var(--paper);
}
.gauge-clock[data-night="true"] {
background: #1b2340;
}
@media (max-width: 300px) {
.gauge-clock {
display: none;
}
}
/* --- Gear, tachometer and speed. */
.gear {
display: inline-grid;
place-items: center;
min-width: 20px;
height: 20px;
padding: 0 3px;
background: var(--sign-yellow);
color: var(--ink);
font-size: 13px;
}
.gauge-drive[data-gear="R"] .gear {
background: var(--danger);
}
.gauge-drive[data-gear="N"] .gear {
background: var(--paper);
}
.tach {
position: relative;
width: 54px;
height: 8px;
background: linear-gradient(90deg, var(--ink) 0 80%, #3a1418 80% 100%);
}
.tach i {
position: absolute;
inset: 0 auto 0 0;
width: 0;
background: var(--pickup);
}
.tach[data-zone="high"] i {
background: var(--sign-yellow);
}
.tach[data-zone="red"] i {
background: var(--danger);
}
.speed {
min-width: 3ch;
text-align: right;
}
.unit {
font-size: 9px;
}
/* --- Minimap: shown when there is room for it. */
.minimap {
position: absolute;
right: max(var(--gap), env(safe-area-inset-right));
top: calc(max(var(--gap), env(safe-area-inset-top)) + 38px);
width: 128px;
height: 137px;
border: 2px solid var(--ink);
box-shadow: 3px 3px 0 var(--ink);
pointer-events: none;
}
@media (max-width: 479px), (max-height: 399px) {
.minimap {
display: none;
}
}
/* --- Toast. */
.toast {
position: absolute;
left: 50%;
top: 25%;
transform: translate(-50%, -6px);
padding: 5px 10px;
background: var(--ink);
border: 2px solid var(--paper);
box-shadow: 3px 3px 0 #000;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.15s, transform 0.15s;
}
.toast.show {
opacity: 1;
transform: translate(-50%, 0);
}
.toast[data-tone="good"] {
color: var(--drop);
}
.toast[data-tone="info"] {
color: var(--pickup);
}
/* --- Touch controls: hidden until a touch screen is detected or enabled in settings. */
.touch-pad {
position: absolute;
left: max(var(--gap), env(safe-area-inset-left));
right: max(var(--gap), env(safe-area-inset-right));
bottom: max(var(--gap), env(safe-area-inset-bottom));
display: none;
justify-content: space-between;
pointer-events: none;
}
.show-touch .touch-pad {
display: flex;
}
.app:not([data-phase="playing"]) .touch-pad {
opacity: 0.35;
}
.pad-side {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-end;
gap: 8px;
}
.pad-right {
align-items: flex-end;
}
.pad-group {
display: flex;
gap: 8px;
pointer-events: auto;
}
.pad-small {
width: auto;
min-width: 44px;
height: 36px;
padding: 0 8px;
font-size: 11px;
pointer-events: auto;
}
.pad {
width: var(--pad);
height: var(--pad);
padding: 0;
background: color-mix(in srgb, var(--asphalt) 82%, transparent);
border: 2px solid var(--paper);
box-shadow: 3px 3px 0 var(--ink);
font-size: 14px;
touch-action: none;
}
.pad.held {
transform: translate(2px, 2px);
box-shadow: 1px 1px 0 var(--ink);
background: var(--paper);
color: var(--ink);
}
.pad-gas {
background: color-mix(in srgb, var(--sign-green) 85%, transparent);
}
.pad-brake {
background: color-mix(in srgb, #8a1c2a 85%, transparent);
}
/* --- Overlay: an interstate sign. */
.overlay {
position: absolute;
inset: 0;
display: grid;
place-items: center;
padding: 10px;
overflow: auto;
background: rgba(21, 20, 27, 0.45);
}
.overlay[hidden] {
display: none;
}
.sign {
position: relative;
width: min(100%, 380px);
margin: auto;
padding: 18px 16px 14px;
text-align: center;
background: var(--sign-green);
border: 3px solid var(--paper);
border-radius: 8px;
outline: 3px solid var(--sign-green);
box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
}
.sign p {
margin: 0;
}
.sign-tab {
position: absolute;
top: -14px;
right: 14px;
padding: 2px 8px;
background: var(--sign-green);
border: 3px solid var(--paper);
border-radius: 5px;
font-size: 11px;
letter-spacing: 0.08em;
}
.sign-title {
font-size: clamp(18px, 7vmin, 32px);
line-height: 1.05;
letter-spacing: 0.04em;
color: #ffffff;
text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.sign-body {
margin-top: 8px !important;
font-weight: 500;
line-height: 1.35;
}
.plate {
margin-top: 12px;
min-height: 44px;
padding: 8px 18px;
background: var(--sign-yellow);
color: var(--ink);
border: 3px solid var(--ink);
box-shadow: 4px 4px 0 var(--ink);
letter-spacing: 0.06em;
}
.plate:active {
transform: translate(2px, 2px);
box-shadow: 2px 2px 0 var(--ink);
}
/* The sports car and the dozer shift themselves: no shift buttons. */
#app[data-vehicle="dozer"] .pad[data-action="shiftUp"],
#app[data-vehicle="dozer"] .pad[data-action="shiftDown"] {
visibility: hidden;
}
/* The sports car swaps its shift buttons for a missile launcher; the A-10 adds bombs and the gun. */
.pad-fire,
.pad-air,
#app[data-vehicle="sports"] .pad[data-action="shiftUp"],
#app[data-vehicle="sports"] .pad[data-action="shiftDown"],
#app[data-vehicle="a10"] .pad[data-action="shiftUp"],
#app[data-vehicle="a10"] .pad[data-action="shiftDown"] {
display: none;
}
#app[data-vehicle="a10"] .pad-air,
#app[data-vehicle="a10"] .pad-fire,
#app[data-vehicle="sports"] .pad-fire {
display: inline-block;
background: #c0182b;
color: #ffffff;
}
/* The A-10 swaps the horn for a weapon selector; its pedals are the throttle (THR+ / THR−). */
#app[data-vehicle="a10"] .pad-ground {
display: none;
}
#app[data-vehicle="a10"] .pad[data-action="weapon"] {
background: #2f3b2a;
}
/* The air-raid switch: an A-10 flown by the computer attacks the city while you drive. */
.raid-toggle {
display: block;
margin: 10px auto 0;
padding: 6px 12px;
border: 2px solid var(--paper);
background: color-mix(in srgb, var(--asphalt) 70%, transparent);
color: var(--paper);
font: inherit;
font-size: 12px;
letter-spacing: 0.06em;
cursor: pointer;
}
.raid-toggle[aria-pressed="true"] {
background: #c0182b;
}
.raid-toggle span {
opacity: 0.7;
margin-left: 6px;
font-size: 10px;
}
.raid-toggle[hidden] {
display: none;
}
/* --- Ride picker on the title and end-of-shift signs. */
.vehicle-pick {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 6px;
margin-top: 12px;
}
.vehicle-pick[hidden] {
display: none;
}
.pick {
display: grid;
gap: 2px;
min-height: 44px;
padding: 6px 8px;
font: inherit;
letter-spacing: 0.05em;
color: var(--paper);
background: transparent;
border: 3px solid var(--paper);
border-radius: 5px;
cursor: pointer;
}
.pick b {
font-size: 10px;
opacity: 0.7;
}
.pick span {
font-size: 10px;
font-weight: 500;
opacity: 0.8;
}
.pick[aria-checked="true"] {
color: var(--ink);
background: var(--sign-yellow);
border-color: var(--ink);
box-shadow: 3px 3px 0 var(--ink);
}
.pick:focus-visible {
outline: 3px solid var(--sign-yellow);
outline-offset: 2px;
}
.sign-hint {
margin-top: 12px !important;
font-size: 11px;
color: color-mix(in srgb, var(--paper) 80%, transparent);
}
/* --- Tiny frames. */
.too-small {
display: none;
}
@media (max-width: 159px), (max-height: 119px) {
.too-small {
position: absolute;
inset: 0;
display: grid;
place-items: center;
padding: 8px;
text-align: center;
background: var(--sign-green);
z-index: 2;
}
}
@media (max-width: 300px), (max-height: 260px) {
:root {
--pad: 44px;
--gap: 4px;
font-size: 10px;
}
.gauge {
min-height: 20px;
padding: 1px 5px;
gap: 4px;
}
.gauge-damage .gauge-key,
.gauge-favor .gauge-key,
.tach,
.unit {
display: none;
}
.pause {
min-height: 20px;
min-width: 26px;
}
.sign {
padding: 12px 10px 10px;
}
.sign-body {
display: none;
}
.vehicle-pick {
margin-top: 6px;
gap: 4px;
}
.pick {
min-height: 32px;
padding: 2px 4px;
}
.pick span,
.pick b {
display: none;
}
.vehicle-pick {
grid-template-columns: repeat(2, 1fr);
}
.plate {
margin-top: 8px;
min-height: 34px;
padding: 4px 12px;
}
.sign-hint {
margin-top: 6px !important;
font-size: 9px;
}
}
@media (pointer: coarse) {
.pause {
min-width: 44px;
min-height: 36px;
}
}
@media (prefers-reduced-motion: reduce) {
.toast {
transition: none;
}
}
