MOCHI麻薯

MOCHI 麻薯

A soft neumorphic widget system. Every surface is pressed from one warm material, the same colour as the page, and depth comes from light - never from lines.

Two things to hold on to. The material has exactly two states: raised at rest, pressed when active. And colour sits inside the material, never instead of it - pastels are plates laid into a pillow, not pillows of their own.

10 08
Caption lineTag

Read this first

  1. These values are the system. Every token below exists in css/mochi-core.css. Use them; do not invent parallel ones.
  2. Look for an existing part before moulding a new one. A widget, a plate and a tray cover almost every container you will need.
  3. No ad-hoc values. No raw hex, no new shadow, no new easing. The two shadow recipes are written once, in terms of --light and --shade; a theme changes the lights, never the recipe.
  4. Token names are roles. --cue means "look here", --active means "switched on". Read what a token is for, not what hue it happens to be.
  5. No borders, ever. The focus ring is the only outline in the system. If you need a line, you need a plate or a well instead.
  6. Light comes from the top-left, always. Flip one shadow and the whole page stops reading as one lit object.
Section 01 · 24 role tokens

Colour

Every swatch shows the light theme on the left and the dark theme on the right, so both are visible at once. Light is warm greige; dark is the same mochi dusted in roasted sesame. Not one neutral in either theme is pure black, pure white or a cold grey.

The material

--groundThe page AND every widget. One material.#ECE9E2#2D2926
--plateNeutral inner plates: digit tiles, callouts.#F7F5F0#36322E
--seamThe soft fold across a digit tile.#EFECE5#2F2B28
--lightThe lit side of every shadow recipe.#FFFFFF#45403B
--shadeThe shaded side of every shadow recipe.#A69E90#0D0B09
--trackEmpty tracks and idle page dots.#D6D1C5#45403A

Ink

--inkAll body text. Soft warm dark, never black.#5D574E#EBE4D8
--ink-softSecondary text, captions, placeholders.#6B665C#B3AB9E
--on-deepText and hands on the anchor and -deep plates.#FBFAF7#F6F1E8
--litThe brightest body: knobs and thumbs.#FBFAF7#E4DDD1

The anchor, the spark, the ring

--anchorThe one deep plate: primary button, dial face.#3E5C68#3B6170
--glintTiny sparks only: dial marks, glyph details.#D4A94E#D9B566
--focusThe focus ring. The only outline anywhere.#3E5C68#93C3CF

Fill roles - each a fill, a deep plate and a quiet tint

--levelQuantity: slider fill, ring arc.#93A9CB#8398BA
--level-deepGauge liquid that carries light text.#6D87B1#56709A
--level-tintQuiet plate that carries small ink text.#C9D4E6#3A4150
--cue"Look here": colon, active dot, blush.#D698A0#C98F98
--cue-deepFeature plate, wordmark, "do not" tag.#BD747F#A25F6B
--cue-tintQuiet plate that carries small ink text.#ECCFD3#4A3A3C
--activeSwitched on: the toggle track.#8FB5A4#84A998
--active-deepFull gauge liquid, "do" tag.#679181#4F7B6B
--active-tintSelected chip, active row, face plate.#CFDFD7#34443D
--decorDecoration only. Means nothing, on purpose.#E5C39C#CFAE88
--decor-tintQuiet decorative plate.#F2DFC8#4A4033

The three strengths, carrying text

Small ink on a tint
--level-tint
Small ink on a tint
--cue-tint
Small ink on a tint
--active-tint
Small ink on a tint
--decor-tint
Large bold on deep
--level-deep, 14px bold
--level - a plain fill carries no text

Contrast floor

PairLightDarkAllowed for
--ink on --ground / --plate5.9 / 6.611.4 / 10.1Body text anywhere.
--ink-soft on --ground / --plate4.7 / 5.26.3 / 5.6The smallest secondary text and placeholders. This is the floor - nothing quieter carries words.
--ink on the -tint plates4.8 - 5.58.0 - 8.5Small text on a coloured plate. The tints exist for exactly this.
--on-deep on --anchor6.96.0Any size. The primary button lives here.
--on-deep on the -deep plates3.4 - 3.54.3 - 4.5Large bold only: 19px and up, or 14px bold and up.
--ink on a plain fillabout 3.0about 2.1Never text. The plain fills are colour and decoration only.
--focus on --ground5.97.5The focus ring, clear of the 3:1 non-text floor in both themes.
Every fill role comes in three strengths because pastel is a bad place to put text. A plain pastel sits at about 3:1 under either ink - lovely as a fill, illegible as a label. So a role that needs to carry words gets a deep plate for large bold light text and a tint plate for small dark text, and the plain fill is kept for colour alone. The deep plates were darkened until light text cleared 3:1; the rule was always "deepen the plate, never shrink the text".
Section 02 · one rounded stack

Typography

One voice: a rounded sans, set heavy for numbers and plain for prose. Numbers are big and friendly and always tabular, so a changing value never makes its neighbours shuffle.

digits · 62 / 70010:08
section · 26 / 700Section heading
gauge · 22 / 7000124
lead · 17 / 400Soft things ask to be touched.
title · 16 / 700Widget title
body · 15 / 400Running text sits at 15px with a 1.55 line height.
label · 13 / 600Label on the material
caption · 12 / 600Caption floor
CJK stack · 26 / 700软软的麻薯

Levels

LevelSize / weightWhere
displayclamp(44-64px) / 700The wordmark. Tracked +0.02em - the only level that opens up.
digitsclamp(46-62px) / 700Flip-digit tiles. Tabular.
section26px / 700Section headings.
gauge21-22px / 700Numbers inside gauges. Tabular.
lead17px / 400The paragraph that opens a page.
title16px / 700Widget and plate titles.
body15px / 400, 1.55Running text, capped at 62ch.
on-deep label14px / 700The smallest text allowed on a -deep plate.
label13px / 600Captions and secondary labels in --ink-soft.
caption12px / 600The floor. Nothing is set smaller.
--fontui-rounded stackui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Yuanti SC", "PingFang SC", sans-serif - system fonts only; nothing is downloaded or bundled.
The stack is rounded all the way down, CJK included. A rounded Latin face beside a sharp-cornered CJK face looks like two systems sharing a screen, so the stack names rounded CJK faces before it falls back. Where no rounded face exists the plain sans takes over - the material still carries the softness, so the page degrades gracefully rather than breaking.
Section 03 · room for shadows

Space and layout

One centred column, generous gaps. The gaps are wider than a flat system would need because every raised thing throws light 6px up-left and shade 7px down-right, and two shadows that touch turn into mud.

MeasureValueNote
page max1080pxContent column, centred.
page padding34 / 22 / 64pxTop, sides, bottom. 24 / 14 / 48px below 760px.
section gap40pxBetween raised sections. 30px below 760px.
widget padding16pxInside every widget. 13px below 420px.
tray padding22pxA pressed well needs more room than a raised one - its shadow falls inward.
body measure62chRunning text never runs wider.
breakpoints900 / 760 / 420pxHero stacks; page tightens; shell and widgets tighten.

Steps in use

44px
Between list rows.
88px
Icon to label inside a button.
1212px
Between siblings: chips, digit tiles.
1414px
Between widgets on a board.
1616px
Widget padding.
1818px
Between staged specimens.
2222px
Tray padding.
4040px
Between sections.
The smallest gap between two raised things is 14px, and that is set by the shadow, not by taste. The raised recipe blurs 14-16px on each side. Closer than that and one pillow's shade lands on its neighbour's light, and the pair reads as a single lumpy object. Inside a widget things are plates, which barely cast, so they can sit at 12px.
Section 04 · the material

Form

One soft body, two states. Raised at rest, pressed when active, and a flat plate for colour laid inside either. That is the entire silhouette vocabulary.

--raised - rest
-6 -6 14 light 85%, 7 7 16 shade 42%
--pressed - active
inset -4 -4 10 light 80%, inset 5 5 12 shade 40%
--plate-shadow - colour inside
-3 -3 8 light 55%, 3 3 8 shade 30%

Shadow recipes

TokenRecipeJob
--raised-6px -6px 14px / 7px 7px 16pxEvery widget, button, chip and squircle at rest.
--pressedinset -4px -4px 10px / inset 5px 5px 12pxActive state, tracks, wells, inputs, trays.
--plate-shadow-3px -3px 8px / 3px 3px 8pxColoured and neutral plates sitting inside a widget.
--knob-shadow2px 2px 6px, shade 50%The toggle knob.
--thumb-shadow2px 2px 7px / -2px -2px 6pxThe slider thumb.
--deep-insetinset 3px 3px 8pxThe inner shade of the anchor plate, so the dial reads as a dish.

Radii

--r-sm18px
Buttons, plates, digit tiles.
--r-md22px
Widgets, wells, trays.
--r-lg28px
Large panels and the screen stage.
--r-shell44px
The outer shell that holds a board. 36px below 420px.
in between12 - 20px
Small parts sized to their height: tooltip 12, row 14, chip 15, field 16, toggle 17, squircle 20.
A raised or pressed surface is always --ground - the same colour as the page. That is what makes it look moulded out of the page rather than placed on it. The moment a fill differs, it is no longer the material; it is a plate, and a plate lies flat inside a widget with a small shadow. A pastel button with a big raised shadow is two ideas fighting.
Section 05 · soft and small

Motion

Motion is the material being pressed, and nothing else. Two durations, one curve, and one blink.

TokenValueWhere
--press-ease120ms ease-outRaised to pressed on box-shadow, fill changes, the toggle knob, tooltips. Fast enough to feel like a fingertip.
--fade-ease240ms ease-outThe face-plate blush and the screen canvas fading in. Things that appear rather than things that are pushed.
mochi-blink1s steps(1)The flip-digit colon drops to 15% opacity for half of each second. A tick, not a fade.
reduced motion0.01msTransitions collapse, the colon stays lit, the blush stays visible, the screen draws one still frame.
Nothing floats. There is no hover lift, no bounce, no scale-up: a soft object that rises toward the cursor stops being a pillow and becomes a balloon. The only change of depth is the one a finger causes - raised to pressed, and back.
Section 06 · enhancement only

Screen

One optional surface treatment: a dough press. A single pillow of ground material, lit from the top-left like everything else, breathing very slightly. Rest the pointer on the right-hand panel and a fingertip touches it; hold the button down and the dough gives, swells around the dimple, and blushes where it is pressed deepest.

Static fallback - one raised pillow in CSS
Live - rest the pointer on it, then hold to press

Uniforms

UniformValueWhat it does
uSoft0.11Width of the pillow's shoulder, in panel heights. The shoulder is convex - steep at the ground, rounding over at the top - so it reads as a pillow; narrower and it reads as a bevel.
uRelief0.055How steep the height field reads to the light. Higher looks harder, not softer.
uReach0.13Radius of the fingertip, in panel heights.
uDepth1.8Dimple depth at full press, in pillow heights. A ring swells around it by 22% of that.
uTouch0.3Share of the depth a resting pointer gives before any press - the hover state, in dough.
uBreath0.035Amplitude of the slow idle swell. Zero under reduced motion.
uBlush0.25Ceiling on how far the deepest point warms toward --cue.
uGround / uLight / uShade / uCuetokensRead from the live values and re-read on every theme change, so the pillow is always the page's own material.
springk 42 / d 8.5Pointer, touch and press all follow springs, so the dough gives and recovers instead of snapping.
The shader is the material rule, drawn instead of box-shadowed. Its light is fixed at the top-left, a flat surface renders as exactly --ground, and every other pixel is the ground mixed toward --light or --shade by how far it tilts - the same two colours the CSS recipes use. Only the blush borrows --cue, as the face plate does. It is enhancement only: the canvas is transparent until its first frame, so the CSS pillow underneath is the whole design on a machine without WebGL2. It stops when scrolled off screen, and under prefers-reduced-motion it draws one settled frame and never starts a loop.

Where it belongs: an empty state, a hero, or a panel that has nothing in it yet - somewhere a reader might idly poke. Not behind text or controls: a surface that dimples under the pointer competes with every button placed on it, and the buttons should win.

Section 07 · every state live

Components

Every interactive element is raised at rest and pressed when active. Everything here is live - press, toggle, drag, hover, tab through it.

Buttons

rest - raised; press and hold it
pressed - pinned for reference
disabled - flat, 45% ink
primary - the anchor plate
round and small

Toggle and slider

off / on - click to flip; --active when on
slider - pressed track, --level fill
--cue fill, for the one slider that matters
disabled - fill drops to --track

List rows

Divider-free rows in a pressed tray; click one - the selected row becomes an --active-tint plate.

Chips, tooltip, input

chips - click; selected is pressed with --active-tint
A small raised plate
tooltip - on hover or focus
input - pressed field; focus shows the ring
input disabled - flat, 45% ink
Hover changes nothing but the cursor. In a system with only two depths, a hover state would need a third, and the third depth is where neumorphism usually goes muddy. Focus is different - keyboard users cannot see a cursor - so focus gets the one outline the system allows: 2px of --focus, 3px out.
Section 08 · the recognisable parts

Motifs

The recurring shapes, each isolated in a pressed tray. These - not the palette - are what make the system recognisable at a glance.

Widget - the only container
10 08
Flip digits - plate tiles with a soft seam, a ticking --cue colon
Pill gauge - pressed track, a -deep liquid, --on-deep label
Dial - the anchor plate as a dish, --glint marks
Ring gauge - --level arc, rounded caps
Face plate - hover it; the blush fades in
Squircle - raised, filled, a glyph in 2-3 token colours
Feature plate
Large bold only
Feature plate - one per board, on --cue-deep
Page dots - one --cue pill, the rest --track
样本Specimen
Bilingual label - CJK leads, the Latin gloss follows in --ink-soft
Almost every motif is a pressed well with something raised or poured into it. The gauge is a well with liquid, the dial is a dish, the page dots sit in the ground, the digit tiles are plates in a pillow. Before adding a new motif, ask which of those it is. If it is neither raised nor pressed, it does not belong to this material.
Section 09 · specimen

Composition

The parts assembled into one board: a shell, a four-column grid of widgets, a shelf of squircles. The copy is placeholder, so what a reader takes away is how the parts sit together.

10 08
Caption lineTag
Feature title
Secondary line

Setting

Anatomy

PartAs builtWhy it is that
Shell--r-shell, --raisedThe one object everything else is moulded from. Its 44px corner is the largest in the system, so every widget inside reads as a smaller pillow of the same dough.
Board4 columns, 14px gapWidgets span 2 or 4. Two sizes are enough to make a rhythm; a third turns the board into a puzzle.
Widget--ground, --raisedSame colour as the shell. Only the light tells them apart, which is the whole point.
Digit tiles--plate, --plate-shadowNeutral plates set into the top widget. The big friendly number is the first thing the eye lands on.
Feature plate--cue-deepThe single strongest colour on the board, and there is exactly one. A second would split the attention it exists to hold.
Dial--anchorThe one deep plate. It anchors the board's weight low-left, balancing the light-heavy top.
Gaugespressed well + -deepWells, not widgets: they sit below the surface, so a board full of values still has somewhere quiet for the eye to rest.
Cue spendcolon, active dot, blush--cue appears in small doses only. The page dots and colon share it, which is why the eye connects them.
Shelf--pressed rowSquircles are raised inside a pressed shelf, so the two depths sit side by side and explain each other.
Note what this is not: a screen from a product with the labels swapped. Every value is a placeholder and every label is a part name. Read it for the alternation - raised, plate, well, raised - and for where the colour is spent, which is almost nowhere.
Section 10 · the refusals matter more

Rules

The same content, twice: once moulded from the material, once built the usual way.

Specimen card

Depth from light. Same colour as the page.

Do

Specimen card

Border, hard shadow, cold white.

Do not borders, hard edges, cold neutrals
Do
  • Mould everything from --ground. Depth comes from light.
  • Keep the light top-left on every shadow, in both themes.
  • Put colour on plates inside widgets, with the small plate shadow.
  • Use a -tint plate for small text on colour and a -deep plate for large bold light text.
  • Spend --cue in small doses - a dot, a colon, a blush.
  • Keep every neutral warm, in the dark theme too.
Do not
  • Draw a border or outline anywhere - the focus ring is the only exception.
  • Use pure black, pure white or a cold grey.
  • Use a hard shadow, or write a new shadow instead of reusing the recipes.
  • Add a second deep plate colour. --anchor only, used sparingly.
  • Put small light text on any pastel, or small dark text on a plain fill.
  • Add a third depth - no hover lift, no floating.
  • Run the dough press behind text or controls.