Back to Safe Sand · Material studies
SOURCE / PINNED RELEASE

Made of little things.

Safe Sand · Material studies

Release
9101a9cd9fb4…
Author-recorded commit
75d98e1b8edb…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-7682e55a791

Archive hash verified: 6c8ddabeb31100e1…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/styles.css
:root { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #292b2b; background: #e8e6df; font-synthesis: none; --ink: #292b2b; --muted: #62635d; --accent: #e7d5ae; --panel: #25272a; color-scheme: light; }
* { box-sizing: border-box; }
html, body, #app { margin: 0; width: 100%; height: 100%; }
body { overflow: hidden; }
#app { position: relative; isolation: isolate; container: tray / size; }
button, select, input { font: inherit; }
button { border: 0; cursor: pointer; touch-action: manipulation; color: inherit; }
button, select { min-height: 44px; min-width: 44px; }
button:disabled { cursor: default; opacity: .42; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid #c39852; outline-offset: 4px; }
button:active:not(:disabled) { transform: translateY(1px); }
[hidden] { display: none !important; }
.scene { position: absolute; inset: 0; content-visibility: auto; contain-intrinsic-size: auto 900px auto 600px; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
canvas:focus-visible { outline-offset: -5px; }
.specimen { position: absolute; left: max(17px, env(safe-area-inset-left)); top: max(17px, env(safe-area-inset-top)); pointer-events: none; max-width: 45%; padding: 12px 15px; border-radius: 18px; background: rgb(238 236 229 / .83); backdrop-filter: blur(12px); }
.overline { font-size: 9px; font-weight: 650; letter-spacing: .17em; line-height: 1.5; }
.specimen h1 { font-size: clamp(23px, 3.4vw, 38px); font-weight: 380; margin: 6px 0; letter-spacing: -.04em; }
.specimen p { font-size: 12px; color: var(--muted); max-width: 210px; line-height: 1.5; margin: 0; }
#app[data-surface='dark'], #app[data-surface='slate'] { --ink: #f3f0e8; --muted: #c9cdd0; color: var(--ink); }
#app[data-surface='dark'] .specimen, #app[data-surface='slate'] .specimen { background: rgb(26 31 38 / .84); }
.glass { background: rgb(30 32 34 / .91); color: #f0eee8; box-shadow: 0 5px 24px rgb(0 0 0 / .14), inset 0 0 0 1px rgb(255 255 255 / .08); backdrop-filter: blur(18px); }
.materials-toggle { position: absolute; right: max(24px, env(safe-area-inset-right)); top: max(24px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; border-radius: 30px; padding: 0 17px 0 11px; font-size: 12px; min-height: 46px; }
.mini-swatch { width: 25px; height: 25px; border-radius: 50%; background: #d8bf8f; box-shadow: inset 0 -4px 6px #0003, inset 1px 2px 5px #fff4; }
.count { opacity: .48; font-size: 10px; border-left: 1px solid #ffffff24; padding-left: 10px; }
.dock-wrap { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); text-align: center; }
.dock { border-radius: 21px; display: flex; align-items: center; padding: 6px; gap: 2px; }
.dock button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; font-size: 12px; border-radius: 15px; background: transparent; white-space: nowrap; }
.dock button:hover { background: #ffffff13; }
.dock button.primary { background: #e8d6b1; color: #3e372b; font-weight: 600; padding: 0 19px; }
.dock button[aria-pressed='true'] { background: #ffffff24; }
.dock button span[aria-hidden] { font-size: 19px; line-height: 1; }
.dock button span.chevron { font-size: 12px; margin-left: -4px; opacity: .6; }
.divider { height: 21px; width: 1px; background: #ffffff24; margin: 0 5px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0 !important; background: transparent; border-radius: 50%; font-size: 25px; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.keyboard-hint { margin: 12px 0 0; color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.keyboard-hint span { margin: 0 10px; opacity: .5; }
#status { display: block; width: fit-content; max-width: 100%; font-size: 12px; background: #25272a; color: #fff; padding: 9px 14px; border-radius: 12px; margin: 0 auto 10px; }
#status:empty { display: none; }
.state-badge { position: absolute; top: 90px; right: 25px; font-size: 10px; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.tilt-panel { position: absolute; bottom: 110px; right: 24px; width: 250px; border-radius: 22px; padding: 6px 15px 15px; }
.floating-panel { position: absolute; right: 24px; bottom: 110px; width: 320px; max-width: calc(100% - 24px); max-height: calc(100% - 125px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 16px; border-radius: 22px; color-scheme: dark; scrollbar-width: thin; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tool-grid button { background: #ffffff06; border: 1px solid transparent; border-radius: 12px; padding: 9px 3px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; min-height: 78px; }
.tool-grid button[aria-pressed='true'] { border-color: #e4d4afaa; background: #e8d6b11b; }
.tool-grid b { font-size: 21px; font-weight: 400; }
.tool-grid small { font-size: 8px; color: #aeb0ae; }
.tool-help { color: #b8bcb9; font-size: 11px; line-height: 1.6; margin: 12px 0; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.panel-actions button { font-size: 11px; background: #ffffff10; border-radius: 10px; padding: 0 12px; flex: 1; }
.floating-panel output { font-size: 10px; color: #b8bcb9; min-width: 32px; text-align: right; }
.floating-panel input[type='range'] { width: 130px; }
#app[data-tool='camera'] canvas { cursor: grab; }
#app[data-tool='camera'] canvas:active { cursor: grabbing; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.tilt-body { display: flex; align-items: center; gap: 18px; }
.tilt-body p { font-size: 12px; line-height: 1.6; color: #ddd; }
.tilt-body small { font-size: 10px; color: #aaa; }
#tiltPad { position: relative; width: 104px; height: 104px; border: 1px solid #ffffff24; border-radius: 50%; background: radial-gradient(circle, #ffffff0e 0 32%, transparent 33% 65%, #ffffff07 66%); touch-action: none; flex-shrink: 0; }
#tiltDot { position: absolute; left: calc(50% - 8px); top: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: #e8d6b1; pointer-events: none; z-index: 1; }
.pad-lines::before, .pad-lines::after { content: ''; position: absolute; background: #ffffff14; }
.pad-lines::before { top: 50%; left: 7%; width: 86%; height: 1px; }
.pad-lines::after { left: 50%; top: 7%; height: 86%; width: 1px; }
dialog { color-scheme: dark; color: #eeece6; background: #25272a; border: 1px solid #ffffff18; border-radius: 26px; padding: 0; width: 394px; max-width: calc(100% - 24px); max-height: calc(100% - 32px); margin: auto 18px auto auto; box-shadow: 0 20px 80px #0005; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #10131733; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 21px 19px 15px 23px; flex-shrink: 0; }
.dialog-heading .overline { color: #c4bca9; font-size: 8px; }
h2 { text-wrap: balance; }
.dialog-heading h2 { font-size: 20px; font-weight: 450; letter-spacing: -.035em; margin: 6px 0 0; }
.dialog-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 23px 18px; scrollbar-width: thin; }
.section-label { color: #a5a7a7; font-size: 9px; letter-spacing: .12em; margin: 14px 0 12px; }
.material-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.material { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border-radius: 13px; background: #ffffff05; border: 1px solid transparent; min-height: 85px; padding: 10px 2px; }
.material:hover { background: #ffffff0c; }
.material[aria-pressed='true'] { border-color: #e4d4afaa; background: #e8d6b10e; }
.material .sample { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffffff44, transparent 55%), var(--swatch); box-shadow: inset 0 -6px 8px #0004; position: relative; }
.material .sample::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: radial-gradient(#fff7 .65px, transparent .7px), radial-gradient(#0005 .55px, transparent .6px); background-size: 4px 5px, 3px 4px; background-position: 0 0, 2px 3px; }
.material span:last-child { font-size: 10px; line-height: 1.3; }
.description { font-size: 12px; line-height: 1.7; color: #c8c9c5; min-height: 42px; margin: 17px 0; }
.setting-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; min-height: 53px; font-size: 11px; border-top: 1px solid #ffffff12; }
.segmented { display: flex; gap: 2px; }
.segmented button { border-radius: 9px; font-size: 10px; padding: 0 9px; background: #ffffff06; }
.segmented button[aria-pressed='true'] { background: #e8d6b1; color: #302b23; }
input[type='range'] { width: 135px; height: 44px; accent-color: #e8d6b1; }
#brushValue { width: 23px; color: #a9aaa6; }
select { background: #ffffff0b; color: #eee; border: 1px solid #ffffff1a; padding: 0 10px; border-radius: 9px; }
.save-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.save-row button { font-size: 10px; padding: 0 10px; background: #ffffff0b; border-radius: 10px; }
.footnote { color: #a5a7a4; font-size: 10px; line-height: 1.6; }
details { font-size: 11px; line-height: 1.7; color: #bfc1bd; }
summary { cursor: pointer; padding: 10px 0; }
.return-button { background: #e8d6b1; color: #353027; margin: 0 15px 15px; border-radius: 13px; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.return-button span { margin-left: 9px; }
.error-panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 30px; text-align: center; background: #e8e6df; color: #292b2b; z-index: 9; }
.error-panel p { max-width: 360px; line-height: 1.5; }
.error-panel button { background: #292b2b; color: #fff; border-radius: 15px; padding: 0 24px; }
.small-notice { display: none; }
@container tray (width < 640px) {
  .specimen { top: 15px; left: 14px; padding: 10px 12px; max-width: calc(100% - 155px); }
  .specimen h1 { font-size: 25px; }
  .specimen p { display: none; }
  .materials-toggle { right: 16px; top: 19px; padding-right: 12px; gap: 7px; }
  .materials-toggle .count { display: none; }
  .dock { flex-wrap: wrap; justify-content: center; max-width: 365px; padding: 5px; gap: 0; }
  .dock button { flex: 1 0 23%; padding: 0 6px; }
  .dock .icon-button { flex-basis: 23%; }
  .divider { display: none; }
  .dock-wrap { bottom: max(14px, env(safe-area-inset-bottom)); }
  .keyboard-hint { display: none; }
  .tilt-panel { right: 16px; bottom: 119px; }
  .floating-panel { right: 12px; bottom: 119px; max-height: calc(100% - 135px); }
  .state-badge { top: 80px; right: 20px; }
  dialog { margin: auto; }
}
@container tray (height < 420px) and (width >= 640px) {
  .specimen { top: 16px; left: 20px; }
  .specimen h1 { font-size: 24px; }
  .specimen p { display: none; }
  .materials-toggle { top: 14px; }
  .keyboard-hint { display: none; }
  .dock-wrap { bottom: 12px; }
  .tilt-panel { bottom: 80px; }
  .floating-panel { bottom: 80px; max-height: calc(100% - 94px); }
}
@container tray (width < 280px) or (height < 240px) {
  .small-notice { position: absolute; inset: 0; background: #e8e6df; color: #32332f; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 12px; z-index: 20; }
  .small-notice > span { font-size: 23px; }
  .small-notice strong { font-size: 13px; margin-top: 5px; }
  .small-notice p { font-size: 11px; line-height: 1.45; margin-bottom: 0; max-width: 230px; }
  .specimen, .dock-wrap, .materials-toggle, .tilt-panel, .floating-panel, .state-badge { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }