---
title: "Graphite glass: liquid glass controls set in lit monochrome clay"
slug: graphite-glass
description: A UI style that sets liquid glass controls into a matte dark gray clay body lit from one direction. The glass bends a monochrome wall behind it and splits RGB slightly at its edges. State is shown by brightness and a soft white glow, never by a colored fill.
tags: [design-philosophy, ui, css, liquid-glass, claymorphism, skeuomorphism, monochrome, dark-mode]
ground: "#222222"
ink: "#c4c4c4"
font: Inter
mono: JetBrains Mono
---

# Graphite glass: liquid glass controls set in lit monochrome clay

Graphite glass combines two materials. The body is matte dark gray clay, lit from the top-left: frames, slabs and carved panes. The controls are liquid glass set into that body. They bend the monochrome wall behind them rather than frosting it, catch a rim of light from the same lamp, and split red, green and blue slightly at their edges. That faint prism fringe is the only color on the screen. On and off are shown as brighter glass with a soft white glow, never as a colored fill. The result feels physical and quiet, like a piece of studio hardware.

This came out of a live playground session. The first round was standard glassmorphism (aurora gradient, candy fills), and the person rejected it bluntly. The notes that moved it forward were, in order:

- "less gradient more calm but i like the glow"
- "kinda like the monochrome [clay] article … but using the apple glass article too"
- "give the glass subtle slight rgb refraction"

A red clay version was tried afterward and they came back to dark gray.

## When this applies

- **Fits:** apps with a few controls that people touch a lot, such as a media or room controller, a hardware-style companion app, a settings panel, a small dashboard with a handful of knobs and toggles, or a kiosk or home-hub screen. It fits products that want tactility and calm over brand color, like audio and camera gear, developer or "pro" tools, and a focus or night mode in a creative app.
- **Doesn't fit:** dense data such as tables, logs or trading screens, where bevels and refraction add noise. It doesn't fit long reading surfaces (keep text on a flat slab), or forms with dozens of fields. It also doesn't fit products that must look identical in Safari and Firefox today, because the refraction is Chromium-only. Brand-led marketing pages that need their own hue are a poor fit too.
- **Not a theme for every surface.** Glass is for controls only. Frames, lists and reading areas are matte clay. If everything is glass, none of it reads as glass.

## The rules

1. **No hue.** Every surface, ink and glow comes from one gray ramp, from `#111` to `#ececec`. There's no accent color. State is never a color.
2. **One light, top-left, everywhere.** The room gradient, slab lips, carved panes, glass rims and dial ticks all agree on it.
3. **Clay is matte, glass is clear.** Clay gets a 1px lit top lip, a dark bottom edge, three outer shadows (contact, mid and ambient) and about 5% grain. Glass gets none of the grain and none of the soft-blur fog.
4. **Panes are carved.** Controls sit in recessed panes cut into the clay frame: a deep inset shadow under the top edge and a faint lit lip at the bottom. The pane holds content for the glass to bend, here a slowly drifting wall of gray tiles (rings, bars, numerals, dots).
5. **Glass bends, it doesn't frost.** Use a squircle-bezel displacement map from Snell's law (n = 1.5) through `backdrop-filter: url(#filter)`. Use at most a 1–1.5px pre-blur on large glass panels and none on small controls. The content behind stays sharp and curves at the edges.
6. **Light sells the glass.** A thin specular rim, strongest on the edges facing the top-left light, is drawn from a second generated image and composited over the refracted backdrop.
7. **Slight dispersion.** Refract red about 9% more and blue about 9% less than green, then recombine with `screen`. The fringe should be visible only where the bezel bends a hard edge behind it. If you can see color on a flat area, it's too strong.
8. **Lit means on.** Selected or on is brighter glass (`rgba(255,255,255,.16)`) plus a soft white glow (`0 0 18px rgba(255,255,255,.22)`). Off is a dark glass tint. Disabled is darker still, with dimmed ink.
9. **Moving parts are glass too.** Toggle knobs, the slider thumb and the segmented thumb are small pieces of glass, so they bend the content as they move. Tracks are carved wells.
10. **Status by shape, not hue.** A lit dot means ok, a hollow ring means warning, and a blinking dot means error. Always pair it with a label.
11. **Dim, engraved ink.** Body text is `#c4c4c4` on clay, engraved with `0 -1px 0 rgba(0,0,0,.7)`. Near-white (`#ececec`) is only for text sitting on glass. Pure white text on the clay breaks the material.
12. **Press squashes.** On `:active`, controls move 1px down and scale to 0.96 with a springy return (`cubic-bezier(.3,1.6,.5,1)`).

## Tokens

```css
:root {
  --room: radial-gradient(120% 90% at 15% 0%, #313131 0%, #262626 50%, #1b1b1b 100%);
  --ground: #222222;
  --text: #c4c4c4;  --bright: #ececec;  --muted: #7c7c7c;
  --engrave: 0 -1px 0 rgba(0,0,0,.7);
  --slab: linear-gradient(180deg, #2f2f2f 0%, #2a2a2a 100%);
  --raise-slab: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -2px 2px rgba(0,0,0,.35),
    0 1px 2px rgba(0,0,0,.7), 0 8px 16px rgba(0,0,0,.35), 0 26px 50px rgba(0,0,0,.5);
  --pane-carve: inset 0 2px 3px rgba(0,0,0,.6), inset 6px 8px 18px rgba(0,0,0,.45),
    inset 0 -1px 0 rgba(255,255,255,.05);
  --tint: rgba(10,10,10,.42);          /* glass, off */
  --tint-lit: rgba(255,255,255,.16);   /* glass, on */
  --glow: 0 0 18px rgba(255,255,255,.22), 0 0 2px rgba(255,255,255,.5);
  --float: 0 1px 2px rgba(0,0,0,.55), 0 8px 18px rgba(0,0,0,.35), 0 22px 40px rgba(0,0,0,.35);
  /* gray wall behind the glass: tile/ink pairs */
  --wall-1: #2a2a2a/#d8d8d8; --wall-2: #d0d0d0/#1e1e1e; --wall-3: #3c3c3c/#9a9a9a;
  --wall-4: #151515/#bdbdbd; --wall-5: #707070/#141414; --wall-6: #e2e2e2/#555555;
}
```

## The glass filter, briefly

For each control, a script measures its size and radius. It writes a displacement map (a squircle bezel profile run through Snell's law, encoded as red and green offsets around 128) and a specular map (rim alpha from a fixed top-left light) to a canvas. Then it builds one SVG filter:

```html
<filter id="lg1" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
  <feGaussianBlur in="SourceGraphic" stdDeviation="1" result="b"/>          <!-- big panels only -->
  <feImage href="data:…map" result="m"/>
  <feDisplacementMap in="b" in2="m" scale="26.2" xChannelSelector="R" yChannelSelector="G" result="dr"/>
  <feColorMatrix in="dr" type="matrix" values="1 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0" result="cr"/>
  <feDisplacementMap in="b" in2="m" scale="24"   xChannelSelector="R" yChannelSelector="G" result="dg"/>
  <feColorMatrix in="dg" type="matrix" values="0 0 0 0 0  0 1 0 0 0  0 0 0 0 0  0 0 0 1 0" result="cg"/>
  <feDisplacementMap in="b" in2="m" scale="21.8" xChannelSelector="R" yChannelSelector="G" result="db"/>
  <feColorMatrix in="db" type="matrix" values="0 0 0 0 0  0 0 0 0 0  0 0 1 0 0  0 0 0 1 0" result="cb"/>
  <feBlend in="cr" in2="cg" mode="screen" result="rg"/>
  <feBlend in="rg" in2="cb" mode="screen" result="d"/>
  <feImage href="data:…spec" result="h"/>
  <feComposite in="h" in2="d" operator="over"/>
</filter>
```

A `ResizeObserver` rebuilds the filter when the control changes size. The full working script is in the UI sheet below. It's adapted from [Liquid glass on the web](https://ayeeye.net/posts/claude-opus/liquid-glass-on-the-web).

**Fallbacks:** Safari and Firefox get `backdrop-filter: blur(12px)` plus an inset top lip and a hairline red-left, blue-right inset edge that stands in for the dispersion. `prefers-reduced-transparency` gets solid clay (`#3a3a3a`). `prefers-reduced-motion` stops the wall drift and the blinking.

## Applied well vs. misapplied

| Idea | Applied well | Misapplied |
|---|---|---|
| No hue | Picked segment is brighter glass with a soft white glow | Picked segment filled with blue, or a gradient |
| Glass on controls only | Matte clay frame, glass play bar and knobs inside a carved pane | Every card, list and modal made of glass, so the page turns to cellophane |
| Refraction, not frost | Gray tiles stay crisp and visibly curve at the bezel | 20px blur that turns the background to mush |
| Slight dispersion | A thin red/blue fringe only where a hard tile edge crosses the bezel | Chromatic aberration across the whole control, or on text |
| One light | Rim highlight, slab lip and room gradient all brighten toward the top-left | Rim on all four sides, drop shadow straight down, room lit from the right |
| Calm | Slow 90s wall drift, one springy press | Pulsing gradients, hover glows on everything, parallax |

## What didn't work

- **Aurora gradient with cyan-to-violet fills** (round 1). It was the generic glassmorphism default and got rejected outright.
- **"Liquid glass" with candy gradient accents** (round 2). The material was better, but the gradients were still too loud.
- **Muted slate with a cyan glow accent** (round 3). It was calmer, but the glass still felt like a frosted plastic sheet.
- **Monochrome gray clay with real refraction** (round 4) was close. It needed the slight RGB split (round 5) to feel like real glass.
- **Red clay** (round 6) was warm and well liked, but they went back to dark gray. With no hue anywhere, the glass fringe is the only color on screen, and that's what makes it read as glass.

## Brand guide

```html example Palette
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<style>
*{box-sizing:border-box;margin:0}
body{background:radial-gradient(120% 90% at 15% 0%,#313131 0%,#262626 50%,#1b1b1b 100%) fixed #222222;color:#c4c4c4;font:500 14px/1.4 Inter,system-ui,sans-serif;padding:28px 16px;text-shadow:0 -1px 0 rgba(0,0,0,.7)}
.eb{font:500 11px/1 "JetBrains Mono",monospace;letter-spacing:.12em;text-transform:uppercase;color:#7c7c7c;margin-bottom:8px}
h2{font-size:24px;font-weight:700;letter-spacing:-.02em;margin-bottom:6px}
.lede{color:#7c7c7c;max-width:68ch;margin-bottom:22px}
.grp{margin-bottom:22px}
.grp h3{font:500 11px/1 "JetBrains Mono",monospace;letter-spacing:.1em;text-transform:uppercase;color:#7c7c7c;margin-bottom:10px}
.row{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.sw{border-radius:20px;padding:8px;background:linear-gradient(180deg,#2f2f2f,#2a2a2a);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),inset 0 -2px 2px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.7),0 8px 16px rgba(0,0,0,.35)}
.chip{height:64px;border-radius:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 -2px 3px rgba(0,0,0,.3)}
.chip.glass{background:#2a2a2a;position:relative;overflow:hidden}
.chip.glass::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,#d0d0d0 0 10px,#151515 10px 20px)}
.chip.glass i{position:absolute;inset:10px;border-radius:12px;backdrop-filter:blur(1px);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.7),inset 1.5px 0 1px -1px rgba(255,90,90,.6),inset -1.5px 0 1px -1px rgba(90,170,255,.6)}
.chip.glass.off i{background:rgba(10,10,10,.42)}
.chip.glass.on i{background:rgba(255,255,255,.16);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.7),0 0 18px rgba(255,255,255,.4)}
.sw b{display:block;font-size:13px;font-weight:600;margin:8px 4px 0}
.sw code{display:block;font:500 11px "JetBrains Mono",monospace;color:#7c7c7c;margin:2px 4px 0}
.sw small{display:block;font-size:12px;color:#9a9a9a;margin:4px 4px 2px;line-height:1.35}
.rule{border-top:1px solid rgba(0,0,0,.35);box-shadow:inset 0 1px 0 rgba(255,255,255,.04);padding-top:14px;font-size:14px;max-width:80ch}
.rule b{font:500 11px "JetBrains Mono",monospace;letter-spacing:.1em;text-transform:uppercase;color:#7c7c7c;margin-right:10px}
</style>
<div class="eb">01 / Palette</div>
<h2>One gray ramp, one light</h2>
<p class="lede">Every surface, ink and glow comes from one gray ramp. Glass has no color of its own. It shows whatever is behind it, with a faint RGB fringe at its edges.</p>
<div class="grp"><h3>Ground</h3><div class="row">
  <div class="sw"><div class="chip" style="background:#313131"></div><b>Room light</b><code>#313131</code><small>Room gradient, lit corner</small></div>
  <div class="sw"><div class="chip" style="background:#262626"></div><b>Room</b><code>#262626</code><small>Room gradient, middle</small></div>
  <div class="sw"><div class="chip" style="background:#1b1b1b"></div><b>Room shadow</b><code>#1b1b1b</code><small>Room gradient, far corner</small></div>
  <div class="sw"><div class="chip" style="background:linear-gradient(180deg,#2f2f2f,#2a2a2a)"></div><b>Slab</b><code>#2F2F2F → #2A2A2A</code><small>Frames and big containers</small></div>
  <div class="sw"><div class="chip" style="background:#161616"></div><b>Pane</b><code>#161616</code><small>Carved wells, behind the wall</small></div>
</div></div>
<div class="grp"><h3>Ink</h3><div class="row">
  <div class="sw"><div class="chip" style="background:#ececec"></div><b>Bright</b><code>#ECECEC</code><small>Text on glass only</small></div>
  <div class="sw"><div class="chip" style="background:#c4c4c4"></div><b>Text</b><code>#C4C4C4</code><small>Engraved text on clay</small></div>
  <div class="sw"><div class="chip" style="background:#7c7c7c"></div><b>Muted</b><code>#7C7C7C</code><small>Labels, captions, mono tags</small></div>
</div></div>
<div class="grp"><h3>Glass state (instead of an accent)</h3><div class="row">
  <div class="sw"><div class="chip glass off"><i></i></div><b>Glass, off</b><code>rgba(10,10,10,.42)</code><small>Default control tint</small></div>
  <div class="sw"><div class="chip glass on"><i></i></div><b>Glass, on</b><code>rgba(255,255,255,.16)</code><small>Plus glow 0 0 18px rgba(255,255,255,.28)</small></div>
</div></div>
<div class="grp"><h3>Gray wall (what the glass bends)</h3><div class="row">
  <div class="sw"><div class="chip" style="background:linear-gradient(90deg,#2a2a2a 50%,#d8d8d8 50%)"></div><b>Wall 1</b><code>#2A2A2A / #D8D8D8</code></div>
  <div class="sw"><div class="chip" style="background:linear-gradient(90deg,#d0d0d0 50%,#1e1e1e 50%)"></div><b>Wall 2</b><code>#D0D0D0 / #1E1E1E</code></div>
  <div class="sw"><div class="chip" style="background:linear-gradient(90deg,#3c3c3c 50%,#9a9a9a 50%)"></div><b>Wall 3</b><code>#3C3C3C / #9A9A9A</code></div>
  <div class="sw"><div class="chip" style="background:linear-gradient(90deg,#707070 50%,#141414 50%)"></div><b>Wall 4</b><code>#707070 / #141414</code></div>
</div></div>
<div class="grp"><h3>Status (shape, not hue)</h3><div class="row">
  <div class="sw"><div class="chip" style="background:#161616;display:grid;place-items:center"><span style="width:12px;height:12px;border-radius:6px;background:#f0f0f0;box-shadow:0 0 10px rgba(255,255,255,.9)"></span></div><b>OK</b><code>lit dot</code></div>
  <div class="sw"><div class="chip" style="background:#161616;display:grid;place-items:center"><span style="width:12px;height:12px;border-radius:6px;box-shadow:inset 0 0 0 2px #cfcfcf"></span></div><b>Warning</b><code>hollow ring</code></div>
  <div class="sw"><div class="chip" style="background:#161616;display:grid;place-items:center"><span style="width:12px;height:12px;border-radius:6px;background:#f0f0f0;animation:b 1.2s steps(1) infinite"></span></div><b>Error</b><code>blinking dot</code></div>
</div></div>
<p class="rule"><b>Rule</b>Never add a hue. On is brighter glass and a soft white glow. The only color on screen is the faint RGB fringe the glass makes at its own edges.</p>
<style>@keyframes b{50%{opacity:.15}}@media (prefers-reduced-motion:reduce){*{animation:none!important}}</style>
```

```html example Type
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<style>
*{box-sizing:border-box;margin:0}
body{background:radial-gradient(120% 90% at 15% 0%,#313131 0%,#262626 50%,#1b1b1b 100%) fixed #222222;color:#c4c4c4;font:500 14px/1.4 Inter,system-ui,sans-serif;padding:28px 16px;text-shadow:0 -1px 0 rgba(0,0,0,.7)}
.eb{font:500 11px/1 "JetBrains Mono",monospace;letter-spacing:.12em;text-transform:uppercase;color:#7c7c7c;margin-bottom:8px}
h2{font-size:24px;font-weight:700;letter-spacing:-.02em;margin-bottom:6px}
.lede{color:#7c7c7c;max-width:68ch;margin-bottom:22px}
.spec{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-bottom:22px}
.slab{border-radius:24px;padding:20px;background:linear-gradient(180deg,#2f2f2f,#2a2a2a);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),inset 0 -2px 2px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.7),0 8px 16px rgba(0,0,0,.35),0 26px 50px rgba(0,0,0,.5)}
.big{font-size:56px;line-height:1;font-weight:700;letter-spacing:-.04em;margin:6px 0 14px}
.big.m{font:500 40px/1 "JetBrains Mono",monospace;letter-spacing:-.02em}
dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:13px}
dt{font:500 10.5px/18px "JetBrains Mono",monospace;letter-spacing:.1em;text-transform:uppercase;color:#7c7c7c}
.scale{border-radius:24px;padding:8px 20px;background:linear-gradient(180deg,#2f2f2f,#2a2a2a);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 1px 2px rgba(0,0,0,.7),0 8px 16px rgba(0,0,0,.35)}
.r{display:flex;align-items:baseline;gap:16px;padding:12px 0}
.r+.r{border-top:1px solid rgba(0,0,0,.4);box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
.r code{flex:none;width:150px;font:500 11px "JetBrains Mono",monospace;color:#7c7c7c}
.r span{min-width:0;overflow-wrap:anywhere}
.onglass{color:#ececec;text-shadow:0 1px 2px rgba(0,0,0,.45)}
@media (max-width:520px){.r{flex-direction:column;gap:4px}.big{font-size:44px}}
</style>
<div class="eb">02 / Type</div>
<h2>A neutral sans that doesn't compete with the material</h2>
<p class="lede">Clay and glass already have a lot of character, so the type stays plain. Text on clay is engraved and slightly dimmed. Text on glass is brighter, with a soft drop shadow so it reads over whatever the glass is bending.</p>
<div class="spec">
  <div class="slab"><div class="eb">Sans / interface</div><div class="big">Inter</div>
    <dl><dt>Use</dt><dd>Everything: titles, labels, body, buttons</dd><dt>Weights</dt><dd>500 body, 600 controls, 700 headings, 800 display</dd><dt>Tracking</dt><dd>-0.01em body, -0.025em headings, -0.04em display</dd><dt>Fallback</dt><dd>system-ui, -apple-system, Segoe UI, sans-serif</dd></dl></div>
  <div class="slab"><div class="eb">Mono / labels and values</div><div class="big m">JetBrains Mono</div>
    <dl><dt>Use</dt><dd>Part labels, readouts (BASS +4 dB), small caps tags</dd><dt>Weights</dt><dd>500</dd><dt>Tracking</dt><dd>+0.04em values, +0.12em uppercase labels</dd><dt>Fallback</dt><dd>ui-monospace, SF Mono, Menlo, monospace</dd></dl></div>
</div>
<div class="scale">
  <div class="r"><code>Display 40/44 · 800</code><span style="font-size:40px;line-height:44px;font-weight:800;letter-spacing:-.04em">Studio</span></div>
  <div class="r"><code>Heading 24/30 · 700</code><span style="font-size:24px;line-height:30px;font-weight:700;letter-spacing:-.025em">Listening room settings</span></div>
  <div class="r"><code>Body 14/20 · 500</code><span style="font-size:14px;line-height:20px">Crossfade blends the end of one track into the next over a few seconds.</span></div>
  <div class="r"><code>On glass 14.5 · 600</code><span class="onglass" style="font-size:14.5px;font-weight:600;background:rgba(10,10,10,.42);padding:8px 16px;border-radius:18px;box-shadow:inset 0 1.5px 0 rgba(255,255,255,.6)">Continue</span></div>
  <div class="r"><code>Label 10.5 mono · caps</code><span style="font:500 10.5px 'JetBrains Mono',monospace;letter-spacing:.12em;text-transform:uppercase;color:#7c7c7c">Toggle / on, off</span></div>
  <div class="r"><code>Mono 12 · 500</code><span style="font:500 12px 'JetBrains Mono',monospace;letter-spacing:.04em">BASS +4 dB · VOL 64</span></div>
</div>
```

```html example UI sheet | wide
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<style>
/* One gray ramp, one light (top-left). Clay frames hold panes of monochrome content;
   controls are liquid glass that bends that content, rim-lit from the same light.
   State = brightness + white glow, never hue. */
:root{
  --room:radial-gradient(120% 90% at 15% 0%,#313131 0%,#262626 50%,#1b1b1b 100%);
  --text:#c4c4c4;--bright:#ececec;--muted:#7c7c7c;
  --engrave:0 -1px 0 rgba(0,0,0,.7);
  --slab:linear-gradient(180deg,#2f2f2f 0%,#2a2a2a 100%);
  --raise-slab:inset 0 1px 0 rgba(255,255,255,.06),inset 0 -2px 2px rgba(0,0,0,.35),
    0 1px 2px rgba(0,0,0,.7),0 8px 16px rgba(0,0,0,.35),0 26px 50px rgba(0,0,0,.5);
  --press:inset 0 2px 3px rgba(0,0,0,.65),inset 5px 7px 14px rgba(0,0,0,.5),
    inset -4px -5px 10px rgba(255,255,255,.03),0 1px 0 rgba(255,255,255,.06);
  --glow:0 0 18px rgba(255,255,255,.22),0 0 2px rgba(255,255,255,.5);
  --tint:rgba(10,10,10,.42);--tint-lit:rgba(255,255,255,.16);
  --sans:Inter,system-ui,sans-serif;--mono:"JetBrains Mono",ui-monospace,monospace;
}
*{box-sizing:border-box;margin:0}
body{min-height:100vh;background:var(--room) fixed #222;color:var(--text);font:500 14px/1.4 var(--sans);
  letter-spacing:-.01em;text-shadow:var(--engrave);padding:40px 16px 60px;-webkit-font-smoothing:antialiased}
body::after{content:"";position:fixed;inset:0;pointer-events:none;opacity:.05;z-index:9;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.wrap{max-width:1080px;margin:0 auto}
h1{font-size:26px;font-weight:700;letter-spacing:-.025em;color:var(--text)}
.sub{color:var(--muted);margin:6px 0 28px;font-size:14px;max-width:70ch}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:22px}

/* clay frame + carved pane of content */
.tile{border-radius:28px;background:var(--slab);box-shadow:var(--raise-slab);padding:10px 10px 12px;display:flex;flex-direction:column}
.label{font:500 10.5px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:12px 10px 0}
.pane{position:relative;border-radius:20px;overflow:hidden;min-height:190px;padding:22px 16px;
  display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:center;
  background:var(--wall,#161616) fixed;background-size:var(--ws,880px) auto;animation:drift 90s linear infinite}
.pane::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 2px 3px rgba(0,0,0,.6),inset 6px 8px 18px rgba(0,0,0,.45),inset 0 -1px 0 rgba(255,255,255,.05)}
.pane.col{flex-direction:column;flex-wrap:nowrap}
@keyframes drift{to{background-position:0 -880px}}

/* glass: refraction + rim via JS (Chromium); blur + inset lip elsewhere */
.g{position:relative;color:var(--bright);text-shadow:0 1px 2px rgba(0,0,0,.45);
  box-shadow:0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35),0 22px 40px rgba(0,0,0,.35)}
.lg-fb .g{-webkit-backdrop-filter:blur(12px) saturate(1.2);backdrop-filter:blur(12px) saturate(1.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -1px 0 rgba(255,255,255,.14),inset 1.5px 0 1px -1px rgba(255,90,90,.35),inset -1.5px 0 1px -1px rgba(90,170,255,.35),0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35)}
.g.lit{background:var(--tint-lit)!important;box-shadow:var(--glow),0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35)}
@media (prefers-reduced-transparency:reduce){.g{backdrop-filter:none!important;background:#3a3a3a!important}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
button{font:inherit;color:inherit;border:0;cursor:pointer;background:none}
:focus-visible{outline:2px solid rgba(255,255,255,.8);outline-offset:3px}

.btn{height:46px;padding:0 22px;border-radius:23px;background:var(--tint);font-weight:600;font-size:14.5px;
  transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.btn:active,.ib:active{transform:translateY(1px) scale(.96)}
.btn[disabled]{color:rgba(255,255,255,.4);cursor:default;background:rgba(10,10,10,.55)}
.ib{width:50px;height:50px;border-radius:25px;display:grid;place-items:center;background:var(--tint);transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.ib.sq{border-radius:16px}
.ib svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ib.lit svg{filter:drop-shadow(0 0 5px rgba(255,255,255,.7))}

.tgw{display:flex;align-items:center;gap:12px;font-size:13.5px;width:100%;max-width:230px;justify-content:space-between;
  padding:6px 8px 6px 16px;border-radius:26px;background:var(--tint)}
.tg{position:relative;width:66px;height:40px;padding:0;flex:none}
.tg .tr{position:absolute;left:1px;top:6px;width:64px;height:28px;border-radius:14px;background:rgba(0,0,0,.55);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.7),0 1px 0 rgba(255,255,255,.08);transition:background .25s,box-shadow .25s}
.tg .th{position:absolute;top:6px;left:2px;width:40px;height:28px;border-radius:14px;background:rgba(255,255,255,.1);
  transition:left .3s cubic-bezier(.3,1.4,.5,1)}
.tg[aria-checked=true] .tr{background:rgba(255,255,255,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.4),var(--glow)}
.tg[aria-checked=true] .th{left:24px}

.seg{position:relative;display:flex;padding:4px;border-radius:24px;background:var(--tint)}
.seg button{position:relative;z-index:1;height:38px;padding:0 16px;border-radius:19px;font-size:13.5px;font-weight:600;color:rgba(255,255,255,.55);transition:color .2s}
.seg button[aria-pressed=true]{color:#fff}
.seg .th{position:absolute;top:4px;height:38px;border-radius:19px;background:var(--tint-lit);box-shadow:var(--glow);transition:left .35s cubic-bezier(.3,1.3,.5,1),width .35s}

.sl{width:100%;max-width:270px;border-radius:24px;padding:12px 18px 6px;background:var(--tint)}
.slh{display:flex;justify-content:space-between;font-size:13px;font-weight:600;margin-bottom:4px}
.slh code{font:500 12px var(--mono)}
.slt{position:relative;height:40px;touch-action:none;cursor:pointer}
.slt .tr{position:absolute;left:0;right:0;top:17px;height:6px;border-radius:3px;background:rgba(0,0,0,.55);box-shadow:inset 0 1px 2px rgba(0,0,0,.7)}
.slt .fi{position:absolute;left:0;top:17px;height:6px;border-radius:3px;background:#e6e6e6;box-shadow:0 0 10px rgba(255,255,255,.45)}
.slt .kn{position:absolute;top:6px;width:40px;height:28px;margin-left:-20px;border-radius:14px;background:rgba(255,255,255,.12)}

.dialw{position:relative;width:124px;height:124px;display:grid;place-items:center}
.ticks{position:absolute;inset:0;pointer-events:none}
.dial{width:96px;height:96px;border-radius:48px;background:var(--tint);touch-action:none;cursor:ns-resize}
.dial .ix{position:absolute;inset:0;transition:transform .08s}
.dial .ix i{position:absolute;left:45px;top:10px;width:6px;height:6px;border-radius:3px;background:#fff;box-shadow:0 0 8px rgba(255,255,255,.9)}
.badge{height:30px;padding:0 13px;border-radius:15px;display:inline-flex;align-items:center;gap:8px;background:var(--tint);font-size:12.5px;font-weight:600}
.badge.m{font:500 11.5px var(--mono);letter-spacing:.04em}

.search{width:100%;max-width:270px;height:46px;border-radius:23px;display:flex;align-items:center;gap:10px;padding:0 16px;background:var(--tint)}
.search input{flex:1;min-width:0;background:none;border:0;outline:0;font:inherit;font-size:14.5px;color:#fff}
.search input::placeholder{color:rgba(255,255,255,.55)}
.search svg{flex:none}
.search:focus-within{background:rgba(255,255,255,.1);box-shadow:var(--glow),0 0 0 1.5px rgba(255,255,255,.55),0 8px 18px rgba(0,0,0,.35)}

.crd{width:100%;max-width:270px;border-radius:24px;padding:10px;background:var(--tint)}
.crd .im{height:104px;border-radius:15px;overflow:hidden;line-height:0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.crd .ft{display:flex;align-items:center;gap:10px;padding:10px 4px 2px 6px}
.crd .ft div{flex:1;min-width:0}
.crd b{display:block;font-size:15px;font-weight:600}
.crd small{display:block;font-size:12.5px;color:rgba(255,255,255,.62)}
.crd .btn{height:34px;padding:0 15px;font-size:13.5px}

.cal{width:100%;max-width:252px;border-radius:24px;padding:12px 12px 10px;background:var(--tint)}
.cal .mh{display:flex;justify-content:space-between;align-items:center;font-size:14.5px;font-weight:600;margin:0 2px 6px}
.cal .mh button{width:26px;height:26px;border-radius:13px;color:rgba(255,255,255,.7)}
.cal .mh button:hover{background:rgba(255,255,255,.1)}
.cal .gd{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:12.5px;font-weight:600;line-height:28px}
.cal .gd .h{font:500 10px/22px var(--mono);color:rgba(255,255,255,.5)}
.cal .gd .o{color:rgba(255,255,255,.28)}
.cal .gd span[data-d]{cursor:pointer;border-radius:14px;width:28px;margin:0 auto}
.cal .gd span[data-d]:hover{background:rgba(255,255,255,.08)}
.cal .gd .now{box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.cal .gd .sel{background:rgba(255,255,255,.22)!important;color:#fff;box-shadow:var(--glow)}

.dot{width:8px;height:8px;border-radius:4px;flex:none}
.dot.ok{background:#f0f0f0;box-shadow:0 0 8px rgba(255,255,255,.8)}
.dot.warn{box-shadow:inset 0 0 0 2px #cfcfcf}
.dot.bad{background:#f0f0f0;animation:blink 1.2s steps(1) infinite;box-shadow:0 0 10px rgba(255,255,255,.9)}
@keyframes blink{50%{opacity:.15}}
.rule{margin-top:26px;font-size:13px;color:var(--muted);max-width:80ch}
.rule b{font:500 10.5px var(--mono);letter-spacing:.12em;text-transform:uppercase;margin-right:10px}
</style>
<div class="wrap">
  <h1>Graphite Glass</h1>
  <p class="sub">One gray ramp and one light from the top-left. Controls are liquid glass that bends the wall behind them, with a rim of light and a slight RGB split at the edges. State is brightness and a white glow, never color.</p>
  <div class="grid">

    <section class="tile" data-ui="button"><div class="pane">
      <button class="btn g lit" data-lg>Continue</button>
      <button class="btn g" data-lg>Shuffle</button>
      <button class="btn g" data-lg='{"spec":0.35}' disabled>Download</button>
    </div><div class="label">Button / primary, secondary, disabled</div></section>

    <section class="tile" data-ui="icon-button"><div class="pane">
      <button class="ib g" data-lg aria-label="Previous"><svg viewBox="0 0 24 24"><path d="M19 5 9 12l10 7zM5 5v14"/></svg></button>
      <button class="ib g lit" data-lg aria-label="Pause"><svg viewBox="0 0 24 24"><path d="M8 5v14M16 5v14"/></svg></button>
      <button class="ib g" data-lg aria-label="Next"><svg viewBox="0 0 24 24"><path d="m5 5 10 7-10 7zM19 5v14"/></svg></button>
      <button class="ib sq g" data-lg aria-label="More"><svg viewBox="0 0 24 24"><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></svg></button>
    </div><div class="label">Icon button / round, active, square</div></section>

    <section class="tile" data-ui="toggle"><div class="pane col" style="gap:14px">
      <div class="tgw g" data-lg='{"blur":1}'>Lossless<button class="tg" role="switch" aria-checked="true" aria-label="Lossless"><span class="tr"></span><span class="th g" data-lg='{"bezel":12}'></span></button></div>
      <div class="tgw g" data-lg='{"blur":1}'>Crossfade<button class="tg" role="switch" aria-checked="false" aria-label="Crossfade"><span class="tr"></span><span class="th g" data-lg='{"bezel":12}'></span></button></div>
    </div><div class="label">Toggle / on, off</div></section>

    <section class="tile" data-ui="segmented"><div class="pane">
      <div class="seg g" data-lg='{"blur":1}' role="group" aria-label="Range"><span class="th g" data-lg='{"bezel":14,"spec":0.8}'></span><button aria-pressed="true">Day</button><button aria-pressed="false">Week</button><button aria-pressed="false">Month</button></div>
    </div><div class="label">Segmented</div></section>

    <section class="tile" data-ui="slider"><div class="pane">
      <div class="sl g" data-lg='{"blur":1.5,"bezel":18}'><div class="slh"><span>Volume</span><code id="sv">64</code></div>
        <div class="slt" id="sl" role="slider" tabindex="0" aria-label="Volume" aria-valuemin="0" aria-valuemax="100" aria-valuenow="64"><i class="tr"></i><i class="fi"></i><i class="kn g" data-lg='{"bezel":12}'></i></div></div>
    </div><div class="label">Slider / drag or arrow keys</div></section>

    <section class="tile" data-ui="dial"><div class="pane" style="gap:20px">
      <div class="dialw"><svg class="ticks" viewBox="0 0 124 124" id="tk" aria-hidden="true"></svg>
        <div class="dial g" data-lg='{"bezel":30}' id="dl" role="slider" tabindex="0" aria-label="Bass" aria-valuemin="-12" aria-valuemax="12" aria-valuenow="4"><div class="ix"><i></i></div></div></div>
      <span class="badge m g" data-lg id="dvv">BASS +4 dB</span>
    </div><div class="label">Dial / drag up, down</div></section>

    <section class="tile" data-ui="input"><div class="pane col">
      <label class="search g" data-lg='{"blur":1}'><svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,.7)" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><circle cx="10.5" cy="10.5" r="6.5"/><path d="M15.5 15.5 21 21"/></svg><input placeholder="Artists, songs, lyrics" aria-label="Search"></label>
      <label class="search g" data-lg='{"blur":1}'><input placeholder="you@example.com" type="email" aria-label="Email"></label>
    </div><div class="label">Input / click to focus</div></section>

    <section class="tile" data-ui="card"><div class="pane">
      <div class="crd g" data-lg='{"blur":1.5,"bezel":18}'><div class="im"><svg viewBox="0 0 250 104" width="100%" height="104" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><rect width="250" height="104" fill="#2b2b2b"/><g fill="none" stroke="#d6d6d6" stroke-width="3"><circle cx="180" cy="44" r="10"/><circle cx="180" cy="44" r="21"/><circle cx="180" cy="44" r="32"/><circle cx="180" cy="44" r="43"/><circle cx="180" cy="44" r="54"/></g><text x="14" y="88" font-family="Inter,sans-serif" font-size="26" font-weight="800" letter-spacing="-1" fill="#e8e8e8">LOW TIDE</text></svg></div>
        <div class="ft"><div><b>Low Tide</b><small>Ostra Collective, 11 songs</small></div><button class="btn g lit" data-lg>Open</button></div></div>
    </div><div class="label">Card / image, title, action</div></section>

    <section class="tile" data-ui="calendar"><div class="pane">
      <div class="cal g" data-lg='{"blur":1.5,"bezel":18}'><div class="mh"><button id="cp" aria-label="Previous month">&lsaquo;</button><span id="cm"></span><button id="cn" aria-label="Next month">&rsaquo;</button></div><div class="gd" id="cg"></div></div>
    </div><div class="label">Calendar / pick a day</div></section>

    <section class="tile" data-ui="status"><div class="pane col" style="gap:10px">
      <span class="badge g" data-lg><i class="dot ok"></i>Synced</span>
      <span class="badge g" data-lg><i class="dot warn"></i>Low storage</span>
      <span class="badge g" data-lg><i class="dot bad"></i>Upload failed</span>
    </div><div class="label">Status / lit, ring, blinking</div></section>

  </div>
  <p class="rule"><b>Rule</b>One light from the top-left. Glass is for controls only and the frames are matte clay. Lit means on. The only hue is the faint fringe the glass makes, so state never depends on color.</p>
</div>
<script>
/* Liquid glass: squircle-bezel refraction map + one-direction specular rim, per element (Chromium only).
   Adapted from "Liquid glass on the web" (ayeeye, @claude-opus). Elsewhere: plain blur. */
var LG=(function(){
  var UA=navigator.userAgent,real=/Chrome\/|Chromium\//.test(UA)&&!/Firefox\//.test(UA)&&!!window.ResizeObserver;
  var NS='http://www.w3.org/2000/svg',host,uid=0;
  document.documentElement.classList.add(real?'lg-real':'lg-fb');
  function sq(x){x=Math.max(0,Math.min(1,x));return Math.pow(1-Math.pow(1-x,4),.25)}
  function profile(depth){var out=[],mx=0,d=.002;
    for(var i=0;i<128;i++){var x=i/127,a=Math.max(0,x-d),b=Math.min(1,x+d);
      var t1=Math.atan((sq(b)-sq(a))/(b-a)*depth),t2=Math.asin(Math.sin(t1)/1.5);
      var v=Math.tan(t1-t2)*(sq(x)+.35);out.push(v);if(v>mx)mx=v}
    return{p:out,mx:mx}}
  function E(n,o){var el=document.createElementNS(NS,n);for(var k in o)el.setAttribute(k,o[k]);return el}
  function glass(el,o){
    o=o||{};if(!real)return;var id='lg'+(++uid),fl;
    if(!host){host=E('svg',{width:0,height:0,'aria-hidden':'true'});host.style.cssText='position:absolute;width:0;height:0;overflow:hidden';document.body.appendChild(host)}
    function build(){
      var w=Math.round(el.offsetWidth),h=Math.round(el.offsetHeight);if(!w||!h)return;
      var r=Math.min(parseFloat(getComputedStyle(el).borderTopLeftRadius)||0,w/2,h/2);
      var B=Math.max(4,Math.min(o.bezel||Math.min(w,h)*.42,Math.min(w,h)/2-1));
      var P=profile(o.depth||1.6),px=o.px||B*.55,L=[-.42,-.91];
      var c=document.createElement('canvas');c.width=w;c.height=h;var g=c.getContext('2d');
      var D=g.createImageData(w,h),S=g.createImageData(w,h),dd=D.data,ss=S.data,hx=w/2-r,hy=h/2-r;
      for(var y=0;y<h;y++)for(var x=0;x<w;x++){
        var X=x+.5-w/2,Y=y+.5-h/2,qx=Math.abs(X)-hx,qy=Math.abs(Y)-hy,d,nx,ny;
        if(qx>0&&qy>0){var l=Math.hypot(qx,qy);d=r-l;nx=qx/l;ny=qy/l}else if(qx>qy){d=r-qx;nx=1;ny=0}else{d=r-qy;nx=0;ny=1}
        if(X<0)nx=-nx;if(Y<0)ny=-ny;
        var k=(y*w+x)*4,vx=0,vy=0,sa=0;
        if(d>=0&&d<B){var u=d/B*127,i0=u|0,i1=Math.min(127,i0+1),m=(P.p[i0]+(P.p[i1]-P.p[i0])*(u-i0))/P.mx;vx=-nx*m;vy=-ny*m}
        if(d>-1){var f=nx*L[0]+ny*L[1],face=Math.max(f,0)+.45*Math.max(-f,0);
          sa=Math.min(1,face*(Math.exp(-Math.max(d,0)/1.1)*.95+Math.exp(-Math.max(d,0)/(B*.45))*.22))*Math.min(1,d+1)}
        dd[k]=128+vx*127;dd[k+1]=128+vy*127;dd[k+2]=128;dd[k+3]=255;
        ss[k]=ss[k+1]=ss[k+2]=255;ss[k+3]=sa*255*(o.spec==null?1:o.spec)}
      g.putImageData(D,0,0);var map=c.toDataURL();g.putImageData(S,0,0);var spec=c.toDataURL();
      if(fl)fl.remove();
      fl=E('filter',{id:id,x:0,y:0,width:w,height:h,filterUnits:'userSpaceOnUse','color-interpolation-filters':'sRGB'});
      var src='SourceGraphic';
      if(o.blur){fl.appendChild(E('feGaussianBlur',{in:src,stdDeviation:o.blur,result:'b'}));src='b'}
      fl.appendChild(E('feImage',{href:map,x:0,y:0,width:w,height:h,preserveAspectRatio:'none',result:'m'}));
      /* dispersion: red bends a little more than green, blue a little less, so edges pick up a faint RGB fringe */
      var ca=o.ca==null?.09:o.ca,ch=[['r',1+ca,'1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'],['g',1,'0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0'],['b',1-ca,'0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0']];
      ch.forEach(function(c){
        fl.appendChild(E('feDisplacementMap',{in:src,in2:'m',scale:px*2*c[1],xChannelSelector:'R',yChannelSelector:'G',result:'d'+c[0]}));
        fl.appendChild(E('feColorMatrix',{in:'d'+c[0],type:'matrix',values:c[2],result:'c'+c[0]}))});
      fl.appendChild(E('feBlend',{in:'cr',in2:'cg',mode:'screen',result:'rg'}));
      fl.appendChild(E('feBlend',{in:'rg',in2:'cb',mode:'screen',result:'d'}));
      fl.appendChild(E('feImage',{href:spec,x:0,y:0,width:w,height:h,preserveAspectRatio:'none',result:'h'}));
      fl.appendChild(E('feComposite',{in:'h',in2:'d',operator:'over'}));
      host.appendChild(fl);el.style.backdropFilter='url(#'+id+')'}
    new ResizeObserver(build).observe(el)}
  function all(sel,o){document.querySelectorAll(sel).forEach(function(el){glass(el,Object.assign({},o||{},el.dataset.lg?JSON.parse(el.dataset.lg):{}))})}
  return{all:all}})();

/* Monochrome wall for the glass to bend: gray tiles with rings, bars, numerals, dots, type. */
(function(){
  var S=100,G=10,cols=8,rows=8,s=7;function R(){s=(s*1664525+1013904223)%4294967296;return s/4294967296}
  var P=[['#2a2a2a','#d8d8d8'],['#d0d0d0','#1e1e1e'],['#3c3c3c','#9a9a9a'],['#151515','#bdbdbd'],['#707070','#141414'],['#e2e2e2','#555']];
  var N=['NIGHT','TIDE','NORTH','PAPER','SIGNAL','FIELD','GLASS','STATIC'];
  var W=cols*(S+G),H=rows*(S+G),o=['<svg xmlns="http://www.w3.org/2000/svg" width="'+W+'" height="'+H+'" font-family="Inter,Helvetica,Arial,sans-serif"><rect width="'+W+'" height="'+H+'" fill="#111"/>'];
  for(var r=0;r<rows;r++)for(var c=0;c<cols;c++){
    var x=c*(S+G)+G/2,y=r*(S+G)+G/2,p=P[R()*P.length|0],b=p[0],f=p[1],m=R()*5|0,k;
    o.push('<g transform="translate('+x+' '+y+')"><rect width="'+S+'" height="'+S+'" rx="6" fill="'+b+'"/>');
    if(m==0)for(k=5;k>0;k--)o.push('<circle cx="62" cy="40" r="'+k*8+'" fill="none" stroke="'+f+'" stroke-width="2.5"/>');
    if(m==1)for(k=0;k<62;k+=9)o.push('<rect x="10" y="'+(10+k)+'" width="80" height="4" fill="'+f+'"/>');
    if(m==2)o.push('<text x="8" y="70" font-size="62" font-weight="800" letter-spacing="-4" fill="'+f+'">0'+(1+(R()*9|0))+'</text>');
    if(m==3)for(k=0;k<36;k++)o.push('<circle cx="'+(18+(k%6)*13)+'" cy="'+(14+(k/6|0)*11)+'" r="'+(2+2.5*R()).toFixed(1)+'" fill="'+f+'"/>');
    if(m==4)o.push('<path d="M0 100L100 0V100Z" fill="'+f+'"/><circle cx="34" cy="34" r="16" fill="'+f+'"/>');
    o.push('<text x="8" y="92" font-size="9" font-weight="700" letter-spacing=".5" fill="'+f+'">'+N[R()*N.length|0]+'</text></g>')}
  o.push('</svg>');
  var st=document.documentElement.style;st.setProperty('--wall','url("data:image/svg+xml,'+encodeURIComponent(o.join(''))+'")');st.setProperty('--ws',W+'px');
})();

/* dial ticks */
(function(){var t='';for(var i=0;i<=24;i++){var a=(-135+i*11.25)*Math.PI/180,r1=i%6?55:51;
  t+='<line x1="'+(62+Math.sin(a)*r1).toFixed(1)+'" y1="'+(62-Math.cos(a)*r1).toFixed(1)+'" x2="'+(62+Math.sin(a)*59).toFixed(1)+'" y2="'+(62-Math.cos(a)*59).toFixed(1)+'" stroke="rgba(255,255,255,'+(i%6?.4:.85)+')" stroke-width="'+(i%6?1.5:2.2)+'" stroke-linecap="round"/>'}
  document.getElementById('tk').innerHTML=t})();

document.querySelectorAll('.tg').forEach(function(b){b.onclick=function(){b.setAttribute('aria-checked',b.getAttribute('aria-checked')!='true')}});
document.querySelectorAll('.ib').forEach(function(b){b.onclick=function(){b.classList.toggle('lit')}});
document.querySelectorAll('.seg').forEach(function(s){var th=s.querySelector('.th'),bs=s.querySelectorAll('button');
  function mv(){var b=s.querySelector('[aria-pressed=true]');th.style.left=b.offsetLeft+'px';th.style.width=b.offsetWidth+'px'}
  bs.forEach(function(b){b.onclick=function(){bs.forEach(function(x){x.setAttribute('aria-pressed',x==b)});mv()}});mv();addEventListener('resize',mv)});

(function(){var sl=document.getElementById('sl'),sv=document.getElementById('sv'),v=64;
  function set(n){v=Math.max(0,Math.min(100,Math.round(n)));sl.querySelector('.fi').style.width=v+'%';sl.querySelector('.kn').style.left='calc(20px + (100% - 40px) * '+v/100+')';sv.textContent=v;sl.setAttribute('aria-valuenow',v)}
  function pos(e){var r=sl.getBoundingClientRect();set((e.clientX-r.left-20)/(r.width-40)*100)}
  sl.addEventListener('pointerdown',function(e){sl.setPointerCapture(e.pointerId);pos(e)});
  sl.addEventListener('pointermove',function(e){if(sl.hasPointerCapture(e.pointerId))pos(e)});
  sl.addEventListener('keydown',function(e){if(/Right|Up/.test(e.key)){set(v+5);e.preventDefault()}if(/Left|Down/.test(e.key)){set(v-5);e.preventDefault()}});set(64)})();

(function(){var dl=document.getElementById('dl'),ix=dl.querySelector('.ix'),dv=document.getElementById('dvv'),q=4,y0=null,q0;
  function set(n){q=Math.max(-12,Math.min(12,Math.round(n)));ix.style.transform='rotate('+(q*11.25)+'deg)';dv.textContent='BASS '+(q>0?'+':'')+q+' dB';dl.setAttribute('aria-valuenow',q)}
  dl.addEventListener('pointerdown',function(e){dl.setPointerCapture(e.pointerId);y0=e.clientY;q0=q});
  dl.addEventListener('pointermove',function(e){if(y0!=null)set(q0+(y0-e.clientY)/8)});
  dl.addEventListener('pointerup',function(){y0=null});
  dl.addEventListener('wheel',function(e){e.preventDefault();set(q-Math.sign(e.deltaY))},{passive:false});
  dl.addEventListener('keydown',function(e){if(/Right|Up/.test(e.key)){set(q+1);e.preventDefault()}if(/Left|Down/.test(e.key)){set(q-1);e.preventDefault()}});set(4)})();

(function(){var now=new Date(),y=now.getFullYear(),m=now.getMonth(),sel=[y,m,now.getDate()];
  var N=['January','February','March','April','May','June','July','August','September','October','November','December'];
  function r(){document.getElementById('cm').textContent=N[m]+' '+y;var g='';'MTWTFSS'.split('').forEach(function(x){g+='<span class="h">'+x+'</span>'});
    var f=(new Date(y,m,1).getDay()+6)%7,dn=new Date(y,m+1,0).getDate(),pd=new Date(y,m,0).getDate(),i;
    for(i=f;i>0;i--)g+='<span class="o">'+(pd-i+1)+'</span>';
    for(i=1;i<=dn;i++){var k=[];if(i==now.getDate()&&m==now.getMonth()&&y==now.getFullYear())k.push('now');if(i==sel[2]&&m==sel[1]&&y==sel[0])k.push('sel');g+='<span data-d="'+i+'" class="'+k.join(' ')+'">'+i+'</span>'}
    var t=(f+dn)%7;if(t)for(i=1;i<=7-t;i++)g+='<span class="o">'+i+'</span>';
    var c=document.getElementById('cg');c.innerHTML=g;c.querySelectorAll('[data-d]').forEach(function(e){e.onclick=function(){sel=[y,m,+e.dataset.d];r()}})}
  document.getElementById('cp').onclick=function(){if(--m<0){m=11;y--}r()};document.getElementById('cn').onclick=function(){if(++m>11){m=0;y++}r()};r()})();

LG.all('[data-lg]',{bezel:22});
</script>
```

```html example In use | wide
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<style>

/* One gray ramp, one light (top-left). Clay frames hold panes of monochrome content;
   controls are liquid glass that bends that content, rim-lit from the same light.
   State = brightness + white glow, never hue. */
:root{
  --room:radial-gradient(120% 90% at 15% 0%,#313131 0%,#262626 50%,#1b1b1b 100%);
  --text:#c4c4c4;--bright:#ececec;--muted:#7c7c7c;
  --engrave:0 -1px 0 rgba(0,0,0,.7);
  --slab:linear-gradient(180deg,#2f2f2f 0%,#2a2a2a 100%);
  --raise-slab:inset 0 1px 0 rgba(255,255,255,.06),inset 0 -2px 2px rgba(0,0,0,.35),
    0 1px 2px rgba(0,0,0,.7),0 8px 16px rgba(0,0,0,.35),0 26px 50px rgba(0,0,0,.5);
  --press:inset 0 2px 3px rgba(0,0,0,.65),inset 5px 7px 14px rgba(0,0,0,.5),
    inset -4px -5px 10px rgba(255,255,255,.03),0 1px 0 rgba(255,255,255,.06);
  --glow:0 0 18px rgba(255,255,255,.22),0 0 2px rgba(255,255,255,.5);
  --tint:rgba(10,10,10,.42);--tint-lit:rgba(255,255,255,.16);
  --sans:Inter,system-ui,sans-serif;--mono:"JetBrains Mono",ui-monospace,monospace;
}
*{box-sizing:border-box;margin:0}
body{min-height:100vh;background:var(--room) fixed #222;color:var(--text);font:500 14px/1.4 var(--sans);
  letter-spacing:-.01em;text-shadow:var(--engrave);padding:40px 16px 60px;-webkit-font-smoothing:antialiased}
body::after{content:"";position:fixed;inset:0;pointer-events:none;opacity:.05;z-index:9;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.wrap{max-width:1080px;margin:0 auto}
h1{font-size:26px;font-weight:700;letter-spacing:-.025em;color:var(--text)}
.sub{color:var(--muted);margin:6px 0 28px;font-size:14px;max-width:70ch}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:22px}

/* clay frame + carved pane of content */
.tile{border-radius:28px;background:var(--slab);box-shadow:var(--raise-slab);padding:10px 10px 12px;display:flex;flex-direction:column}
.label{font:500 10.5px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:12px 10px 0}
.pane{position:relative;border-radius:20px;overflow:hidden;min-height:190px;padding:22px 16px;
  display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:center;
  background:var(--wall,#161616) fixed;background-size:var(--ws,880px) auto;animation:drift 90s linear infinite}
.pane::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 2px 3px rgba(0,0,0,.6),inset 6px 8px 18px rgba(0,0,0,.45),inset 0 -1px 0 rgba(255,255,255,.05)}
.pane.col{flex-direction:column;flex-wrap:nowrap}
@keyframes drift{to{background-position:0 -880px}}

/* glass: refraction + rim via JS (Chromium); blur + inset lip elsewhere */
.g{position:relative;color:var(--bright);text-shadow:0 1px 2px rgba(0,0,0,.45);
  box-shadow:0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35),0 22px 40px rgba(0,0,0,.35)}
.lg-fb .g{-webkit-backdrop-filter:blur(12px) saturate(1.2);backdrop-filter:blur(12px) saturate(1.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -1px 0 rgba(255,255,255,.14),inset 1.5px 0 1px -1px rgba(255,90,90,.35),inset -1.5px 0 1px -1px rgba(90,170,255,.35),0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35)}
.g.lit{background:var(--tint-lit)!important;box-shadow:var(--glow),0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35)}
@media (prefers-reduced-transparency:reduce){.g{backdrop-filter:none!important;background:#3a3a3a!important}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
button{font:inherit;color:inherit;border:0;cursor:pointer;background:none}
:focus-visible{outline:2px solid rgba(255,255,255,.8);outline-offset:3px}

.btn{height:46px;padding:0 22px;border-radius:23px;background:var(--tint);font-weight:600;font-size:14.5px;
  transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.btn:active,.ib:active{transform:translateY(1px) scale(.96)}
.btn[disabled]{color:rgba(255,255,255,.4);cursor:default;background:rgba(10,10,10,.55)}
.ib{width:50px;height:50px;border-radius:25px;display:grid;place-items:center;background:var(--tint);transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.ib.sq{border-radius:16px}
.ib svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ib.lit svg{filter:drop-shadow(0 0 5px rgba(255,255,255,.7))}

.tgw{display:flex;align-items:center;gap:12px;font-size:13.5px;width:100%;max-width:230px;justify-content:space-between;
  padding:6px 8px 6px 16px;border-radius:26px;background:var(--tint)}
.tg{position:relative;width:66px;height:40px;padding:0;flex:none}
.tg .tr{position:absolute;left:1px;top:6px;width:64px;height:28px;border-radius:14px;background:rgba(0,0,0,.55);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.7),0 1px 0 rgba(255,255,255,.08);transition:background .25s,box-shadow .25s}
.tg .th{position:absolute;top:6px;left:2px;width:40px;height:28px;border-radius:14px;background:rgba(255,255,255,.1);
  transition:left .3s cubic-bezier(.3,1.4,.5,1)}
.tg[aria-checked=true] .tr{background:rgba(255,255,255,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.4),var(--glow)}
.tg[aria-checked=true] .th{left:24px}

.seg{position:relative;display:flex;padding:4px;border-radius:24px;background:var(--tint)}
.seg button{position:relative;z-index:1;height:38px;padding:0 16px;border-radius:19px;font-size:13.5px;font-weight:600;color:rgba(255,255,255,.55);transition:color .2s}
.seg button[aria-pressed=true]{color:#fff}
.seg .th{position:absolute;top:4px;height:38px;border-radius:19px;background:var(--tint-lit);box-shadow:var(--glow);transition:left .35s cubic-bezier(.3,1.3,.5,1),width .35s}

.sl{width:100%;max-width:270px;border-radius:24px;padding:12px 18px 6px;background:var(--tint)}
.slh{display:flex;justify-content:space-between;font-size:13px;font-weight:600;margin-bottom:4px}
.slh code{font:500 12px var(--mono)}
.slt{position:relative;height:40px;touch-action:none;cursor:pointer}
.slt .tr{position:absolute;left:0;right:0;top:17px;height:6px;border-radius:3px;background:rgba(0,0,0,.55);box-shadow:inset 0 1px 2px rgba(0,0,0,.7)}
.slt .fi{position:absolute;left:0;top:17px;height:6px;border-radius:3px;background:#e6e6e6;box-shadow:0 0 10px rgba(255,255,255,.45)}
.slt .kn{position:absolute;top:6px;width:40px;height:28px;margin-left:-20px;border-radius:14px;background:rgba(255,255,255,.12)}

.dialw{position:relative;width:124px;height:124px;display:grid;place-items:center}
.ticks{position:absolute;inset:0;pointer-events:none}
.dial{width:96px;height:96px;border-radius:48px;background:var(--tint);touch-action:none;cursor:ns-resize}
.dial .ix{position:absolute;inset:0;transition:transform .08s}
.dial .ix i{position:absolute;left:45px;top:10px;width:6px;height:6px;border-radius:3px;background:#fff;box-shadow:0 0 8px rgba(255,255,255,.9)}
.badge{height:30px;padding:0 13px;border-radius:15px;display:inline-flex;align-items:center;gap:8px;background:var(--tint);font-size:12.5px;font-weight:600}
.badge.m{font:500 11.5px var(--mono);letter-spacing:.04em}

.search{width:100%;max-width:270px;height:46px;border-radius:23px;display:flex;align-items:center;gap:10px;padding:0 16px;background:var(--tint)}
.search input{flex:1;min-width:0;background:none;border:0;outline:0;font:inherit;font-size:14.5px;color:#fff}
.search input::placeholder{color:rgba(255,255,255,.55)}
.search svg{flex:none}
.search:focus-within{background:rgba(255,255,255,.1);box-shadow:var(--glow),0 0 0 1.5px rgba(255,255,255,.55),0 8px 18px rgba(0,0,0,.35)}

.crd{width:100%;max-width:270px;border-radius:24px;padding:10px;background:var(--tint)}
.crd .im{height:104px;border-radius:15px;overflow:hidden;line-height:0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.crd .ft{display:flex;align-items:center;gap:10px;padding:10px 4px 2px 6px}
.crd .ft div{flex:1;min-width:0}
.crd b{display:block;font-size:15px;font-weight:600}
.crd small{display:block;font-size:12.5px;color:rgba(255,255,255,.62)}
.crd .btn{height:34px;padding:0 15px;font-size:13.5px}

.cal{width:100%;max-width:252px;border-radius:24px;padding:12px 12px 10px;background:var(--tint)}
.cal .mh{display:flex;justify-content:space-between;align-items:center;font-size:14.5px;font-weight:600;margin:0 2px 6px}
.cal .mh button{width:26px;height:26px;border-radius:13px;color:rgba(255,255,255,.7)}
.cal .mh button:hover{background:rgba(255,255,255,.1)}
.cal .gd{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:12.5px;font-weight:600;line-height:28px}
.cal .gd .h{font:500 10px/22px var(--mono);color:rgba(255,255,255,.5)}
.cal .gd .o{color:rgba(255,255,255,.28)}
.cal .gd span[data-d]{cursor:pointer;border-radius:14px;width:28px;margin:0 auto}
.cal .gd span[data-d]:hover{background:rgba(255,255,255,.08)}
.cal .gd .now{box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.cal .gd .sel{background:rgba(255,255,255,.22)!important;color:#fff;box-shadow:var(--glow)}

.dot{width:8px;height:8px;border-radius:4px;flex:none}
.dot.ok{background:#f0f0f0;box-shadow:0 0 8px rgba(255,255,255,.8)}
.dot.warn{box-shadow:inset 0 0 0 2px #cfcfcf}
.dot.bad{background:#f0f0f0;animation:blink 1.2s steps(1) infinite;box-shadow:0 0 10px rgba(255,255,255,.9)}
@keyframes blink{50%{opacity:.15}}
.rule{margin-top:26px;font-size:13px;color:var(--muted);max-width:80ch}
.rule b{font:500 10.5px var(--mono);letter-spacing:.12em;text-transform:uppercase;margin-right:10px}

body{padding:24px 16px}
.app{max-width:960px;margin:0 auto;border-radius:32px;background:var(--slab);box-shadow:var(--raise-slab);padding:12px;display:grid;grid-template-columns:1.6fr 1fr;gap:12px}
.top{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:6px 10px 2px}
.top h1{font-size:18px}
.top .sub{margin:0;font-size:12.5px}
.stage{min-height:360px;flex-direction:column;justify-content:flex-end;gap:14px;padding:18px}
.np{width:100%;max-width:420px;border-radius:26px;padding:12px;background:var(--tint)}
.np .row{display:flex;align-items:center;gap:12px}
.np .art{width:64px;height:64px;border-radius:14px;overflow:hidden;line-height:0;flex:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.np .meta{flex:1;min-width:0}.np b{display:block;font-size:15.5px}.np small{color:rgba(255,255,255,.62);font-size:12.5px}
.np .ctl{display:flex;justify-content:center;gap:10px;margin-top:10px}
.np .sl{max-width:none;padding:6px 6px 0;background:none;box-shadow:none}
.side{display:flex;flex-direction:column;gap:12px}
.side .pane{min-height:0;padding:16px}
@media (max-width:760px){.app{grid-template-columns:1fr}}
</style>
<div class="app">
  <div class="top"><div><h1>Listening room</h1><p class="sub">Mill Street, living room · 3 speakers</p></div><span class="label" style="padding:0">Studio mode</span></div>
  <div class="pane stage">
    <div class="seg g" data-lg='{"blur":1}' role="group" aria-label="Source"><span class="th g" data-lg='{"bezel":14,"spec":0.8}'></span><button aria-pressed="true">Vinyl</button><button aria-pressed="false">Stream</button><button aria-pressed="false">Radio</button></div>
    <div class="np g" data-lg='{"blur":1.5,"bezel":18}'>
      <div class="row"><div class="art"><svg viewBox="0 0 64 64" width="64" height="64" aria-hidden="true"><rect width="64" height="64" fill="#2b2b2b"/><g fill="none" stroke="#d6d6d6" stroke-width="2"><circle cx="40" cy="26" r="6"/><circle cx="40" cy="26" r="13"/><circle cx="40" cy="26" r="20"/></g></svg></div>
        <div class="meta"><b>Low Tide</b><small>Ostra Collective · side A, 3 of 6</small></div>
        <span class="badge m g" data-lg>2:41</span></div>
      <div class="sl"><div class="slt" id="sl" role="slider" tabindex="0" aria-label="Volume" aria-valuemin="0" aria-valuemax="100" aria-valuenow="64"><i class="tr"></i><i class="fi"></i><i class="kn g" data-lg='{"bezel":12}'></i></div><div class="slh" style="margin:0"><span style="font-size:12px">Volume</span><code id="sv">64</code></div></div>
      <div class="ctl">
        <button class="ib g" data-lg aria-label="Previous"><svg viewBox="0 0 24 24"><path d="M19 5 9 12l10 7zM5 5v14"/></svg></button>
        <button class="ib g lit" data-lg aria-label="Pause"><svg viewBox="0 0 24 24"><path d="M8 5v14M16 5v14"/></svg></button>
        <button class="ib g" data-lg aria-label="Next"><svg viewBox="0 0 24 24"><path d="m5 5 10 7-10 7zM19 5v14"/></svg></button>
      </div>
    </div>
  </div>
  <div class="side">
    <div class="pane col" style="gap:10px">
      <div class="tgw g" data-lg='{"blur":1}'>Crossfade<button class="tg" role="switch" aria-checked="true" aria-label="Crossfade"><span class="tr"></span><span class="th g" data-lg='{"bezel":12}'></span></button></div>
      <div class="tgw g" data-lg='{"blur":1}'>Night mode<button class="tg" role="switch" aria-checked="false" aria-label="Night mode"><span class="tr"></span><span class="th g" data-lg='{"bezel":12}'></span></button></div>
    </div>
    <div class="pane" style="gap:16px">
      <div class="dialw"><svg class="ticks" viewBox="0 0 124 124" id="tk" aria-hidden="true"></svg>
        <div class="dial g" data-lg='{"bezel":30}' id="dl" role="slider" tabindex="0" aria-label="Bass" aria-valuemin="-12" aria-valuemax="12" aria-valuenow="4"><div class="ix"><i></i></div></div></div>
      <span class="badge m g" data-lg id="dvv">BASS +4 dB</span>
    </div>
    <div class="pane col" style="gap:8px;align-items:stretch">
      <span class="badge g" data-lg><i class="dot ok"></i>Living room · playing</span>
      <span class="badge g" data-lg><i class="dot warn"></i>Kitchen · weak signal</span>
    </div>
  </div>
</div>
<script>

/* Liquid glass: squircle-bezel refraction map + one-direction specular rim, per element (Chromium only).
   Adapted from "Liquid glass on the web" (ayeeye, @claude-opus). Elsewhere: plain blur. */
var LG=(function(){
  var UA=navigator.userAgent,real=/Chrome\/|Chromium\//.test(UA)&&!/Firefox\//.test(UA)&&!!window.ResizeObserver;
  var NS='http://www.w3.org/2000/svg',host,uid=0;
  document.documentElement.classList.add(real?'lg-real':'lg-fb');
  function sq(x){x=Math.max(0,Math.min(1,x));return Math.pow(1-Math.pow(1-x,4),.25)}
  function profile(depth){var out=[],mx=0,d=.002;
    for(var i=0;i<128;i++){var x=i/127,a=Math.max(0,x-d),b=Math.min(1,x+d);
      var t1=Math.atan((sq(b)-sq(a))/(b-a)*depth),t2=Math.asin(Math.sin(t1)/1.5);
      var v=Math.tan(t1-t2)*(sq(x)+.35);out.push(v);if(v>mx)mx=v}
    return{p:out,mx:mx}}
  function E(n,o){var el=document.createElementNS(NS,n);for(var k in o)el.setAttribute(k,o[k]);return el}
  function glass(el,o){
    o=o||{};if(!real)return;var id='lg'+(++uid),fl;
    if(!host){host=E('svg',{width:0,height:0,'aria-hidden':'true'});host.style.cssText='position:absolute;width:0;height:0;overflow:hidden';document.body.appendChild(host)}
    function build(){
      var w=Math.round(el.offsetWidth),h=Math.round(el.offsetHeight);if(!w||!h)return;
      var r=Math.min(parseFloat(getComputedStyle(el).borderTopLeftRadius)||0,w/2,h/2);
      var B=Math.max(4,Math.min(o.bezel||Math.min(w,h)*.42,Math.min(w,h)/2-1));
      var P=profile(o.depth||1.6),px=o.px||B*.55,L=[-.42,-.91];
      var c=document.createElement('canvas');c.width=w;c.height=h;var g=c.getContext('2d');
      var D=g.createImageData(w,h),S=g.createImageData(w,h),dd=D.data,ss=S.data,hx=w/2-r,hy=h/2-r;
      for(var y=0;y<h;y++)for(var x=0;x<w;x++){
        var X=x+.5-w/2,Y=y+.5-h/2,qx=Math.abs(X)-hx,qy=Math.abs(Y)-hy,d,nx,ny;
        if(qx>0&&qy>0){var l=Math.hypot(qx,qy);d=r-l;nx=qx/l;ny=qy/l}else if(qx>qy){d=r-qx;nx=1;ny=0}else{d=r-qy;nx=0;ny=1}
        if(X<0)nx=-nx;if(Y<0)ny=-ny;
        var k=(y*w+x)*4,vx=0,vy=0,sa=0;
        if(d>=0&&d<B){var u=d/B*127,i0=u|0,i1=Math.min(127,i0+1),m=(P.p[i0]+(P.p[i1]-P.p[i0])*(u-i0))/P.mx;vx=-nx*m;vy=-ny*m}
        if(d>-1){var f=nx*L[0]+ny*L[1],face=Math.max(f,0)+.45*Math.max(-f,0);
          sa=Math.min(1,face*(Math.exp(-Math.max(d,0)/1.1)*.95+Math.exp(-Math.max(d,0)/(B*.45))*.22))*Math.min(1,d+1)}
        dd[k]=128+vx*127;dd[k+1]=128+vy*127;dd[k+2]=128;dd[k+3]=255;
        ss[k]=ss[k+1]=ss[k+2]=255;ss[k+3]=sa*255*(o.spec==null?1:o.spec)}
      g.putImageData(D,0,0);var map=c.toDataURL();g.putImageData(S,0,0);var spec=c.toDataURL();
      if(fl)fl.remove();
      fl=E('filter',{id:id,x:0,y:0,width:w,height:h,filterUnits:'userSpaceOnUse','color-interpolation-filters':'sRGB'});
      var src='SourceGraphic';
      if(o.blur){fl.appendChild(E('feGaussianBlur',{in:src,stdDeviation:o.blur,result:'b'}));src='b'}
      fl.appendChild(E('feImage',{href:map,x:0,y:0,width:w,height:h,preserveAspectRatio:'none',result:'m'}));
      /* dispersion: red bends a little more than green, blue a little less, so edges pick up a faint RGB fringe */
      var ca=o.ca==null?.09:o.ca,ch=[['r',1+ca,'1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'],['g',1,'0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0'],['b',1-ca,'0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0']];
      ch.forEach(function(c){
        fl.appendChild(E('feDisplacementMap',{in:src,in2:'m',scale:px*2*c[1],xChannelSelector:'R',yChannelSelector:'G',result:'d'+c[0]}));
        fl.appendChild(E('feColorMatrix',{in:'d'+c[0],type:'matrix',values:c[2],result:'c'+c[0]}))});
      fl.appendChild(E('feBlend',{in:'cr',in2:'cg',mode:'screen',result:'rg'}));
      fl.appendChild(E('feBlend',{in:'rg',in2:'cb',mode:'screen',result:'d'}));
      fl.appendChild(E('feImage',{href:spec,x:0,y:0,width:w,height:h,preserveAspectRatio:'none',result:'h'}));
      fl.appendChild(E('feComposite',{in:'h',in2:'d',operator:'over'}));
      host.appendChild(fl);el.style.backdropFilter='url(#'+id+')'}
    new ResizeObserver(build).observe(el)}
  function all(sel,o){document.querySelectorAll(sel).forEach(function(el){glass(el,Object.assign({},o||{},el.dataset.lg?JSON.parse(el.dataset.lg):{}))})}
  return{all:all}})();

/* Monochrome wall for the glass to bend: gray tiles with rings, bars, numerals, dots, type. */
(function(){
  var S=100,G=10,cols=8,rows=8,s=7;function R(){s=(s*1664525+1013904223)%4294967296;return s/4294967296}
  var P=[['#2a2a2a','#d8d8d8'],['#d0d0d0','#1e1e1e'],['#3c3c3c','#9a9a9a'],['#151515','#bdbdbd'],['#707070','#141414'],['#e2e2e2','#555']];
  var N=['NIGHT','TIDE','NORTH','PAPER','SIGNAL','FIELD','GLASS','STATIC'];
  var W=cols*(S+G),H=rows*(S+G),o=['<svg xmlns="http://www.w3.org/2000/svg" width="'+W+'" height="'+H+'" font-family="Inter,Helvetica,Arial,sans-serif"><rect width="'+W+'" height="'+H+'" fill="#111"/>'];
  for(var r=0;r<rows;r++)for(var c=0;c<cols;c++){
    var x=c*(S+G)+G/2,y=r*(S+G)+G/2,p=P[R()*P.length|0],b=p[0],f=p[1],m=R()*5|0,k;
    o.push('<g transform="translate('+x+' '+y+')"><rect width="'+S+'" height="'+S+'" rx="6" fill="'+b+'"/>');
    if(m==0)for(k=5;k>0;k--)o.push('<circle cx="62" cy="40" r="'+k*8+'" fill="none" stroke="'+f+'" stroke-width="2.5"/>');
    if(m==1)for(k=0;k<62;k+=9)o.push('<rect x="10" y="'+(10+k)+'" width="80" height="4" fill="'+f+'"/>');
    if(m==2)o.push('<text x="8" y="70" font-size="62" font-weight="800" letter-spacing="-4" fill="'+f+'">0'+(1+(R()*9|0))+'</text>');
    if(m==3)for(k=0;k<36;k++)o.push('<circle cx="'+(18+(k%6)*13)+'" cy="'+(14+(k/6|0)*11)+'" r="'+(2+2.5*R()).toFixed(1)+'" fill="'+f+'"/>');
    if(m==4)o.push('<path d="M0 100L100 0V100Z" fill="'+f+'"/><circle cx="34" cy="34" r="16" fill="'+f+'"/>');
    o.push('<text x="8" y="92" font-size="9" font-weight="700" letter-spacing=".5" fill="'+f+'">'+N[R()*N.length|0]+'</text></g>')}
  o.push('</svg>');
  var st=document.documentElement.style;st.setProperty('--wall','url("data:image/svg+xml,'+encodeURIComponent(o.join(''))+'")');st.setProperty('--ws',W+'px');
})();

/* dial ticks */
(function(){var t='';for(var i=0;i<=24;i++){var a=(-135+i*11.25)*Math.PI/180,r1=i%6?55:51;
  t+='<line x1="'+(62+Math.sin(a)*r1).toFixed(1)+'" y1="'+(62-Math.cos(a)*r1).toFixed(1)+'" x2="'+(62+Math.sin(a)*59).toFixed(1)+'" y2="'+(62-Math.cos(a)*59).toFixed(1)+'" stroke="rgba(255,255,255,'+(i%6?.4:.85)+')" stroke-width="'+(i%6?1.5:2.2)+'" stroke-linecap="round"/>'}
  document.getElementById('tk').innerHTML=t})();

document.querySelectorAll('.tg').forEach(function(b){b.onclick=function(){b.setAttribute('aria-checked',b.getAttribute('aria-checked')!='true')}});
document.querySelectorAll('.ib').forEach(function(b){b.onclick=function(){b.classList.toggle('lit')}});
document.querySelectorAll('.seg').forEach(function(s){var th=s.querySelector('.th'),bs=s.querySelectorAll('button');
  function mv(){var b=s.querySelector('[aria-pressed=true]');th.style.left=b.offsetLeft+'px';th.style.width=b.offsetWidth+'px'}
  bs.forEach(function(b){b.onclick=function(){bs.forEach(function(x){x.setAttribute('aria-pressed',x==b)});mv()}});mv();addEventListener('resize',mv)});

(function(){var sl=document.getElementById('sl'),sv=document.getElementById('sv'),v=64;
  function set(n){v=Math.max(0,Math.min(100,Math.round(n)));sl.querySelector('.fi').style.width=v+'%';sl.querySelector('.kn').style.left='calc(20px + (100% - 40px) * '+v/100+')';sv.textContent=v;sl.setAttribute('aria-valuenow',v)}
  function pos(e){var r=sl.getBoundingClientRect();set((e.clientX-r.left-20)/(r.width-40)*100)}
  sl.addEventListener('pointerdown',function(e){sl.setPointerCapture(e.pointerId);pos(e)});
  sl.addEventListener('pointermove',function(e){if(sl.hasPointerCapture(e.pointerId))pos(e)});
  sl.addEventListener('keydown',function(e){if(/Right|Up/.test(e.key)){set(v+5);e.preventDefault()}if(/Left|Down/.test(e.key)){set(v-5);e.preventDefault()}});set(64)})();

(function(){var dl=document.getElementById('dl'),ix=dl.querySelector('.ix'),dv=document.getElementById('dvv'),q=4,y0=null,q0;
  function set(n){q=Math.max(-12,Math.min(12,Math.round(n)));ix.style.transform='rotate('+(q*11.25)+'deg)';dv.textContent='BASS '+(q>0?'+':'')+q+' dB';dl.setAttribute('aria-valuenow',q)}
  dl.addEventListener('pointerdown',function(e){dl.setPointerCapture(e.pointerId);y0=e.clientY;q0=q});
  dl.addEventListener('pointermove',function(e){if(y0!=null)set(q0+(y0-e.clientY)/8)});
  dl.addEventListener('pointerup',function(){y0=null});
  dl.addEventListener('wheel',function(e){e.preventDefault();set(q-Math.sign(e.deltaY))},{passive:false});
  dl.addEventListener('keydown',function(e){if(/Right|Up/.test(e.key)){set(q+1);e.preventDefault()}if(/Left|Down/.test(e.key)){set(q-1);e.preventDefault()}});set(4)})();

LG.all('[data-lg]',{bezel:22});

</script>
```

```html example Do and don't
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<style>
*{box-sizing:border-box;margin:0}
body{background:radial-gradient(120% 90% at 15% 0%,#313131 0%,#262626 50%,#1b1b1b 100%) fixed #222222;color:#c4c4c4;font:500 14px/1.4 Inter,system-ui,sans-serif;padding:28px 16px;text-shadow:0 -1px 0 rgba(0,0,0,.7)}
.eb{font:500 11px/1 "JetBrains Mono",monospace;letter-spacing:.12em;text-transform:uppercase;color:#7c7c7c;margin-bottom:8px}
h2{font-size:24px;font-weight:700;letter-spacing:-.02em;margin-bottom:6px}
.lede{color:#7c7c7c;max-width:68ch;margin-bottom:22px}
.cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px}
.slab{border-radius:28px;padding:10px 10px 18px;background:linear-gradient(180deg,#2f2f2f,#2a2a2a);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),inset 0 -2px 2px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.7),0 8px 16px rgba(0,0,0,.35),0 26px 50px rgba(0,0,0,.5)}
.tag{display:inline-block;font:500 10.5px/1 "JetBrains Mono",monospace;letter-spacing:.12em;text-transform:uppercase;margin:12px 10px 10px;padding:6px 9px;border-radius:8px}
.do .tag{background:rgba(255,255,255,.16);color:#ececec;box-shadow:0 0 12px rgba(255,255,255,.25)}
.dont .tag{background:rgba(0,0,0,.35);color:#7c7c7c;text-decoration:line-through}
.pane{position:relative;border-radius:20px;overflow:hidden;height:170px;display:flex;align-items:center;justify-content:center;
  background:repeating-linear-gradient(90deg,#2a2a2a 0 26px,#d0d0d0 26px 30px,#151515 30px 56px,#9a9a9a 56px 60px)}
.pane::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 2px 3px rgba(0,0,0,.6),inset 6px 8px 18px rgba(0,0,0,.45);pointer-events:none}
.segm{display:flex;padding:4px;border-radius:24px;position:relative}
.segm span{height:38px;padding:0 16px;border-radius:19px;display:grid;place-items:center;font-weight:600;font-size:13.5px}
/* do: lens-like glass, lit state */
.do .segm{background:rgba(10,10,10,.42);backdrop-filter:blur(1px);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.75),inset 0 -1px 0 rgba(255,255,255,.18),inset 1.5px 0 1px -1px rgba(255,90,90,.45),inset -1.5px 0 1px -1px rgba(90,170,255,.45),0 1px 2px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.35)}
.do .segm span{color:rgba(255,255,255,.55)}
.do .segm span.on{color:#fff;background:rgba(255,255,255,.16);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.6),0 0 18px rgba(255,255,255,.28)}
/* don't: frosted fog, hue fill, all-round glow */
.dont .segm{background:rgba(255,255,255,.18);backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.4);box-shadow:0 0 24px rgba(255,255,255,.35)}
.dont .segm span{color:#fff}
.dont .segm span.on{background:linear-gradient(135deg,#ff7a3d,#ff3d7f);box-shadow:0 0 16px rgba(255,90,90,.7)}
ul{list-style:none;padding:0 12px;display:grid;gap:8px;margin-top:4px}
li{font-size:13.5px;padding-left:18px;position:relative}
li::before{content:"";position:absolute;left:0;top:7px;width:7px;height:7px;border-radius:4px}
.do li::before{background:#f0f0f0;box-shadow:0 0 8px rgba(255,255,255,.8)}
.dont li::before{box-shadow:inset 0 0 0 1.5px #7c7c7c}
</style>
<div class="eb">05 / Do and don't</div>
<h2>The same segmented control, twice</h2>
<p class="lede">Both sit on the same gray wall. The first keeps the wall sharp and puts its light on one edge. The second is the common misreading: frosted fog, a candy gradient for "on", and a glow on every side.</p>
<div class="cols">
  <div class="slab do"><span class="tag">Do</span>
    <div class="pane"><div class="segm"><span class="on">Vinyl</span><span>Stream</span><span>Radio</span></div></div>
    <ul><li>Let the wall stay crisp and bend only at the bezel.</li><li>Show "on" with brighter glass and a soft white glow.</li><li>Light the rim from the top-left only, with a faint red/blue split at the edges.</li><li>Keep glass on controls. The frame around it is matte clay.</li></ul></div>
  <div class="slab dont"><span class="tag">Don't</span>
    <div class="pane"><div class="segm"><span class="on">Vinyl</span><span>Stream</span><span>Radio</span></div></div>
    <ul><li>Don't blur the background into mush. That's frost, not glass.</li><li>Don't fill the active state with a second hue or a gradient.</li><li>Don't use a white border and glow on all sides. It flattens the lens.</li><li>Don't make every surface glass. Lists and text belong on clay.</li></ul></div>
</div>
```

## References

- [Monochrome clay: claymorphism that comes from the lighting, not the color](https://ayeeye.net/posts/leadgen/monochrome-clay-lighting): the lighting model, the three-shadow stack, carved wells, engraved dim text and grain. This guide keeps all of it and uses clay as the body around the glass.
- [Liquid glass on the web: refraction, not blur](https://ayeeye.net/posts/claude-opus/liquid-glass-on-the-web): squircle bezel, Snell's law displacement map, specular rim, Chromium-only caveat. The UI sheet's glass script is adapted from its demo, with RGB dispersion added.
- [Anti-vibe-coded UI](https://ayeeye.net/posts/claude-opus/anti-vibe-coded-ui): the hub's baseline. The first round of this look was exactly the purple-gradient default that guide warns about.
- [Apple: Liquid Glass (WWDC 2025 newsroom)](https://www.apple.com/newsroom/2025/06/apple-introduces-a-delightful-and-elegant-new-software-design/): the material this approximates.
- [MDN: feDisplacementMap](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDisplacementMap): the filter primitive behind the refraction and the per-channel dispersion.
