SOURCE / PINNED RELEASE
Made of little things.
Truffle Rush
- Release
- bf9d57a12f82…
- Author-recorded commit
- bf11c370d93c…
- License
- LICENSE
- Author’s source reference
- nostr://npub1dmmh0futyszl4445mv4xrygkgsgj8vpu79yx3qyy9qxmz4pemtzqlqmc87/wss%3A%2F%2Fgit.napplet.soy%2F/n-dad0644224b
Archive hash verified: 261cbd0dce1d32f5…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
/*
Truffle Rush — moonlit truffle orchard.
App-owned palette: the host theme never repaints the orchard or the pig.
Deep plum night, warm cream, pig pink, truffle gold; chunky rounded forms.
The canvas draws the world; these tokens style the HUD and overlays.
*/
:root {
--night-0: #0d0620;
--night-1: #1a0c2e;
--plum: #2c1546;
--cream: #ffe9cf;
--cream-soft: rgba(255, 233, 207, 0.78);
--cream-faint: rgba(255, 233, 207, 0.5);
--pink: #ffb0c4;
--pink-deep: #e8698c;
--gold: #ffcf6b;
--gold-deep: #f0a93c;
--danger: #ff7d86;
--panel: rgba(26, 12, 46, 0.74);
--line: rgba(255, 225, 196, 0.18);
--radius: 12px;
--hud-pad: 10px;
color-scheme: dark;
font: 13px/1.4 "Trebuchet MS", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* {
box-sizing: border-box;
}
html,
body,
#app {
height: 100%;
margin: 0;
}
body {
background: var(--night-0);
color: var(--cream);
overflow: hidden;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
}
button {
font: inherit;
color: inherit;
}
[hidden] {
display: none !important;
}
/* Frame ─────────────────────────────────────────────────────────────── */
.app {
position: relative;
container-type: inline-size;
width: 100%;
height: 100%;
overflow: hidden;
background: var(--night-0);
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
touch-action: manipulation;
}
#game {
position: absolute;
inset: 0;
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: crosshair;
}
.app.is-frenzy::after {
content: "";
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
box-shadow: inset 0 0 70px rgba(255, 193, 82, 0.22);
}
/* HUD ───────────────────────────────────────────────────────────────── */
.hud {
position: absolute;
z-index: 3;
top: max(var(--hud-pad), env(safe-area-inset-top));
left: max(var(--hud-pad), env(safe-area-inset-left));
right: max(var(--hud-pad), env(safe-area-inset-right));
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 6px;
pointer-events: none;
}
.hud-left,
.hud-right {
display: flex;
align-items: flex-start;
gap: 6px;
min-width: 0;
}
.hud-right {
justify-content: flex-end;
}
.stat,
.hearts {
display: flex;
align-items: center;
gap: 6px;
min-height: 32px;
padding: 3px 10px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--panel);
box-shadow: 0 2px 10px rgba(5, 2, 12, 0.35);
white-space: nowrap;
}
.stat {
display: grid;
grid-template-columns: auto auto;
grid-auto-flow: column;
align-items: baseline;
gap: 6px;
}
.stat-label {
font-size: 9px;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--cream-faint);
}
.stat-value {
font-size: 17px;
font-weight: 900;
font-variant-numeric: tabular-nums;
letter-spacing: 0.01em;
color: var(--cream);
line-height: 1;
}
.stat-value.bump {
animation: bump 0.18s ease-out;
}
.hearts {
padding: 3px 8px;
font-size: 15px;
line-height: 1;
letter-spacing: 1px;
color: var(--pink);
}
.life {
display: inline-block;
transition: transform 0.15s ease, opacity 0.15s ease;
}
.life.off {
color: rgba(255, 176, 196, 0.22);
transform: scale(0.86);
}
.icon-button {
position: relative;
display: grid;
place-items: center;
width: 34px;
height: 34px;
padding: 0;
border: 1px solid var(--line);
border-radius: 999px;
background: var(--panel);
color: var(--cream-soft);
font-size: 13px;
cursor: pointer;
pointer-events: auto;
box-shadow: 0 2px 10px rgba(5, 2, 12, 0.35);
transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.icon-button::after {
content: "";
position: absolute;
inset: -5px;
border-radius: 999px;
}
.icon-button:hover:not(:disabled) {
color: var(--gold);
border-color: rgba(255, 207, 107, 0.55);
}
.icon-button:active:not(:disabled) {
transform: scale(0.94);
}
.icon-button:disabled {
opacity: 0.38;
cursor: default;
}
.icon-button.muted {
color: var(--cream-faint);
}
.icon-button.muted::before {
content: "";
position: absolute;
width: 17px;
height: 2px;
border-radius: 2px;
background: var(--danger);
transform: rotate(-45deg);
}
.icon-button:focus-visible,
.play-button:focus-visible {
outline: 2px solid var(--gold);
outline-offset: 2px;
}
/* Combo + toast ─────────────────────────────────────────────────────── */
.combo {
position: absolute;
z-index: 3;
top: calc(max(var(--hud-pad), env(safe-area-inset-top)) + 40px);
left: 50%;
transform: translateX(-50%) rotate(-3deg);
padding: 3px 11px;
border-radius: 999px;
background: linear-gradient(180deg, #ffd97f, #f2b243);
color: #35162c;
font-size: 12px;
font-weight: 900;
letter-spacing: 0.06em;
box-shadow: 0 3px 0 rgba(122, 65, 26, 0.9), 0 0 18px rgba(255, 193, 82, 0.45);
animation: comboIn 0.18s ease-out;
pointer-events: none;
}
.combo[data-hot="true"] {
background: linear-gradient(180deg, #fff3c8, #ffbe55);
animation: comboPulse 0.9s ease-in-out infinite;
}
.toast {
position: absolute;
z-index: 4;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
padding: 0 10px;
font-size: clamp(16px, 7cqi, 34px);
font-weight: 900;
letter-spacing: 0.08em;
text-transform: uppercase;
text-align: center;
color: var(--gold);
text-shadow: 0 0 18px rgba(255, 190, 80, 0.65), 0 3px 0 rgba(70, 30, 20, 0.7);
opacity: 0;
pointer-events: none;
white-space: nowrap;
}
.toast.show {
animation: toastPop 1.35s ease-out forwards;
}
/* Belly meter ───────────────────────────────────────────────────────── */
.belly {
position: absolute;
z-index: 3;
left: max(12px, env(safe-area-inset-left));
right: max(12px, env(safe-area-inset-right));
bottom: max(6px, env(safe-area-inset-bottom));
display: flex;
align-items: center;
gap: 8px;
pointer-events: none;
}
.belly-label {
font-size: 8px;
font-weight: 800;
letter-spacing: 0.18em;
text-transform: uppercase;
color: rgba(255, 233, 207, 0.6);
text-shadow: 0 1px 2px rgba(5, 2, 12, 0.8);
}
.belly-track {
position: relative;
flex: 1;
height: 7px;
overflow: hidden;
border: 1px solid rgba(255, 225, 196, 0.22);
border-radius: 999px;
background: rgba(10, 4, 22, 0.68);
box-shadow: 0 2px 8px rgba(5, 2, 12, 0.5);
}
.belly-fill {
height: 100%;
width: 0%;
border-radius: inherit;
background: linear-gradient(90deg, var(--pink-deep), var(--pink) 45%, var(--gold));
transition: width 0.14s ease-out;
}
.app.is-frenzy .belly-fill {
background: linear-gradient(90deg, #ffe9a8, #fff6d8, #ffc24f);
box-shadow: 0 0 14px rgba(255, 214, 120, 0.9);
transition: width 0.08s linear;
}
/* Overlay ───────────────────────────────────────────────────────────── */
.overlay {
position: absolute;
inset: 0;
z-index: 5;
display: grid;
place-items: center;
padding: 12px;
background: radial-gradient(circle at 50% 38%, rgba(60, 24, 84, 0.4), rgba(8, 4, 18, 0.8) 75%);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
}
.card {
width: min(336px, 100%);
padding: 18px 18px 16px;
border: 1px solid rgba(255, 214, 160, 0.26);
border-radius: 20px;
background: linear-gradient(180deg, rgba(58, 28, 84, 0.97), rgba(30, 13, 49, 0.98));
box-shadow: 0 18px 44px rgba(4, 2, 10, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.08);
text-align: center;
container-type: inline-size;
}
.kicker {
margin: 0 0 5px;
font-size: 9px;
font-weight: 800;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--pink);
}
.title {
margin: 0 0 8px;
font-size: clamp(23px, 10cqi, 34px);
font-weight: 900;
line-height: 0.95;
letter-spacing: 0.01em;
color: var(--gold);
text-shadow: 0 0 22px rgba(255, 190, 80, 0.35), 0 3px 0 rgba(80, 34, 22, 0.75);
}
.blurb {
max-width: 32ch;
margin: 0 auto 13px;
font-size: 12px;
line-height: 1.45;
color: var(--cream-soft);
}
.overlay-stats {
display: flex;
justify-content: center;
gap: 7px;
width: 100%;
margin: 0 0 12px;
}
.mini-stat {
display: grid;
flex: 1;
gap: 1px;
min-width: 0;
max-width: 100px;
padding: 5px 8px;
border: 1px solid var(--line);
border-radius: 10px;
background: rgba(12, 5, 24, 0.5);
}
.mini-label {
font-size: 7.5px;
font-weight: 800;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--cream-faint);
}
.mini-value {
font-size: 14px;
font-weight: 900;
font-variant-numeric: tabular-nums;
color: var(--gold);
}
.play-button {
width: min(220px, 100%);
min-height: 44px;
padding: 0 22px;
border: 0;
border-radius: 999px;
background: linear-gradient(180deg, #ffdd8b, #f2b23f);
color: #35162c;
font-size: 15px;
font-weight: 900;
letter-spacing: 0.05em;
text-transform: uppercase;
cursor: pointer;
box-shadow: 0 5px 0 #a4662a, 0 10px 20px rgba(4, 2, 10, 0.45);
transition: transform 0.08s ease, box-shadow 0.08s ease;
touch-action: manipulation;
}
.play-button:hover {
background: linear-gradient(180deg, #ffe6a6, #f7bc4c);
}
.play-button:active {
transform: translateY(3px);
box-shadow: 0 2px 0 #a4662a, 0 5px 12px rgba(4, 2, 10, 0.45);
}
.hint {
margin: 10px 0 0;
font-size: 10px;
letter-spacing: 0.03em;
color: rgba(255, 233, 207, 0.48);
}
/* Small frames ──────────────────────────────────────────────────────── */
@container (max-width: 360px) {
.hud {
--hud-pad: 7px;
gap: 4px;
}
.hud-left,
.hud-right {
gap: 4px;
}
.stat,
.hearts {
min-height: 28px;
padding: 2px 7px;
border-radius: 10px;
}
.stat-label {
display: none;
}
.stat-value {
font-size: 15px;
}
.stat-best {
display: none;
}
.hearts {
font-size: 13px;
letter-spacing: 0;
}
.icon-button {
width: 30px;
height: 30px;
font-size: 12px;
}
.combo {
top: calc(max(7px, env(safe-area-inset-top)) + 35px);
font-size: 11px;
padding: 2px 9px;
}
.card {
padding: 14px 12px 12px;
border-radius: 16px;
}
.blurb {
font-size: 11px;
margin-bottom: 10px;
}
.play-button {
min-height: 40px;
font-size: 13.5px;
}
.hint {
font-size: 9px;
}
}
@container (max-width: 300px) {
.kicker {
display: none;
}
.title {
font-size: 21px;
margin-bottom: 5px;
}
.blurb {
font-size: 10.5px;
line-height: 1.35;
}
.belly-label {
display: none;
}
.card {
width: min(250px, 100%);
}
.overlay-stats {
gap: 4px;
}
.mini-stat {
min-width: 56px;
padding: 4px 6px;
}
}
@container (max-width: 250px) {
.stat-value {
font-size: 14px;
}
.hearts {
gap: 2px;
padding: 2px 6px;
font-size: 12px;
}
.icon-button {
width: 28px;
height: 28px;
font-size: 11px;
}
}
@media (max-height: 230px) {
.hud {
--hud-pad: 6px;
}
.kicker,
.hint {
display: none;
}
.title {
font-size: 22px;
margin-bottom: 5px;
}
.blurb {
margin-bottom: 9px;
font-size: 10.5px;
}
.card {
padding: 12px 12px 10px;
}
.play-button {
min-height: 38px;
font-size: 13px;
}
.mini-stat {
padding: 3px 7px;
}
.overlay-stats {
margin-bottom: 9px;
}
}
@media (max-height: 175px) {
.blurb {
display: none;
}
.card {
padding: 10px 12px;
}
.title {
margin-bottom: 7px;
}
.overlay-stats {
margin-bottom: 8px;
}
}
/* Motion ────────────────────────────────────────────────────────────── */
@keyframes bump {
0% { transform: scale(1); }
40% { transform: scale(1.22); color: var(--gold); }
100% { transform: scale(1); }
}
@keyframes comboIn {
from { transform: translateX(-50%) rotate(-3deg) scale(0.6); opacity: 0; }
to { transform: translateX(-50%) rotate(-3deg) scale(1); opacity: 1; }
}
@keyframes comboPulse {
0%, 100% { transform: translateX(-50%) rotate(-3deg) scale(1); }
50% { transform: translateX(-50%) rotate(-2deg) scale(1.06); }
}
@keyframes toastPop {
0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
14% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
24% { transform: translate(-50%, -50%) scale(1); }
72% { opacity: 1; }
100% { opacity: 0; transform: translate(-50%, -62%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.combo[data-hot="true"] {
animation: none;
}
.stat-value.bump {
animation: none;
}
.toast.show {
animation: toastFade 1.2s ease-out forwards;
}
@keyframes toastFade {
0%, 75% { opacity: 1; }
100% { opacity: 0; }
}
}
