toastsim/src/style.css
monster b07d57e9e9 M3: judging — the scorecard, the judge, and a colour-space bug
The loop closes: ticket -> toast -> spread -> ENTER -> verdict -> next day.

- judging.ts: 9 weighted criteria, each reading the same fields the knife was
  pushing around, so every line of the scorecard points at something real
  ("0.78 against 0.68 asked", "thick — thin asked", "28% burnt").
- lines.ts: ~45 lines keyed to whichever criterion actually decided the score,
  so the verdict and the scorecard always agree — the verdict just has feelings
  about it. MITEY has its own vocabulary.
- judge.ts: the toast turns on a pedestal under a spotlight, grade stamps in,
  heatmap toggle for browning/spread. The generated inspector reacts by grade.
- orders.ts: seven handwritten days, then procedural. Day 1 is soft butter on
  white; day 7 is a translucent film of MITEY on wet sourdough with fridge-hard
  butter and a steak knife.

The find: every art colour was authored as sRGB and fed straight into a linear
lighting pipeline. Linear 0.14 encodes back out to sRGB ~0.4, so "near-black"
MITEY rendered as TAN and saturated butter washed to pale cream. This was the
root cause of the legibility fights in M0 and M2 — I'd been treating the symptom
by pushing the specular around. One line (albedo = pow(albedo, 2.2), mixing
stays in sRGB because that's the space the palette was picked in) and the whole
art direction landed: MITEY is genuinely black, butter is butter, the crust went
from cream to a rich golden brown.

Also: the specular lobe was far too broad. The slice is flat with the light and
camera both above it, so dot(N,H) ~0.98 everywhere and a wide lobe blankets the
whole slice in white. Tightened, so only ridges tilted into the light catch —
which is what a spread actually looks like.

The slice rolls its own lighting and ignores scene lights, so the judge's
spotlight did nothing to it; it now swaps its own rig for presentation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 22:04:22 +10:00

438 lines
7.1 KiB
CSS

:root {
--ink: #f3e9dc;
--ink-dim: #a9998a;
--paper: #efe4cf;
--char: #16110e;
--gold: #e8a53a;
--red: #c0392b;
--font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
--mono: ui-monospace, 'SF Mono', Menlo, monospace;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
height: 100%;
overflow: hidden;
background: var(--char);
color: var(--ink);
font-family: var(--font);
-webkit-font-smoothing: antialiased;
}
#app {
position: fixed;
inset: 0;
}
canvas#c {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
touch-action: none;
}
#ui {
position: absolute;
inset: 0;
pointer-events: none;
user-select: none;
}
#ui > * {
pointer-events: auto;
}
.toast-panel {
position: absolute;
left: 24px;
bottom: 24px;
width: 290px;
padding: 16px 18px;
background: rgba(12, 9, 8, 0.72);
border: 1px solid rgba(243, 233, 220, 0.14);
border-radius: 10px;
backdrop-filter: blur(9px);
}
.toast-panel .row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.toast-panel .lbl {
font-size: 10px;
letter-spacing: 0.14em;
color: var(--ink-dim);
width: 74px;
flex: none;
}
.toast-panel .dial {
flex: 1;
accent-color: var(--gold);
}
.toast-panel .val {
font-family: var(--mono);
font-size: 13px;
color: var(--gold);
width: 18px;
text-align: right;
}
.toast-panel .sel {
flex: 1;
background: rgba(0, 0, 0, 0.4);
color: var(--ink);
border: 1px solid rgba(243, 233, 220, 0.18);
border-radius: 5px;
padding: 4px 6px;
font-size: 12px;
}
.toast-panel .cue {
margin-top: 14px;
font-size: 15px;
font-style: italic;
color: var(--ink);
min-height: 20px;
transition: color 0.4s;
}
.toast-panel .hint {
margin-top: 6px;
font-size: 11px;
letter-spacing: 0.1em;
color: var(--ink-dim);
min-height: 14px;
}
/* Pressure gauge: fill = what your wrist is making, gold = what the spread
needs to flow, red = where spreading becomes scraping. */
.toast-panel .gauge {
position: relative;
height: 9px;
margin-top: 14px;
border-radius: 5px;
background: rgba(255, 255, 255, 0.09);
overflow: hidden;
}
.toast-panel .gauge-fill {
position: absolute;
inset: 0 auto 0 0;
width: 0;
background: #8a7f70;
border-radius: 5px;
transition: background 0.15s;
}
.toast-panel .gauge-mark {
position: absolute;
top: -3px;
bottom: -3px;
width: 2px;
margin-left: -1px;
}
.toast-panel .gauge-mark.yield {
background: var(--gold);
}
.toast-panel .gauge-mark.scrape {
background: #e2603a;
}
.toast-panel .mode {
margin-top: 8px;
font-size: 11px;
letter-spacing: 0.09em;
color: var(--ink-dim);
min-height: 14px;
}
.toast-panel .load {
height: 5px;
margin-top: 8px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.09);
overflow: hidden;
}
.toast-panel .load-fill {
height: 100%;
width: 0;
border-radius: 3px;
}
/* ---- the order ticket ---- */
.ticket {
position: absolute;
top: 22px;
left: 24px;
width: 268px;
padding: 16px 18px 14px;
color: #2b2118;
background: #efe4cf;
border-radius: 3px;
box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
transform: rotate(-0.7deg);
}
.ticket-day {
font-family: var(--mono);
font-size: 10px;
letter-spacing: 0.22em;
color: #9b8b74;
}
.ticket-who {
font-size: 12px;
font-style: italic;
color: #7d6d58;
margin-top: 2px;
}
.ticket-text {
margin-top: 8px;
font-size: 14px;
line-height: 1.4;
}
.ticket-spec {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-top: 11px;
}
.chip {
font-size: 10px;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 3px 7px;
border-radius: 3px;
background: rgba(43, 33, 24, 0.1);
border: 1px solid rgba(43, 33, 24, 0.16);
}
.chip.warn {
background: rgba(192, 57, 43, 0.14);
border-color: rgba(192, 57, 43, 0.4);
color: #8e2c21;
}
.chip.tool {
background: rgba(40, 80, 130, 0.12);
border-color: rgba(40, 80, 130, 0.3);
color: #2d5480;
}
.ticket-hint {
margin-top: 9px;
font-size: 11px;
color: #8a7963;
font-style: italic;
}
/* ---- the scorecard ---- */
.judge-panel {
position: absolute;
inset: 0;
display: flex;
justify-content: space-between;
align-items: stretch;
pointer-events: none;
}
.judge-panel > * {
pointer-events: auto;
}
.judge-left {
width: 33%;
max-width: 400px;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 0 0 26px 26px;
}
.judge-face {
width: 210px;
align-self: flex-start;
filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.6));
}
.judge-lines {
margin-top: 8px;
max-width: 380px;
}
.judge-lines p {
font-size: 17px;
line-height: 1.42;
margin-bottom: 7px;
color: var(--ink);
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}
.judge-lines p:first-child {
color: var(--ink-dim);
font-size: 14px;
}
.judge-right {
width: 380px;
padding: 26px 26px 26px 0;
display: flex;
flex-direction: column;
justify-content: center;
}
.judge-order {
font-size: 11px;
letter-spacing: 0.09em;
text-transform: uppercase;
color: var(--ink-dim);
margin-bottom: 12px;
text-align: right;
}
.judge-card {
background: rgba(12, 9, 8, 0.76);
border: 1px solid rgba(243, 233, 220, 0.14);
border-radius: 9px;
padding: 14px 16px;
backdrop-filter: blur(9px);
}
.crit {
display: grid;
grid-template-columns: 96px 1fr auto;
align-items: center;
gap: 10px;
padding: 4px 0;
}
.crit-name {
font-size: 10px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--ink-dim);
}
.crit-bar {
height: 6px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.09);
overflow: hidden;
}
.crit-fill {
display: block;
height: 100%;
border-radius: 3px;
}
.crit-detail {
font-family: var(--mono);
font-size: 10px;
color: var(--ink-dim);
text-align: right;
white-space: nowrap;
}
.crit.total {
border-top: 1px solid rgba(243, 233, 220, 0.16);
margin-top: 7px;
padding-top: 9px;
}
.crit.total .crit-name,
.crit.total .crit-detail {
color: var(--gold);
font-size: 13px;
}
.judge-foot {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 16px;
}
.judge-stamp {
font-size: 56px;
font-weight: 800;
line-height: 1;
padding: 4px 18px;
border: 4px solid currentColor;
border-radius: 7px;
transform: rotate(-9deg);
animation: stamp 0.42s cubic-bezier(0.2, 1.7, 0.4, 1);
}
@keyframes stamp {
0% {
transform: rotate(-9deg) scale(3.2);
opacity: 0;
}
60% {
opacity: 1;
}
100% {
transform: rotate(-9deg) scale(1);
opacity: 1;
}
}
.grade-S { color: #ffd76a; }
.grade-A { color: #7fd07f; }
.grade-B { color: #cfc4b2; }
.grade-C { color: #d99a4e; }
.grade-F { color: #d0483a; }
.judge-btns {
display: flex;
gap: 8px;
}
.btn {
font-family: var(--font);
font-size: 11px;
letter-spacing: 0.13em;
padding: 10px 16px;
border-radius: 6px;
border: 1px solid var(--gold);
background: var(--gold);
color: #211a12;
cursor: pointer;
font-weight: 700;
}
.btn:hover {
filter: brightness(1.12);
}
.btn.ghost {
background: transparent;
color: var(--ink-dim);
border-color: rgba(243, 233, 220, 0.24);
font-weight: 500;
}
.btn.ghost:hover {
color: var(--ink);
}