SOURCE / PINNED RELEASE
Made of little things.
Drift City
- Release
- 098731aa0f0f…
- Author-recorded commit
- 2822ea0a4f5b…
- License
- LICENSE
- Author’s source reference
- nostr://npub12lm3rxsva8kfempyjkxupt09e02n3fezurkyadyqfejdc5e0r2kscqty6r/wss%3A%2F%2Fgit.napplet.soy%2F/n-a4c0039c855
Archive hash verified: b3323e408235502b…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
/*
Drift City: golden-hour postcard town, arcade HUD.
The scene is warm and sunlit (cream walls, coral and teal accents, long shadows);
the HUD is a set of slanted navy slabs with heavy italic numerals, like stickers on
a rally car, so it reads over both bright roads and green fields.
App-owned palette: the host theme never recolours the scene or the HUD.
*/
:root {
--ink: #1b2140;
--slab: rgb(27 33 64 / 0.84);
--slab-edge: rgb(255 255 255 / 0.12);
--paper: #fff7ea;
--muted: #b8bfd9;
--coral: #ff4f5e;
--sun: #ffc93c;
--mint: #2fc9a0;
--skew: -10deg;
--display: "Arial Black", "Segoe UI Black", "Helvetica Neue", Impact, system-ui, sans-serif;
--body: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
--pad: clamp(6px, 1.6vmin, 14px);
--napplet-text-selection: none;
color-scheme: dark;
font: 14px/1.35 var(--body);
}
* {
box-sizing: border-box;
}
html,
body,
#app {
height: 100%;
margin: 0;
}
body {
overflow: hidden;
background: #f2dcc0;
color: var(--paper);
user-select: var(--napplet-text-selection);
-webkit-user-select: var(--napplet-text-selection);
-webkit-tap-highlight-color: transparent;
}
.app {
position: relative;
overflow: hidden;
touch-action: none;
}
#view {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
}
[hidden] {
display: none !important;
}
button {
font: inherit;
color: inherit;
cursor: pointer;
}
button:focus-visible {
outline: 3px solid var(--sun);
outline-offset: 2px;
}
/* ---- Slanted slabs ---------------------------------------------------- */
.slab {
background: var(--slab);
border: 1px solid var(--slab-edge);
border-radius: 4px;
box-shadow: 0 6px 18px rgb(20 16 40 / 0.25);
backdrop-filter: blur(3px);
}
.hud {
position: absolute;
inset: 0;
pointer-events: none;
padding: max(var(--pad), env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
}
.hud button {
pointer-events: auto;
}
/* Drift score, top left. */
.drift {
position: absolute;
top: var(--pad);
left: var(--pad);
padding: 6px 14px 7px;
transform: skewX(var(--skew));
min-width: 150px;
font-family: var(--display);
font-style: italic;
transition: border-color 0.2s;
}
.drift > * {
transform: skewX(calc(-1 * var(--skew)));
}
.drift-row {
display: flex;
align-items: baseline;
gap: 8px;
}
.pts {
font-size: 30px;
line-height: 1;
color: var(--muted);
font-variant-numeric: tabular-nums;
transition: color 0.15s;
}
.drift.live .pts {
color: var(--paper);
}
.drift.sliding .pts {
color: var(--sun);
}
.mult {
font-size: 18px;
color: var(--coral);
opacity: 0.45;
}
.drift.live .mult {
opacity: 1;
}
.angle {
margin-left: auto;
font-size: 13px;
color: var(--mint);
}
.meter {
height: 5px;
margin: 5px 0 4px;
background: rgb(255 255 255 / 0.14);
border-radius: 2px;
overflow: hidden;
opacity: calc(0.35 + var(--grace, 1) * 0.65);
}
.meter i {
display: block;
height: 100%;
background: linear-gradient(90deg, var(--sun), var(--coral));
transform-origin: left;
transform: scaleX(0);
}
.totals {
display: flex;
gap: 14px;
font-family: var(--body);
font-style: normal;
font-size: 11px;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--muted);
}
.totals b {
color: var(--paper);
font-variant-numeric: tabular-nums;
}
/* Speedometer, bottom right. */
.speedo {
position: absolute;
right: var(--pad);
bottom: var(--pad);
padding: 4px 16px 8px;
transform: skewX(var(--skew));
text-align: right;
min-width: 120px;
font-family: var(--display);
font-style: italic;
}
.speedo > * {
transform: skewX(calc(-1 * var(--skew)));
display: inline-block;
}
.speedo b {
font-size: 40px;
line-height: 1;
font-variant-numeric: tabular-nums;
}
.speedo span {
margin-left: 6px;
font-size: 13px;
color: var(--muted);
}
.speed-bar {
display: block !important;
height: 4px;
margin-top: 4px;
background: rgb(255 255 255 / 0.14);
border-radius: 2px;
overflow: hidden;
}
.speed-bar i {
display: block;
height: 100%;
background: linear-gradient(90deg, var(--mint), var(--sun) 70%, var(--coral));
transform-origin: left;
}
/* Minimap, bottom left. */
.minimap {
position: absolute;
left: var(--pad);
bottom: var(--pad);
width: clamp(110px, 22vmin, 170px);
height: clamp(110px, 22vmin, 170px);
border-radius: 50%;
border: 3px solid var(--paper);
box-shadow: 0 6px 18px rgb(20 16 40 / 0.3);
background: #5d8a3c;
}
/* Small tool buttons, top right. */
.tools {
position: absolute;
top: var(--pad);
right: var(--pad);
display: flex;
gap: 6px;
}
.tools button {
width: 38px;
height: 38px;
display: grid;
place-items: center;
border: 1px solid var(--slab-edge);
border-radius: 4px;
background: var(--slab);
}
.tools button:hover {
background: var(--ink);
}
.tools svg {
width: 20px;
height: 20px;
fill: none;
stroke: var(--paper);
stroke-width: 2.4;
stroke-linecap: round;
stroke-linejoin: round;
}
/* Score pop-ups. */
.popups {
position: absolute;
top: 22%;
left: 0;
right: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.popup {
font-family: var(--display);
font-style: italic;
font-size: clamp(18px, 5vmin, 34px);
padding: 2px 16px;
transform: skewX(var(--skew));
color: var(--ink);
background: var(--sun);
border-radius: 3px;
box-shadow: 0 6px 16px rgb(20 16 40 / 0.3);
animation: pop 1.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}
.popup-best {
background: var(--mint);
}
.popup-lost {
background: var(--coral);
color: var(--paper);
}
.popup-smash {
background: #ff8a2a;
color: var(--ink);
font-size: clamp(14px, 3.6vmin, 24px);
}
@keyframes pop {
0% {
opacity: 0;
transform: skewX(var(--skew)) scale(0.6) translateY(10px);
}
12% {
opacity: 1;
transform: skewX(var(--skew)) scale(1.08);
}
20% {
transform: skewX(var(--skew)) scale(1);
}
80% {
opacity: 1;
}
100% {
opacity: 0;
transform: skewX(var(--skew)) translateY(-18px);
}
}
/* ---- Touch controls ---------------------------------------------------- */
.touch {
display: none;
position: absolute;
left: 0;
right: 0;
bottom: 0;
padding: 0 max(var(--pad), env(safe-area-inset-right)) max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
justify-content: space-between;
align-items: flex-end;
gap: 8px;
}
.app.touch-ui .touch {
display: flex;
}
.steer,
.pedals {
display: flex;
gap: clamp(6px, 2vmin, 12px);
align-items: flex-end;
}
.pedal {
--size: clamp(52px, 17vmin, 84px);
width: var(--size);
height: var(--size);
border: 2px solid rgb(255 255 255 / 0.35);
border-radius: 14px;
background: var(--slab);
font-family: var(--display);
font-style: italic;
font-size: clamp(12px, 3.6vmin, 16px);
text-transform: uppercase;
touch-action: none;
user-select: none;
-webkit-user-select: none;
}
.steer .pedal {
font-size: clamp(20px, 6vmin, 30px);
}
.pedal.gas {
height: calc(var(--size) * 1.35);
background: color-mix(in srgb, var(--mint) 55%, var(--ink));
}
.pedal.handbrake {
background: color-mix(in srgb, var(--coral) 60%, var(--ink));
}
.pedal.on {
transform: scale(0.94);
border-color: var(--sun);
filter: brightness(1.3);
}
/* With touch controls the speedometer moves under the score and the minimap shrinks. */
.app.touch-ui .speedo {
bottom: auto;
right: auto;
top: calc(var(--pad) + 86px);
left: var(--pad);
min-width: 0;
padding: 2px 12px 5px;
}
.app.touch-ui .speedo b {
font-size: 26px;
}
.app.touch-ui .minimap {
left: auto;
bottom: auto;
right: var(--pad);
top: calc(var(--pad) + 46px);
width: clamp(80px, 20vmin, 120px);
height: clamp(80px, 20vmin, 120px);
}
/* ---- Menus ------------------------------------------------------------- */
.overlay {
position: absolute;
inset: 0;
display: grid;
place-items: center;
padding: var(--pad);
background: linear-gradient(180deg, rgb(255 210 160 / 0) 30%, rgb(40 30 60 / 0.35));
overflow: auto;
}
.card {
width: min(400px, 100%);
padding: 18px 22px 20px;
display: grid;
gap: 12px;
transform: skewX(var(--skew));
}
.card > * {
transform: skewX(calc(-1 * var(--skew)));
}
.tagline {
margin: 0;
font-family: var(--display);
font-style: italic;
font-size: 22px;
line-height: 1.1;
}
.tagline em {
color: var(--sun);
font-style: italic;
}
.keys {
margin: 0;
color: var(--muted);
}
.keys div {
display: flex;
justify-content: space-between;
gap: 12px;
padding: 3px 0;
border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.keys dt {
color: var(--paper);
font-weight: 700;
}
.keys dd {
margin: 0;
}
.keys-touch {
display: none;
}
.app.touch-ui .keys-touch {
display: block;
}
.app.touch-ui .keys-desktop {
display: none;
}
.hint {
margin: 0;
font-size: 12px;
color: var(--muted);
}
.maps {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.maps button {
display: grid;
gap: 2px;
align-content: start;
min-height: 60px;
padding: 8px 10px;
text-align: left;
border: 2px solid rgb(255 255 255 / 0.18);
border-radius: 4px;
background: rgb(255 255 255 / 0.05);
}
.maps button[aria-checked="true"] {
border-color: var(--sun);
background: rgb(255 201 60 / 0.14);
}
.maps button:disabled {
cursor: progress;
opacity: 0.6;
}
.map-name {
font-family: var(--display);
font-style: italic;
font-size: 17px;
}
.maps button[aria-checked="true"] .map-name {
color: var(--sun);
}
.map-blurb {
font-size: 11px;
line-height: 1.25;
color: var(--muted);
}
.paints {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.paints button {
width: 34px;
height: 34px;
border-radius: 50%;
border: 3px solid transparent;
background: var(--c);
/* (A faint rim, so the darkest paint still shows against the panel.) */
box-shadow: inset 0 -5px 0 rgb(0 0 0 / 0.18), 0 0 0 1px rgb(255 255 255 / 0.28);
}
.paints button[aria-checked="true"] {
border-color: var(--paper);
outline: 2px solid var(--coral);
}
.row {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.go,
.ghost {
min-height: 46px;
padding: 0 24px;
border-radius: 4px;
font-family: var(--display);
font-style: italic;
font-size: 20px;
text-transform: uppercase;
}
.go {
border: 0;
background: var(--coral);
color: var(--paper);
box-shadow: 0 4px 0 #b8303d;
}
.go:hover {
filter: brightness(1.08);
}
.go:active {
transform: translateY(2px);
box-shadow: 0 2px 0 #b8303d;
}
.ghost {
border: 2px solid rgb(255 255 255 / 0.3);
background: transparent;
font-size: 14px;
}
/* ---- Modes ------------------------------------------------------------- */
.modes {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.modes button {
display: grid;
gap: 2px;
align-content: start;
min-height: 72px;
padding: 8px 10px;
text-align: left;
border: 2px solid rgb(255 255 255 / 0.18);
border-radius: 4px;
background: rgb(255 255 255 / 0.05);
}
.modes button[aria-checked="true"] {
border-color: var(--sun);
background: rgb(255 201 60 / 0.14);
}
.modes button[aria-checked="true"] .map-name {
color: var(--sun);
}
.volumes {
display: grid;
/* (The readouts as wide as the longest, the graphics setting's.) */
grid-template-columns: auto 1fr minmax(3.2em, max-content);
align-items: center;
gap: 2px 8px;
font-size: 13px;
font-weight: 700;
}
.volumes input[type="range"] {
width: 100%;
min-height: 24px;
accent-color: var(--sun);
}
.volumes output {
min-width: 2.6em;
white-space: nowrap;
text-align: right;
font-variant-numeric: tabular-nums;
opacity: 0.8;
}
@media (max-height: 420px) {
.volumes {
grid-template-columns: auto 1fr auto 1fr;
font-size: 12px;
}
.volumes output {
display: none;
}
}
.traffic-check {
justify-self: start;
min-height: 30px;
}
/* ---- Race planner ------------------------------------------------------ */
.planner {
position: absolute;
inset: 0;
background: #4f7a35;
}
.route-map {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
touch-action: none;
}
.planner-top {
position: absolute;
top: var(--pad);
left: var(--pad);
max-width: min(440px, calc(100% - 2 * var(--pad) - 56px));
padding: 10px 14px;
display: grid;
gap: 4px;
}
.planner-top .hint b {
color: var(--sun);
}
.planner-zoom {
position: absolute;
top: var(--pad);
right: var(--pad);
display: grid;
gap: 6px;
}
.planner-zoom button {
width: 42px;
height: 42px;
border: 1px solid var(--slab-edge);
border-radius: 4px;
background: var(--slab);
font-family: var(--display);
font-size: 22px;
line-height: 1;
}
.planner-bar {
position: absolute;
left: 50%;
bottom: var(--pad);
translate: -50% 0;
width: min(560px, calc(100% - 2 * var(--pad)));
padding: 10px 14px;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.planner-opts {
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
}
.check,
.laps {
display: flex;
align-items: center;
gap: 6px;
font-weight: 700;
cursor: pointer;
}
.check input {
width: 18px;
height: 18px;
accent-color: var(--sun);
}
.laps select {
min-height: 30px;
padding: 0 6px;
border: 1px solid rgb(255 255 255 / 0.3);
border-radius: 4px;
background: var(--ink);
color: var(--paper);
font: inherit;
}
.route-len {
font-family: var(--display);
font-style: italic;
font-size: 18px;
color: var(--sun);
}
.go:disabled {
opacity: 0.45;
cursor: not-allowed;
filter: none;
}
/* ---- Race HUD ---------------------------------------------------------- */
.race-hud {
position: absolute;
top: var(--pad);
left: 50%;
translate: -50% 0;
display: flex;
align-items: center;
gap: 12px;
padding: 4px 16px 6px;
}
.race-pos b {
font-family: var(--display);
font-style: italic;
font-size: 34px;
line-height: 1;
color: var(--sun);
}
.race-pos span {
font-family: var(--display);
font-style: italic;
font-size: 16px;
color: var(--muted);
}
.race-meta {
display: grid;
font-weight: 700;
line-height: 1.2;
}
.race-meta span:last-child {
font-family: var(--display);
font-style: italic;
font-variant-numeric: tabular-nums;
font-size: 16px;
}
.countdown {
position: absolute;
left: 0;
right: 0;
top: 30%;
text-align: center;
font-family: var(--display);
font-style: italic;
font-size: clamp(48px, 16vmin, 140px);
color: var(--sun);
text-shadow: 0 4px 0 #1b2140, 0 0 30px rgb(27 33 64 / 0.5);
pointer-events: none;
}
.countdown.pop {
animation: count-pop 0.9s ease-out;
}
@keyframes count-pop {
from {
transform: scale(1.6);
opacity: 0;
}
25% {
transform: scale(1);
opacity: 1;
}
}
.race-note {
position: absolute;
left: 50%;
top: calc(var(--pad) + 62px);
translate: -50% 0;
padding: 6px 14px;
border-radius: 4px;
background: var(--coral);
font-weight: 700;
white-space: nowrap;
pointer-events: none;
}
/* ---- Results ----------------------------------------------------------- */
.result-time {
margin: 0;
font-family: var(--display);
font-style: italic;
font-size: 30px;
color: var(--sun);
}
.standings {
margin: 0;
padding: 0;
list-style: none;
counter-reset: place;
}
.standings li {
counter-increment: place;
display: flex;
gap: 10px;
padding: 5px 2px;
border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.standings li::before {
content: counter(place);
width: 1.4em;
font-family: var(--display);
font-style: italic;
color: var(--muted);
}
.standings li span:first-child {
flex: 1;
font-weight: 700;
}
.standings li span:last-child {
font-variant-numeric: tabular-nums;
}
.standings li.me {
color: var(--sun);
}
@media (max-width: 520px), (max-height: 420px) {
.planner-top .hint {
display: none;
}
.race-pos b {
font-size: 24px;
}
.modes button {
min-height: 0;
padding: 6px 8px;
}
}
@media (max-width: 300px), (max-height: 220px) {
.race-meta span:first-child,
.planner-top {
display: none;
}
}
/* ---- Small frames ------------------------------------------------------ */
@media (max-width: 520px), (max-height: 420px) {
.drift {
min-width: 0;
padding: 4px 10px 5px;
}
.pts {
font-size: 22px;
}
.mult {
font-size: 14px;
}
.speedo b {
font-size: 28px;
}
.tools button {
width: 32px;
height: 32px;
}
.card {
padding: 12px 14px 14px;
gap: 8px;
}
.tagline {
font-size: 18px;
}
.app.touch-ui .speedo {
top: calc(var(--pad) + 66px);
}
.hint {
display: none;
}
.maps button {
min-height: 0;
padding: 6px 8px;
}
.map-blurb {
font-size: 10px;
}
}
@media (max-height: 420px) and (orientation: landscape) {
.app.touch-ui .speedo {
top: auto;
left: 50%;
bottom: var(--pad);
translate: -50% 0;
}
}
/* Tiny embeds: just the score, the speed and the road. */
@media (max-width: 300px), (max-height: 220px) {
:root {
--pad: 5px;
}
.minimap,
.totals,
.angle,
.hint,
.keys,
.map-blurb,
.paints {
display: none !important;
}
.map-name {
font-size: 12px;
}
/* The three maps in one row, names only, so the picker still fits. */
.maps {
grid-template-columns: repeat(3, 1fr);
gap: 4px;
}
.maps button {
padding: 5px 4px;
}
.pts {
font-size: 16px;
}
.mult {
font-size: 11px;
}
.meter {
margin: 3px 0 0;
height: 3px;
}
.speedo {
min-width: 0;
padding: 2px 8px 4px;
}
.speedo b {
font-size: 18px;
}
.speedo span {
font-size: 10px;
}
.tools {
gap: 3px;
}
.tools button {
width: 26px;
height: 26px;
}
.tools svg {
width: 15px;
height: 15px;
}
.pedal {
--size: 38px;
border-radius: 9px;
font-size: 9px;
}
.steer .pedal {
font-size: 15px;
}
.card {
padding: 8px 10px 10px;
gap: 6px;
}
.tagline {
font-size: 14px;
}
.go {
min-height: 34px;
font-size: 15px;
}
.ghost {
min-height: 34px;
font-size: 11px;
padding: 0 10px;
}
.app.touch-ui .speedo {
top: auto;
left: 50%;
bottom: var(--pad);
translate: -50% 0;
}
.popup {
font-size: 14px;
}
}
@media (max-width: 520px), (max-height: 420px) {
.planner-bar {
padding: 8px 10px;
gap: 8px;
}
.planner-bar .row {
flex-wrap: nowrap;
gap: 6px;
width: 100%;
}
.planner-bar .row button {
flex: 1;
min-height: 38px;
padding: 0 8px;
font-size: 13px;
}
.planner-bar .go {
font-size: 16px;
}
.planner-zoom button {
width: 36px;
height: 36px;
}
}
@media (max-width: 300px), (max-height: 220px) {
.planner-bar {
padding: 4px 6px;
gap: 4px;
}
.planner-opts .check,
.planner-opts .laps,
#plannerReset,
.planner-zoom #zoomFit {
display: none;
}
.route-len {
font-size: 13px;
}
.planner-bar .row button {
min-height: 28px;
font-size: 11px;
}
.planner-bar .go {
font-size: 13px;
}
.planner-zoom {
gap: 3px;
}
.planner-zoom button {
width: 26px;
height: 26px;
font-size: 15px;
}
}
.distance {
flex: 1 1 100%;
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--muted);
cursor: pointer;
}
.distance input {
flex: 1;
min-width: 80px;
height: 28px;
accent-color: var(--sun);
cursor: pointer;
}
.distance b {
min-width: 4.5em;
text-align: right;
font-family: var(--display);
font-style: italic;
font-size: 15px;
color: var(--paper);
}
@media (max-width: 300px), (max-height: 220px) {
.distance span,
.distance b {
display: none;
}
.distance input {
height: 20px;
}
}
@media (prefers-reduced-motion: reduce) {
.popup {
animation-duration: 2s;
animation-timing-function: linear;
}
}
/* ---- Account, leaderboards --------------------------------------------- */
.account {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.avatar {
flex: none;
display: grid;
place-items: center;
width: 34px;
height: 34px;
border-radius: 50%;
background: var(--coral);
font-family: var(--display);
font-style: italic;
font-size: 16px;
}
.avatar.signed {
background: #7a4cff;
}
.acc-text {
display: grid;
flex: 1;
min-width: 0;
line-height: 1.2;
}
.acc-text b {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.acc-text small {
color: var(--muted);
font-size: 11px;
}
.link {
flex: none;
padding: 4px 2px;
border: 0;
background: none;
color: var(--sun);
font-size: 12px;
text-decoration: underline;
}
.acc-form {
display: flex;
gap: 8px;
}
.acc-form input,
.shop-name {
flex: 1;
min-width: 0;
min-height: 36px;
padding: 0 10px;
border: 2px solid rgb(255 255 255 / 0.25);
border-radius: 4px;
background: rgb(0 0 0 / 0.25);
color: var(--paper);
font: inherit;
font-weight: 700;
user-select: text;
}
.acc-form .ghost {
min-height: 36px;
padding: 0 14px;
}
.menu-extras > button {
flex: 1;
min-height: 38px;
padding: 0 10px;
}
.livery-note {
margin: -4px 0 0;
font-size: 12px;
color: var(--sun);
}
.boards-card {
width: min(420px, 100%);
}
.board-tabs button {
min-height: 0;
padding: 8px 10px;
}
.board-rows {
max-height: min(46vh, 360px);
overflow: auto;
}
.board-mine {
margin: 0;
font-weight: 700;
}
/* ---- Paint shop -------------------------------------------------------- */
.shop {
position: absolute;
inset: 0;
display: grid;
grid-template-areas:
"top top top"
"tools . panel"
". status panel";
grid-template-columns: auto 1fr minmax(220px, 270px);
grid-template-rows: auto 1fr auto;
gap: var(--pad);
padding: var(--pad);
pointer-events: none;
}
.shop > * {
pointer-events: auto;
}
.shop button {
touch-action: manipulation;
}
.shop .ghost {
min-height: 36px;
padding: 0 12px;
font-size: 13px;
}
.shop .go.small {
min-height: 36px;
padding: 0 14px;
font-size: 15px;
}
.shop .icon {
display: grid;
place-items: center;
width: 36px;
height: 36px;
padding: 0;
border: 2px solid rgb(255 255 255 / 0.25);
border-radius: 4px;
background: transparent;
}
.shop .icon:disabled {
opacity: 0.35;
cursor: default;
}
.shop svg {
width: 20px;
height: 20px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.shop-top {
grid-area: top;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
padding: 6px;
}
.shop-name {
flex: 1 1 120px;
}
.shop-dirty {
color: var(--sun);
}
.shop-tools {
grid-area: tools;
align-self: center;
display: grid;
gap: 4px;
padding: 6px;
}
.shop-tools button {
display: grid;
justify-items: center;
gap: 2px;
min-width: 58px;
padding: 6px 4px;
border: 2px solid transparent;
border-radius: 4px;
background: rgb(255 255 255 / 0.05);
font-size: 11px;
font-weight: 700;
}
.shop-tools button[aria-pressed="true"] {
border-color: var(--sun);
background: rgb(255 201 60 / 0.16);
color: var(--sun);
}
.shop-tools svg {
width: 24px;
height: 24px;
}
.shop-panel {
grid-area: panel;
align-self: start;
max-height: 100%;
overflow: auto;
display: grid;
gap: 12px;
padding: 10px 12px;
}
.shop-colors {
display: flex;
align-items: center;
gap: 8px;
}
.shop-swatches {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 5px;
flex: 1;
}
.shop-swatches button {
aspect-ratio: 1;
min-width: 22px;
border-radius: 50%;
border: 2px solid transparent;
background: var(--c);
box-shadow: 0 0 0 1px rgb(255 255 255 / 0.3);
}
.shop-swatches button[aria-pressed="true"] {
border-color: var(--paper);
outline: 2px solid var(--coral);
}
.shop input[type="color"] {
width: 40px;
height: 36px;
padding: 0;
border: 2px solid rgb(255 255 255 / 0.3);
border-radius: 4px;
background: none;
cursor: pointer;
}
.shop-sliders {
display: grid;
grid-template-columns: auto 1fr 3.6em;
align-items: center;
gap: 4px 8px;
font-size: 12px;
font-weight: 700;
}
.shop-sliders input {
width: 100%;
min-height: 26px;
accent-color: var(--sun);
}
.shop-sliders output {
text-align: right;
font-variant-numeric: tabular-nums;
opacity: 0.85;
}
#shopShapeSet {
display: grid;
gap: 10px;
}
.shop-shapes {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 5px;
}
.shop-shapes button {
display: grid;
place-items: center;
min-height: 38px;
border: 2px solid rgb(255 255 255 / 0.18);
border-radius: 4px;
background: rgb(255 255 255 / 0.05);
}
.shop-shapes svg {
fill: currentColor;
stroke: none;
}
.shop-shapes button[aria-pressed="true"] {
border-color: var(--sun);
color: var(--sun);
}
.shop .hint {
font-size: 11px;
}
.shop-base {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: 12px;
font-weight: 700;
}
.shop-base label {
display: flex;
align-items: center;
gap: 8px;
}
.shop-views {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.shop-views button {
flex: 1;
min-height: 30px;
padding: 0 6px;
border: 1px solid rgb(255 255 255 / 0.2);
border-radius: 4px;
background: rgb(255 255 255 / 0.05);
font-size: 12px;
}
#shopDeleteShape:disabled {
opacity: 0.4;
cursor: default;
}
/* The panel's tabs: the paint tools, and the saved designs. */
.shop-tabs {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4px;
position: sticky;
top: -10px;
z-index: 1;
margin: -10px -12px 0;
padding: 8px 8px 0;
background: var(--slab);
border-bottom: 1px solid rgb(255 255 255 / 0.12);
}
.shop-tabs button {
min-height: 34px;
padding: 0 4px;
white-space: nowrap;
border: 0;
border-bottom: 3px solid transparent;
background: none;
font-family: var(--display);
font-style: italic;
font-size: 12px;
color: var(--muted);
}
.shop-tabs button[aria-selected="true"] {
border-bottom-color: var(--sun);
color: var(--sun);
}
.shop-count:not(:empty) {
display: inline-block;
min-width: 1.6em;
margin-left: 2px;
padding: 0 5px;
border-radius: 9px;
background: rgb(255 255 255 / 0.14);
font-family: var(--body);
font-style: normal;
font-size: 11px;
font-weight: 700;
color: var(--paper);
}
.shop-tab {
display: grid;
gap: 12px;
}
.shop-tab[hidden] {
display: none;
}
.shop-design-actions > button {
flex: 1;
}
/* A saved design: a picture of the car in it, its name, and what can be done with it. */
.shop-card {
display: grid;
grid-template-columns: 96px 1fr;
gap: 8px;
padding: 6px;
border-radius: 4px;
background: rgb(255 255 255 / 0.05);
}
.shop-card.current {
outline: 2px solid rgb(255 201 60 / 0.6);
}
.shop-card.on-car {
background: rgb(47 201 160 / 0.12);
}
.shop-thumb {
align-self: start;
aspect-ratio: 192 / 112;
width: 96px;
padding: 0;
overflow: hidden;
border: 0;
border-radius: 3px;
/* (Its base colour until the picture's made.) */
background: linear-gradient(160deg, var(--c), #1f2438 140%);
}
.shop-thumb img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.shop-card-info {
display: grid;
align-content: start;
gap: 3px;
min-width: 0;
}
.shop-card-buttons {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 2px;
}
.shop-card-buttons .go.small {
min-height: 30px;
padding: 0 8px;
font-size: 12px;
}
.shop-card-buttons .go:disabled {
background: var(--mint);
box-shadow: none;
opacity: 1;
cursor: default;
}
.shop-list {
display: grid;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.shop-item-name {
display: block;
min-width: 0;
overflow: hidden;
font-weight: 700;
white-space: nowrap;
text-overflow: ellipsis;
}
.shop-card-info small {
color: var(--muted);
font-size: 11px;
font-weight: 400;
}
.shop-list .ghost {
min-height: 30px;
padding: 0 8px;
font-size: 11px;
}
.shop-list .ghost:disabled {
opacity: 0.5;
cursor: default;
}
.shop .danger {
border-color: rgb(255 79 94 / 0.6);
color: #ff8c96;
}
.shop-meter {
height: 8px;
border-radius: 4px;
background: rgb(255 255 255 / 0.12);
overflow: hidden;
}
.shop-meter i {
display: block;
height: 100%;
width: calc(var(--used, 0) * 100%);
background: var(--mint);
}
.shop-meter.full i {
background: var(--coral);
}
.shop-status {
grid-area: status;
justify-self: center;
margin: 0;
padding: 8px 14px;
font-weight: 700;
}
.shop-ask {
position: absolute;
inset: 0;
z-index: 3;
display: grid;
place-items: center;
padding: var(--pad);
background: rgb(10 12 24 / 0.5);
}
.shop-ask p {
margin: 0;
font-weight: 700;
}
.shop-small {
display: none;
}
/* Narrow frames: the tools in a row and the settings in a sheet under the car. */
@media (max-width: 640px) {
.shop {
grid-template-areas: "top" "." "status" "tools" "panel";
grid-template-columns: 1fr;
grid-template-rows: auto 1fr auto auto auto;
}
.shop-panel {
max-height: 36vh;
}
.shop-tools {
grid-auto-flow: column;
justify-content: center;
padding: 4px;
}
.shop-tools button {
grid-auto-flow: column;
min-width: 0;
padding: 6px 10px;
}
.shop-tools svg {
width: 20px;
height: 20px;
}
}
@media (max-height: 420px) and (min-width: 641px) {
.shop-tools button span {
display: none;
}
.shop-tools button {
min-width: 0;
}
.shop-panel {
gap: 8px;
padding: 8px;
}
}
/* Too small to paint in: a notice, and the way out. */
@media (max-width: 300px), (max-height: 260px) {
.shop {
grid-template-areas: "top" "small";
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
}
.shop > :not(.shop-top, .shop-small, .shop-ask),
.shop-top > :not(#shopDone) {
display: none !important;
}
.shop-small {
grid-area: small;
display: block;
align-self: start;
margin: 0;
padding: 10px;
font-weight: 700;
}
}
/* Narrow frames: the menu cards upright (slanted, a tall card's corners run off the sides), the shop's top bar tighter. */
@media (max-width: 520px) {
.card {
--skew: 0deg;
}
}
@media (max-width: 640px) {
.shop .ghost {
padding: 0 9px;
font-size: 12px;
}
.shop .go.small {
padding: 0 10px;
font-size: 13px;
}
.shop-name {
flex-basis: 80px;
}
}
/* (The shop's notes stay: they say what can't be done, like saving without storage.) */
@media (max-width: 520px), (max-height: 420px) {
.shop .hint {
display: block;
}
}
@media (max-width: 300px), (max-height: 220px) {
.account,
.acc-form,
.livery-note,
.menu-extras {
display: none !important;
}
}
/* (Six tools: icons only, in a narrow frame.) */
@media (max-width: 440px) {
.shop-tools button span {
display: none;
}
}
