SOURCE / PINNED RELEASE
Made of little things.
Powder Tool V600Billion
- Release
- 142767edcab8…
- Author-recorded commit
- 6d92971effd0…
- License
- LICENSE
- Author’s source reference
- nostr://npub1fllw8kw0thjj55wds0uugcnp5kej2nfxd36eruq39d56wwz8r44q5q78wj/wss%3A%2F%2Fgit.napplet.soy%2F/powder-toy
Archive hash verified: ed7d6a8ea7083197…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
:root {
--sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
--mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
--bg: #0b0d10;
--surface: #121519;
--surface-2: #181c21;
--surface-3: #21262d;
--line: #262b33;
--line-strong: #3a414c;
--text: #e8ebef;
--muted: #8d95a3;
--faint: #5f6775;
--accent: #ffb13b;
--accent-ink: #1d1304;
--right: #6aa9ff;
--focus: #8cc8ff;
--shadow: 0 18px 48px rgb(0 0 0 / 0.5);
--radius: 10px;
color-scheme: dark;
}
@media (prefers-color-scheme: light) {
:root {
--bg: #ece8e1;
--surface: #f9f7f3;
--surface-2: #f1eee8;
--surface-3: #e6e1d8;
--line: #dcd5c9;
--line-strong: #c4bba9;
--text: #1d2024;
--muted: #686d75;
--faint: #979ba2;
--accent: #d8830c;
--accent-ink: #fff;
--right: #2f76d8;
--focus: #2f76d8;
--shadow: 0 18px 48px rgb(40 30 10 / 0.18);
color-scheme: light;
}
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
height: 100vh;
height: 100dvh;
overflow: hidden;
display: grid;
grid-template-columns: 252px minmax(0, 1fr);
grid-template-rows: auto minmax(0, 1fr) auto;
grid-template-areas: 'top top' 'side stage' 'side bottom';
background: var(--bg);
color: var(--text);
font: 13px/1.4 var(--sans);
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, .tool:focus-visible {
outline: 2px solid var(--focus);
outline-offset: 1px;
}
.icon { display: block; flex: none; }
[hidden] { display: none !important; }
/* Controls */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
height: 32px;
padding: 0 12px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--surface-2);
font-weight: 550;
white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.accent:hover { filter: brightness(1.08); }
.icon-btn {
display: inline-grid;
place-items: center;
width: 32px;
height: 32px;
padding: 0;
border-radius: 8px;
border: 1px solid transparent;
background: transparent;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn[aria-pressed='true'] { background: var(--surface-3); color: var(--accent); }
select {
height: 30px;
padding: 0 26px 0 10px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238d95a3' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center;
appearance: none;
}
.chip {
height: 28px;
padding: 0 10px;
border-radius: 999px;
border: 1px solid var(--line);
background: transparent;
color: var(--muted);
white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip[aria-pressed='true'] { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
.label { color: var(--muted); font-size: 12px; }
.group { display: flex; align-items: center; gap: 8px; }
/* Top bar */
#topbar {
grid-area: top;
display: flex;
align-items: center;
gap: 8px 14px;
flex-wrap: wrap;
padding: 8px 12px;
background: var(--surface);
border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; margin-right: 4px; }
.brand-mark { color: var(--accent); }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; }
.brand-edition {
font: 600 10px/1 var(--mono);
padding: 4px 6px;
border-radius: 6px;
color: var(--accent);
background: color-mix(in srgb, var(--accent) 14%, transparent);
letter-spacing: 0.04em;
}
.scene-group { min-width: 0; }
.scene-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.transport { padding: 0 6px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.online { margin-left: auto; }
.menu-wrap { position: relative; }
.menu {
position: absolute;
right: 0;
top: calc(100% + 6px);
z-index: 30;
min-width: 220px;
padding: 6px;
display: flex;
flex-direction: column;
border-radius: var(--radius);
border: 1px solid var(--line);
background: var(--surface);
box-shadow: var(--shadow);
}
.menu button {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 10px;
border: 0;
border-radius: 6px;
background: transparent;
text-align: left;
}
.menu button:hover { background: var(--surface-3); }
.menu button .icon { color: var(--muted); }
/* Palette */
#palette {
grid-area: side;
display: flex;
flex-direction: column;
min-height: 0;
background: var(--surface);
border-right: 1px solid var(--line);
}
.picked { display: flex; align-items: center; gap: 4px; padding: 10px 10px 8px; }
.slot {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--surface-2);
text-align: left;
}
.slot:hover { border-color: var(--line-strong); }
#slot-0 { box-shadow: inset 3px 0 0 var(--accent); }
#slot-1 { box-shadow: inset 3px 0 0 var(--right); }
.slot .swatch { flex: none; width: 18px; height: 18px; border-radius: 5px; background: var(--c, #333); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
.slot-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.slot-text small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.slot-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search {
display: flex;
align-items: center;
gap: 8px;
margin: 0 10px 8px;
padding: 0 10px;
height: 32px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--surface-2);
color: var(--muted);
}
.search:focus-within { border-color: var(--focus); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); }
#sections { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 8px; }
#sections button {
height: 24px;
padding: 0 8px;
border-radius: 999px;
border: 1px solid var(--line);
background: transparent;
color: var(--muted);
font-size: 12px;
}
#sections button:hover { color: var(--text); border-color: var(--line-strong); }
#sections button[aria-pressed='true'] { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.tools {
flex: 1;
min-height: 0;
overflow-y: auto;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
align-content: start;
gap: 6px;
padding: 4px 10px 10px;
border-top: 1px solid var(--line);
padding-top: 10px;
}
.tool {
position: relative;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
min-width: 0;
padding: 6px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--surface-2);
text-align: left;
}
.tool:hover { background: var(--surface-3); border-color: var(--line-strong); }
.tool .code {
max-width: 100%;
padding: 3px 5px;
border-radius: 4px;
background: var(--c);
color: var(--ink);
font: 700 11px/1 var(--mono);
letter-spacing: 0.02em;
overflow: hidden;
white-space: nowrap;
}
.tool .name { max-width: 100%; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool.left { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tool.right { border-color: var(--right); box-shadow: 0 0 0 1px var(--right); }
.tool.left.right { box-shadow: 0 0 0 1px var(--accent), 0 0 0 3px var(--right); }
.tool .badges { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.tool .badges i { font: 700 9px/1 var(--sans); font-style: normal; padding: 2px 3px; border-radius: 4px; color: #0b0d10; }
.tool .badges .l { background: var(--accent); }
.tool .badges .r { background: var(--right); }
.tools .empty { grid-column: 1 / -1; color: var(--muted); padding: 12px 2px; }
.paint { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); color: var(--muted); }
.paint label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paint input[type='color'] { width: 44px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.palette-hint { margin: 0; padding: 8px 10px 10px; color: var(--faint); font-size: 11px; border-top: 1px solid var(--line); }
/* Stage */
#stage {
grid-area: stage;
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
padding: 12px 14px;
gap: 8px;
}
.caption { display: flex; align-items: baseline; gap: 10px; min-width: 0; color: var(--muted); }
.caption b { color: var(--text); font-weight: 600; white-space: nowrap; }
.caption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#room { flex: 1; min-height: 0; min-width: 0; display: grid; place-items: center; }
#viewport {
position: relative;
overflow: hidden;
background: #000;
border-radius: 6px;
box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
#canvas {
position: absolute;
left: 0;
top: 0;
display: block;
image-rendering: pixelated;
outline: none;
touch-action: none;
visibility: hidden;
}
#canvas.ready { visibility: visible; }
#status {
position: absolute;
inset: 0;
margin: 0;
display: grid;
place-items: center;
padding: 24px;
text-align: center;
white-space: pre-wrap;
color: var(--muted);
}
/* Bottom bar */
#bottombar {
grid-area: bottom;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 18px;
padding: 8px 14px;
background: var(--surface);
border-top: 1px solid var(--line);
}
.seg { display: inline-flex; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.seg button { width: 28px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.seg button .icon { width: 14px; height: 14px; }
.seg button[aria-pressed='true'] { background: var(--surface-3); color: var(--accent); }
#brush-size { width: 110px; accent-color: var(--accent); }
#brush-size-value { min-width: 2ch; font: 600 12px/1 var(--mono); color: var(--muted); }
.toggles { flex-wrap: wrap; }
.stats { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
/* While the game is starting or one of its dialogs is open, the page's controls wait. */
body.starting [data-game], body.game-dialog [data-game],
body.starting .tools, body.game-dialog .tools,
body.starting #sections, body.game-dialog #sections,
body.game-dialog .search, body.game-dialog .paint {
pointer-events: none;
opacity: 0.45;
}
/* Dialogs */
dialog {
width: min(940px, calc(100vw - 32px));
max-height: calc(100vh - 32px);
padding: 0;
border-radius: 14px;
border: 1px solid var(--line);
background: var(--surface);
color: var(--text);
box-shadow: var(--shadow);
}
dialog::backdrop { background: rgb(4 5 7 / 0.62); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 8px; }
.dialog-head h2 { margin: 0 0 4px; font-size: 18px; }
.dialog-head p { margin: 0; color: var(--muted); }
.scene-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
gap: 14px;
padding: 12px 20px 20px;
overflow-y: auto;
max-height: calc(100vh - 150px);
}
.scene-card {
display: flex;
flex-direction: column;
padding: 0;
overflow: hidden;
text-align: left;
border-radius: 12px;
border: 1px solid var(--line);
background: var(--surface-2);
transition: transform 120ms ease, border-color 120ms ease;
}
.scene-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.scene-card img, .scene-card .no-thumb { display: block; width: 100%; aspect-ratio: 612 / 384; object-fit: cover; background: #000; }
.scene-card .scene-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.scene-card h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.scene-card p { margin: 0; color: var(--muted); font-size: 12px; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; padding: 12px 20px 22px; }
.keys dt { font: 600 12px/1.6 var(--mono); color: var(--accent); }
.keys dd { margin: 0; }
#keys, #about { width: min(560px, calc(100vw - 32px)); }
.about { padding: 8px 20px 22px; }
.about p { margin: 0 0 12px; color: var(--muted); }
.about-links { display: flex; flex-wrap: wrap; gap: 8px; }
.about code { font: 12px/1.5 var(--mono); color: var(--text); }
.about-source code { display: block; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); word-break: break-all; user-select: all; }
/* Notices */
#toasts {
position: fixed;
left: 50%;
bottom: 64px;
transform: translateX(-50%);
z-index: 40;
display: flex;
flex-direction: column;
gap: 6px;
max-width: min(92vw, 560px);
pointer-events: none;
}
.toast {
pointer-events: auto;
padding: 10px 14px;
border-radius: var(--radius);
border: 1px solid var(--line-strong);
border-left: 3px solid var(--accent);
background: var(--surface);
color: var(--text);
box-shadow: var(--shadow);
}
.toast button {
margin-left: 10px;
padding: 3px 10px;
border: 0;
border-radius: 6px;
background: var(--accent);
color: var(--accent-ink);
font-weight: 600;
}
/* Medium frames: the bars get denser. */
@media (max-width: 1040px) {
.brand-edition { display: none; }
#bottombar { gap: 6px 12px; }
#brush-size { width: 84px; }
}
@media (max-width: 860px) {
#bottombar .label {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.brand-name, .scene-name, .btn .label-text { display: none; }
.btn { padding: 0 9px; }
.stats { margin-left: 0; }
.caption span { display: none; }
}
/* Narrow frames: the palette moves under the game. */
@media (max-width: 640px) {
body {
grid-template-columns: minmax(0, 1fr);
grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 36vh);
grid-template-areas: 'top' 'stage' 'bottom' 'side';
}
#palette { border-right: 0; border-top: 1px solid var(--line); }
.palette-hint { display: none; }
#sections { flex-wrap: nowrap; overflow-x: auto; }
#stage { padding: 8px; }
#topbar { gap: 6px; }
.transport { border: 0; padding: 0; }
}
