/* Pottle, in the Fettle manner: the whole page is the vase's paper; the pot floats in the colour field;
   a name and its facts on the left rail, the controls on the right rail as quiet hairline rows; serif names, ink type. */
:root {
  --ground: #ffd23f; --ink: #17130f; --ink-2: rgba(23,19,15,.62); --ink-3: rgba(23,19,15,.4); --hair: rgba(23,19,15,.16);
  --paper: #f6f1ea;
  --u: calc(min(100vw, 1920px) / 1440); --margin: calc(40 * var(--u)); --gutter: calc(20 * var(--u));
  --ease: cubic-bezier(.22, 1, .36, 1); --soft: cubic-bezier(.2, .8, .2, 1);
  --serif: "DM Serif Display", Georgia, serif; --body: "Sora", system-ui, sans-serif;
  --navh: calc(76 * var(--u));
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ground); transition: background-color .9s var(--soft); }
body { min-height: 100svh; background: transparent; color: var(--ink); font: 400 calc(14 * var(--u))/1.55 var(--body); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.ic { width: calc(18 * var(--u)); height: calc(18 * var(--u)); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: translate .24s var(--ease); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(10 * var(--u)); height: calc(46 * var(--u)); padding: 0 calc(22 * var(--u)); border-radius: 999px; font-weight: 500; font-size: calc(14 * var(--u)); transition: background-color .24s var(--soft), color .24s var(--soft), scale .2s var(--soft), box-shadow .24s; }
.btn:active { scale: .97; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-ink:hover .ic { translate: 2px 0; }
.btn-line { box-shadow: inset 0 0 0 1px var(--hair); }
.btn-line:hover, .btn-line[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }

/* the colour field and the pot */
.stage { position: fixed; inset: 0; z-index: 0; }
.stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.stage canvas:active { cursor: grabbing; }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 3; height: var(--navh); align-items: center; pointer-events: none; }
.nav > * { pointer-events: auto; }
.mark { grid-column: 1 / 3; font-family: var(--serif); font-size: calc(30 * var(--u)); line-height: 1; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.tabs { grid-column: 4 / 10; display: flex; justify-content: center; gap: calc(28 * var(--u)); }
.tabs button { position: relative; padding: 6px 0; font-size: calc(14 * var(--u)); color: var(--ink-2); transition: color .25s; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after, .tabs button:hover::after { transform: scaleX(1); }
.nav-right { grid-column: 10 / 13; display: flex; justify-content: flex-end; }

/* page rails sit over the stage; only their own content takes the pointer */
.page { position: relative; z-index: 2; min-height: 100svh; padding-top: var(--navh); padding-bottom: calc(40 * var(--u)); align-items: center; pointer-events: none; }
.about, .rail { pointer-events: auto; }
.about { grid-column: 1 / 4; display: flex; flex-direction: column; gap: calc(18 * var(--u)); align-self: center; }
.about h1 { font-size: calc(76 * var(--u)); line-height: .95; text-wrap: balance; }
.desc { color: var(--ink-2); max-width: 30ch; font-size: calc(15 * var(--u)); }
.live { display: flex; gap: 10px; align-items: baseline; font-size: calc(13 * var(--u)); max-width: 32ch; }
.live .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); translate: 0 -1px; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .3; } }
.spec { display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--hair); }
.spec dt, .spec dd { padding: calc(10 * var(--u)) 0; border-bottom: 1px solid var(--hair); font-size: calc(13 * var(--u)); }
.spec dt { color: var(--ink-2); padding-right: 16px; }
.spec dd { text-align: right; font-variant-numeric: tabular-nums; }
.about-cta { display: flex; gap: 8px; flex-wrap: wrap; }

.rail { grid-column: 10 / 13; align-self: center; max-height: calc(100svh - var(--navh) - 40 * var(--u)); overflow: auto; scrollbar-width: none; padding: 4px 2px 8px; }
.rail::-webkit-scrollbar { display: none; }
.pane { display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
.pane[hidden] { display: none; }
.pane h2 { font: 500 calc(11 * var(--u))/1 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-top: calc(10 * var(--u)); padding-bottom: calc(8 * var(--u)); border-bottom: 1px solid var(--hair); }
.hint { color: var(--ink-2); font-size: calc(13 * var(--u)); }

.shapes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.shape { aspect-ratio: 3 / 4; display: grid; place-items: center; color: var(--ink); opacity: .32; transition: opacity .25s, translate .3s var(--ease); }
.shape svg { width: 100%; height: 100%; }
.shape:hover { opacity: .7; translate: 0 -2px; }
.shape[aria-pressed="true"] { opacity: 1; }
#profile { width: 100%; height: auto; max-height: calc(220 * var(--u)); touch-action: none; }
#profile .body { fill: rgba(255,255,255,.25); stroke: var(--ink); stroke-width: 1.5; }
#profile .axis { stroke: var(--hair); stroke-dasharray: 3 5; stroke-width: 1.5; }
#profile .knob { fill: var(--ink); stroke: var(--ground); stroke-width: 3; cursor: ew-resize; transition: r .2s var(--ease); }
#profile .knob:hover, #profile .knob.drag { r: 8.5; }

.row { display: grid; grid-template-columns: calc(78 * var(--u)) 1fr calc(44 * var(--u)); align-items: center; gap: 10px; font-size: calc(13 * var(--u)); padding: 2px 0; }
.row span { color: var(--ink-2); }
.row output { text-align: right; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 24px; background: transparent; cursor: pointer; }
input[type=range]:not(.pk-r)::-webkit-slider-runnable-track { height: 1.5px; background: linear-gradient(90deg, var(--ink) var(--p, 50%), var(--hair) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6.25px; border-radius: 50%; background: var(--ink); transition: transform .2s var(--ease); }
input[type=range]:active::-webkit-slider-thumb, input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.3); }
input[type=range]::-moz-range-track { height: 1.5px; background: var(--hair); }
input[type=range]::-moz-range-progress { height: 1.5px; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: calc(34 * var(--u)); padding: 0 calc(14 * var(--u)) 0 calc(8 * var(--u)); display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); font-size: calc(13 * var(--u)); transition: background-color .2s, color .2s, box-shadow .2s; }
.chip i { width: 18px; height: 18px; display: grid; place-items: center; }
.chip i svg { width: 18px; height: 18px; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.palettes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pal { aspect-ratio: 1; border-radius: 50%; transform: rotate(-35deg); box-shadow: 0 0 0 1px var(--hair); transition: transform .3s var(--ease), box-shadow .2s; }
.pal:hover { transform: rotate(-35deg) scale(1.1); }
.pal[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.pickers { display: flex; gap: 14px; }
.pick { display: inline-flex; align-items: center; gap: 7px; font-size: calc(12 * var(--u)); color: var(--ink-2); cursor: pointer; }
.pick input { width: 22px; height: 22px; border: 0; border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.pick input::-webkit-color-swatch-wrapper { padding: 0; } .pick input::-webkit-color-swatch { border: 1px solid var(--hair); border-radius: 50%; }
.seg { display: flex; gap: calc(22 * var(--u)); }
.seg button { position: relative; padding: 4px 0; font-size: calc(13 * var(--u)); color: var(--ink-2); }
.seg button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg button[aria-checked="true"]::after { transform: scaleX(1); }

.wform { display: grid; gap: calc(12 * var(--u)); }
.field { display: grid; gap: 2px; font-size: calc(12 * var(--u)); color: var(--ink-2); }
.field input { height: calc(40 * var(--u)); padding: 0; border: 0; border-bottom: 1px solid var(--hair); background: transparent; font-size: calc(17 * var(--u)); color: var(--ink); transition: border-color .2s; }
.field input:focus { outline: none; border-color: var(--ink); }
.field input::placeholder { color: var(--ink-3); }
.quick { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.quick button { font-size: calc(12 * var(--u)); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.quick button:hover { color: var(--ink); text-decoration-color: var(--ink); }
.facts dd em { display: block; font-style: normal; color: var(--ink-2); font-size: calc(11 * var(--u)); }

.takes { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.take { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14 * var(--u)) 0; border-bottom: 1px solid var(--hair); text-align: left; }
.take b { display: block; font-family: var(--serif); font-weight: 400; font-size: calc(22 * var(--u)); line-height: 1.1; }
.take em { font-style: normal; color: var(--ink-2); font-size: calc(12 * var(--u)); }
.take:hover .ic { translate: 0 2px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 5; transform: translate(-50%, 16px); padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .45s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* tablet */
@media (max-width: 1199px) {
  :root { --u: calc(100vw / 1200); --margin: 28px; --gutter: 14px; }
  .about { grid-column: 1 / 4; }
  .rail { grid-column: 10 / 13; }
  .about h1 { font-size: calc(64 * var(--u)); }
}
/* phone: the pot on top in its colour, then the name, then the controls */
@media (max-width: 860px) {
  :root { --u: calc(100vw / 390); --margin: 20px; --gutter: 12px; --navh: 64px; }
  body { font-size: 15px; }
  .stage { position: relative; height: 60svh; margin-top: var(--navh); }
  .nav { position: fixed; background: color-mix(in srgb, var(--ground) 86%, transparent); backdrop-filter: blur(12px); }
  .mark { grid-column: 1 / 6; font-size: 28px; }
  .nav-right { grid-column: 6 / 13; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; justify-content: space-around; gap: 0; padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--ground) 90%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--hair); }
  .tabs button { font-size: 13px; padding: 8px 4px; }
  .page { min-height: 0; padding-top: 8px; padding-bottom: 96px; pointer-events: auto; }
  .about, .rail { grid-column: 1 / 13; }
  .about h1 { font-size: 54px; }
  .desc, .live { max-width: none; }
  .rail { max-height: none; overflow: visible; margin-top: 28px; }
  .row { grid-template-columns: 86px 1fr 46px; font-size: 14px; }
  .btn { height: 46px; font-size: 15px; }
  .shapes { grid-template-columns: repeat(8, 1fr); }
  .pane h2 { font-size: 11px; }
  .chip { height: 38px; font-size: 14px; }
  .take b { font-size: 22px; }
  .take em, .hint, .field { font-size: 13px; }
  .field input { font-size: 17px; height: 44px; }
  .spec dt, .spec dd { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* the paper is lit like a studio sweep: brighter behind the pot, falling off to the edges */
.live[hidden] { display: none; }
html { background:
  radial-gradient(ellipse 60% 70% at 50% 46%, color-mix(in srgb, var(--ground) 82%, #fff) 0%, transparent 70%),
  radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, color-mix(in srgb, var(--ground) 86%, #000) 100%),
  var(--ground); }

/* paper colours, always at hand */
.papers { display: flex; align-items: center; gap: 10px; }
.papers > span { font-size: calc(12 * var(--u)); color: var(--ink-2); width: 40px; }
#papers { display: flex; gap: 6px; flex-wrap: wrap; }
.paper { width: calc(22 * var(--u)); height: calc(22 * var(--u)); min-width: 20px; min-height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--hair); transition: transform .25s var(--ease), box-shadow .2s; }
.paper:hover { transform: scale(1.15); }
.paper[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.pick-paper { position: relative; width: calc(22 * var(--u)); height: calc(22 * var(--u)); min-width: 20px; min-height: 20px; border-radius: 50%; background: conic-gradient(#ff5d8f, #ffd23f, #2ec27e, #2f5bff, #7b2ff2, #ff5d8f); cursor: pointer; }
.pick-paper input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.shelf-link { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: calc(14 * var(--u)); color: var(--ink); text-decoration: none; }
.shelf-link b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-right { align-items: center; }
@media (max-width: 860px) { .shelf-link { margin-right: 10px; font-size: 14px; } }
/* a dark paper turns the type light */
body.on-dark { --ink: #f6f1ea; --ink-2: rgba(246,241,234,.66); --ink-3: rgba(246,241,234,.42); --hair: rgba(246,241,234,.2); --paper: #17130f; color: var(--ink); }
body.on-dark .mark, body.on-dark .shelf-link { color: var(--ink); }

/* ================= v4: smaller, calmer chrome in the studio's own language ================= */
@font-face { font-family: "NHG"; src: local("NHaasGroteskDSPro-55Rg"), local("Neue Haas Grotesk Display Pro 55 Roman"), local("Neue Haas Grotesk Display Pro"); font-weight: 400 600; }
:root { --body: "NHG", "Sora", system-ui, sans-serif; }
body { font-family: var(--body); letter-spacing: .005em; }

/* left rail, tighter */
.about { gap: calc(14 * var(--u)); }
.about h1 { font-size: calc(68 * var(--u)); }
.desc { font-size: calc(13.5 * var(--u)); line-height: 1.5; }
.spec dt, .spec dd { padding: calc(7 * var(--u)) 0; font-size: calc(12.5 * var(--u)); }
.btn { height: calc(36 * var(--u)); min-height: 34px; padding: 0 calc(16 * var(--u)); font-size: calc(13 * var(--u)); gap: 8px; }
.btn .ic { width: 14px; height: 14px; }
.about-cta { gap: 6px; }
.row output { white-space: nowrap; }
.row { grid-template-columns: calc(78 * var(--u)) 1fr calc(54 * var(--u)); }

/* paper chips: little squares of coloured paper that lift when touched */
.papers { gap: 12px; }
.papers > span { width: auto; font-size: calc(11.5 * var(--u)); }
#papers { gap: 7px; }
.paper, .pick-paper { width: 18px; height: 18px; min-width: 18px; min-height: 18px; border-radius: 4px; box-shadow: 0 1px 1.5px rgba(0,0,0,.16), inset 0 0 0 1px rgba(0,0,0,.07); transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; position: relative; }
.paper:hover, .pick-paper:hover { transform: translateY(-3px) rotate(-4deg); box-shadow: 0 4px 6px rgba(0,0,0,.14), inset 0 0 0 1px rgba(0,0,0,.07); }
.paper[aria-pressed="true"] { transform: translateY(-2px) scale(1.12); box-shadow: 0 3px 5px rgba(0,0,0,.16), inset 0 0 0 1px rgba(0,0,0,.1); }
.paper[aria-pressed="true"]::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--ink); }
body.on-dark .paper[aria-pressed="true"]::after { background: #f6f1ea; }
.pick-paper { border-radius: 4px; }

/* the side outline: filled with the pot's colour, small handles, a big touch area */
#profile .body { stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
#profile .axis { stroke: var(--hair); stroke-dasharray: 2 4; stroke-width: 1; }
#profile .knob { cursor: ew-resize; }
#profile .knob .hit { fill: transparent; }
#profile .knob .dot { fill: #fff; stroke: var(--ink); stroke-width: 1.5; transition: r .35s cubic-bezier(.34,1.56,.64,1), fill .2s; }
#profile .knob:hover .dot { r: 7; }
#profile .knob.drag .dot { r: 8; fill: var(--ink); }
#profile .guide { stroke: var(--ink); stroke-width: .8; stroke-dasharray: 1 3; opacity: .5; }
#profile .tag { font: 500 9px var(--body); fill: var(--ink); }

/* what it's made of: little spheres of each material */
.mats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mat { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: calc(10 * var(--u)); color: var(--ink-2); }
.mat i { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 2px 3px rgba(0,0,0,.18); transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.mat:hover i { transform: translateY(-3px); }
.mat[aria-pressed="true"] { color: var(--ink); }
.mat[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink), 0 3px 5px rgba(0,0,0,.18); }
.mat-glaze i { background: radial-gradient(circle at 34% 30%, #fff 0 8%, #f1d7c4 18%, #e0372b 70%, #a3221a); }
.mat-stainless i { background: conic-gradient(from 200deg, #f4f6f8, #9aa2aa, #eef1f3, #7d858d, #f4f6f8, #a8afb6, #f4f6f8); }
.mat-brass i { background: conic-gradient(from 210deg, #fff0c2, #b8892f, #f6d98b, #8f6420, #fff0c2, #c99a45, #fff0c2); }
.mat-glass i { background: radial-gradient(circle at 34% 30%, #fff 0 10%, rgba(255,255,255,.4) 22%, rgba(200,230,240,.35) 60%, rgba(80,120,140,.45)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 2px 3px rgba(0,0,0,.12); }
.mat-terracotta i { background: radial-gradient(circle at 34% 30%, #e59a72, #b8643d 60%, #8a4528); }
.mat-concrete i { background: radial-gradient(circle at 34% 30%, #e2ded7, #bdb8b0 60%, #8f8a83); }
.pane h2 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink-3); margin-left: 6px; }
#p-paint.bare .tiles-board, #p-paint.bare .palettes, #p-paint.bare .pots, #p-paint.bare .fins, #p-paint.bare .row { opacity: .35; transition: opacity .3s; }

/* pattern test tiles, pinned to a board: each painted with the real painter, a hanging hole at the top */
.tiles-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 8px; }
.tp { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: calc(10 * var(--u)); color: var(--ink-2); }
.tp canvas { width: 100%; aspect-ratio: 4 / 5; border-radius: 5px 5px 7px 7px; box-shadow: 0 1.5px 2.5px rgba(0,0,0,.2), inset 0 0 0 1px rgba(0,0,0,.05); transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; -webkit-mask: radial-gradient(circle at 50% 9%, transparent 3.2px, #000 3.6px); mask: radial-gradient(circle at 50% 9%, transparent 3.2px, #000 3.6px); }
.tp:hover canvas { transform: translateY(-3px) rotate(-2.5deg); }
.tp[aria-pressed="true"] { color: var(--ink); }
.tp[aria-pressed="true"] canvas { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink), 0 5px 8px rgba(0,0,0,.18); }

/* colour pairs as little dipped tiles */
.palettes { grid-template-columns: repeat(6, 1fr); gap: 9px; }
.pal { aspect-ratio: auto; border-radius: 0; transform: none; box-shadow: none; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.pal svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 1.5px 1.5px rgba(0,0,0,.18)); }
.pal:hover { transform: translateY(-3px) rotate(3deg); }
.pal[aria-pressed="true"] { transform: translateY(-3px); box-shadow: none; }
.pal[aria-pressed="true"] svg { filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(0 4px 5px rgba(0,0,0,.2)); outline: 1.5px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

/* custom colours as paint pots */
.pots { display: flex; gap: 16px; }
.pot { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: calc(11.5 * var(--u)); color: var(--ink-2); cursor: pointer; }
.pot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pot i { position: relative; width: 22px; height: 20px; border-radius: 3px 3px 7px 7px; background: linear-gradient(#ffffff 0 22%, #e9e3da 22% 30%, #fff 30%); box-shadow: 0 1.5px 2px rgba(0,0,0,.2), inset 0 0 0 1px rgba(0,0,0,.08); overflow: hidden; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.pot i::after { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 5px; border-radius: 50%; background: var(--c, #ccc); box-shadow: inset 0 -1px 1px rgba(0,0,0,.2); }
.pot i::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--c, #ccc); opacity: .9; }
.pot:hover i { transform: translateY(-2px) rotate(-6deg); }

/* glaze finishes as three tiles of the same colour, lit differently */
.fins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fins button { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: calc(11 * var(--u)); color: var(--ink-2); }
.fin { width: 100%; aspect-ratio: 5 / 3; border-radius: 6px; background-color: var(--c, #e0372b); box-shadow: 0 1.5px 2.5px rgba(0,0,0,.2); transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.fin-gloss { background-image: radial-gradient(ellipse 30% 22% at 30% 28%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%), linear-gradient(160deg, rgba(255,255,255,.25), rgba(0,0,0,.18)); }
.fin-satin { background-image: radial-gradient(ellipse 60% 50% at 32% 30%, rgba(255,255,255,.42), rgba(255,255,255,0) 75%), linear-gradient(160deg, rgba(255,255,255,.12), rgba(0,0,0,.14)); }
.fin-matte { background-image: radial-gradient(rgba(0,0,0,.07) 0.6px, transparent 0.7px), linear-gradient(160deg, rgba(255,255,255,.06), rgba(0,0,0,.1)); background-size: 3px 3px, auto; }
.fins button:hover .fin { transform: translateY(-3px); }
.fins button[aria-checked="true"] { color: var(--ink); }
.fins button[aria-checked="true"] .fin { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink), 0 4px 6px rgba(0,0,0,.18); }

/* headline face: chosen from the user's own fonts (local only until a web licence is bought) */
@font-face { font-family: "PottleHead"; src: local("Rolmes-Regular"), local("Rolmes Regular"), local("Rolmes"); }
@font-face { font-family: "PottleHeadB"; src: local("PPHatton-Medium"), local("PP Hatton Medium"); }
:root { --serif: "PottleHead", "DM Serif Display", Georgia, serif; }
html[data-head="hatton"] { --serif: "PottleHeadB", "DM Serif Display", Georgia, serif; }

/* v5: no dots, no tilting: a chip is chosen by a thin ink ring, and things only lift when touched */
.paper[aria-pressed="true"]::after { content: none; }
.paper:hover, .pick-paper:hover { transform: translateY(-2px); box-shadow: 0 3px 5px rgba(0,0,0,.12), inset 0 0 0 1px rgba(0,0,0,.07); }
.paper[aria-pressed="true"] { transform: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.2px var(--ink); }
.tp:hover canvas, .pal:hover, .pot:hover i { transform: translateY(-2px); }
#profile .knob { fill: none; stroke: none; }
#profile .knob .hit { fill: transparent; stroke: none; }
#profile .knob .dot { fill: #fff; stroke: var(--ink); stroke-width: 1.3; }
/* a section heading already draws the rule above its list: no second line */
.pane h2 + .takes, .pane h2 + .spec { border-top: 0; }
.pane h2 + .takes .take:first-child { padding-top: calc(8 * var(--u)); }

/* v6: pattern swatches, calm: square, flat, readable scale, four across */
.tiles-board { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; }
.tp canvas { aspect-ratio: 1; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); -webkit-mask: none; mask: none; }
.tp:hover canvas { transform: translateY(-2px); }
.tp[aria-pressed="true"] canvas { transform: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.2px var(--ink); }
.tp span { font-size: calc(10.5 * var(--u)); }

.pots { flex-wrap: wrap; gap: 10px 14px; }
.shapes { grid-template-columns: repeat(6, 1fr); row-gap: 6px; }

/* phones: no blur on the header, or the fixed tab bar inside it would be placed against the header instead of the screen */
@media (max-width: 860px) { .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--ground) 96%, transparent); } }
.nogl { position: absolute; inset: auto 20px 20px 20px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.7); font-size: 13px; z-index: 2; }
/* sliders give way inside narrow rails */
input[type=range] { min-width: 0; width: 100%; }
.row > * { min-width: 0; }
@media (max-width: 860px) { .page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); } }

/* the tab switcher lives at the head of the controls rail, stuck to its top */
.nav .tabs { display: none; }
.rail-tabs { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-start; gap: calc(20 * var(--u)); padding: 6px 0 10px; margin-bottom: 6px; background: linear-gradient(var(--ground) 82%, transparent); grid-column: auto; }
.rail-tabs button[role=tab] { position: relative; padding: 6px 0; font-size: calc(13.5 * var(--u)); color: var(--ink-2); transition: color .25s; }
.rail-tabs button[role=tab]::after { content: none; }
.rail-tabs button[role=tab]:hover, .rail-tabs button[aria-selected="true"] { color: var(--ink); }
.tab-line { position: absolute; left: 0; bottom: 8px; height: 1.5px; width: 0; background: var(--ink); transition: transform .45s var(--ease), width .45s var(--ease); pointer-events: none; }
.undo-redo { margin-left: auto; display: flex; gap: 2px; }
.undo-redo button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); transition: background-color .2s, opacity .2s; }
.undo-redo button:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.undo-redo button:disabled { opacity: .28; cursor: default; }
.undo-redo .ic { width: 15px; height: 15px; }
.pane:not([hidden]) { animation: paneIn .38s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } }
.with-act { display: flex; align-items: baseline; justify-content: space-between; }
.reset { font: 400 calc(11.5 * var(--u))/1 var(--body); text-transform: none; letter-spacing: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.reset:hover { color: var(--ink); text-decoration-color: var(--ink); }
.row { cursor: default; }
@media (max-width: 860px) {
  .rail-tabs { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 4; justify-content: space-around; gap: 0; margin: 0; padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--ground) 96%, transparent); border-top: 1px solid var(--hair); }
  .rail-tabs .tab-line { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .undo-redo { position: fixed; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom)); margin: 0; background: color-mix(in srgb, var(--ground) 92%, transparent); border-radius: 999px; padding: 2px; }
}
@media (prefers-reduced-motion: reduce) { .pane:not([hidden]) { animation: none; } }

/* v9: colours, calm: four-colour chips and one row of labelled dots; one way of showing "chosen" everywhere */
.palettes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
.chip4 { display: grid; grid-template-columns: repeat(4, 1fr); height: 26px; border-radius: 6px; overflow: hidden; transform: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); transition: translate .3s var(--ease), box-shadow .2s; }
.chip4 i { display: block; }
.chip4:hover { translate: 0 -2px; transform: none; }
.chip4[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.2px var(--ink); transform: none; }
.dots5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cdot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: calc(10.5 * var(--u)); color: var(--ink-2); cursor: pointer; }
.cdot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cdot i { width: 22px; height: 22px; border-radius: 50%; background: var(--c, #ccc); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: translate .3s var(--ease); }
.cdot:hover i { translate: 0 -2px; }
.cdot:focus-within i { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.2px var(--ink); }
.mat i { width: 26px; height: 26px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.mat[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.2px var(--ink); }
.mat:hover i { transform: translateY(-2px); }
.pane h2 em { display: none; }

/* v10: selection rings sit outside their item; give the scrolling rail room so they are never clipped */
.rail { padding: 6px 10px 12px; margin: 0 -10px; }
.rail-tabs { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
@media (max-width: 860px) { .rail { margin: 28px 0 0; padding: 4px 6px 8px; } .rail-tabs { margin: 0; padding-left: 8px; padding-right: 8px; } }
.rail-tabs button[role=tab] { white-space: nowrap; }
.rail-tabs { gap: calc(16 * var(--u)); }
.rail-tabs { top: -6px; padding-top: 12px; margin-top: -6px; background: linear-gradient(var(--ground) 86%, color-mix(in srgb, var(--ground) 0%, transparent)); }
@media (max-width: 860px) { .rail-tabs { top: auto; margin-top: 0; padding-top: 10px; } }
@media (min-width: 861px) {
  .rail { padding-top: 0; }
  .rail-tabs { top: 0; margin-top: 0; padding-top: 8px; gap: 0; justify-content: space-between; background: var(--ground); box-shadow: 0 10px 10px -6px var(--ground); }
  .rail-tabs button[role=tab] { flex: 0 0 auto; margin-right: calc(12 * var(--u)); }
  .undo-redo { flex: 0 0 auto; margin-left: auto; }
  .rail-tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}
@media (max-width: 1279px) and (min-width: 861px) { .rail-tabs button[role=tab] { font-size: calc(12 * var(--u)); margin-right: calc(7 * var(--u)); } .undo-redo button { width: 24px; } }

/* v18: the actions stay on one row; turning is a round toggle */
.about-cta { flex-wrap: nowrap; align-items: center; }
.about-cta .btn { flex: 0 0 auto; white-space: nowrap; }
.btn-round { width: calc(36 * var(--u)); min-width: 34px; padding: 0; }
.btn-round .ic { width: 16px; height: 16px; transition: rotate .6s var(--ease); }
.btn-round[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn-round[aria-pressed="true"] .ic { animation: turnIc 2.4s linear infinite; }
@keyframes turnIc { to { rotate: 360deg; } }
.fin-note:not(:empty)::before { content: " · "; color: var(--ink-2); }
.fin-note { color: var(--ink); }
@media (max-width: 860px) { .btn-round { width: 46px; } }
@media (prefers-reduced-motion: reduce) { .btn-round[aria-pressed="true"] .ic { animation: none; } }

/* v19: show that the rail scrolls: soft fade at the edge that still has more, and a thin visible bar */
@media (min-width: 861px) {
  .rail { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 22%, transparent) transparent; }
  .rail::-webkit-scrollbar { display: block; width: 4px; }
  .rail::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 4px; }
  .rail.more-below { -webkit-mask-image: linear-gradient(#000 calc(100% - 72px), transparent); mask-image: linear-gradient(#000 calc(100% - 72px), transparent); }
}

/* v20: patterns are small swatches, six to a row; the chosen name sits by the heading */
.patterns { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 8px !important; }
.tp { gap: 0; }
.tp span { display: none; }
.tp canvas { border-radius: 5px; }
.h2-val { font: 400 calc(12 * var(--u))/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); }

/* v21: patterns really are six small swatches (the grid is #patterns) */
#patterns { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 8px !important; }
#patterns .tp { gap: 0; }
#patterns .tp span { display: none; }
#patterns .tp canvas { border-radius: 5px; }
.dots5 { margin-top: 14px; }

/* our own colour picker */
.picker { position: fixed; z-index: 50; width: 252px; padding: 14px; border-radius: 16px; background: var(--paper, #fffdf8); color: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 18px 40px -12px rgba(0,0,0,.28); opacity: 0; transform: translateY(4px) scale(.98); transform-origin: 50% 0; transition: opacity .18s var(--ease), transform .22s var(--ease); }
.picker.in { opacity: 1; transform: none; }
.picker[hidden] { display: none; }
.pk-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pk-swatches button { aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: translate .2s var(--ease); }
.pk-swatches button:hover { translate: 0 -2px; }
.pk-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper, #fffdf8), 0 0 0 3.2px var(--ink); }
.pk-mix { display: grid; gap: 10px; margin: 16px 0 14px; padding-top: 14px; border-top: 1px solid var(--hair); }
.pk-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-2); }
.pk-row input[type=range] { -webkit-appearance: none; appearance: none; height: 12px; border-radius: 999px; margin: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
#pkH { background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.pk-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.25); cursor: grab; }
.pk-row input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.25); }
.pk-foot { display: flex; align-items: center; gap: 8px; }
.pk-now { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); flex: 0 0 auto; }
.pk-hex { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent); font: 400 12.5px/1 var(--body); color: var(--ink); text-transform: lowercase; }
.pk-hex:focus { outline: 1.5px solid var(--ink); outline-offset: 0; }
.pk-done { height: 30px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--paper, #fffdf8); font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .picker { transition: none; } }
.picker .pk-row input[type=range]::-webkit-slider-runnable-track { height: 12px !important; background: none !important; background-image: none !important; }
.pk-row input[type=range]::-webkit-slider-thumb { margin-top: -2px; transform: none !important; }
.pk-row input[type=range]::-moz-range-track, .pk-row input[type=range]::-moz-range-progress { background: transparent; }

/* v25: picker sliders are drawn by us: a rounded colour track and a ring handle filled with the colour; the real input is invisible on top */
.pk-track { position: relative; display: block; height: 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
#pkHT { background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.pk-track input.pk-r { position: absolute; inset: -6px 0; width: 100%; height: 26px; opacity: 0; margin: 0; cursor: pointer; box-shadow: none; background: none; }
.pk-thumb { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(0,0,0,.18), 0 2px 5px rgba(0,0,0,.25); pointer-events: none; transition: scale .15s var(--ease); }
.pk-track:active .pk-thumb { scale: 1.12; }
.pk-track input.pk-r:focus-visible + .pk-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }

/* v26: every pane fits the screen top to bottom on PC and iPad; the outline editor takes whatever height is left */
@media (min-width: 861px) {
  .rail { display: flex; flex-direction: column; height: calc(100svh - var(--navh) - 40 * var(--u)); }
  .rail-tabs { flex: 0 0 auto; }
  .pane:not([hidden]) { flex: 1 1 auto; min-height: 0; gap: calc(9 * var(--u)); }
  .pane h2 { margin-top: calc(6 * var(--u)); padding-bottom: calc(6 * var(--u)); }
  .shapes { grid-template-columns: repeat(11, 1fr) !important; row-gap: 0; gap: 0; }
  .shapes .shape { padding: 2px 0; }
  .shapes .shape svg { width: 100%; height: calc(34 * var(--u)); }
  #p-shape #profile { flex: 1 1 0; min-height: 90px; max-height: none; height: auto; }
  #p-shape .row { min-height: 0; }
  #p-shape .row input[type=range] { height: calc(20 * var(--u)); }
}
@media (min-width: 861px) { .rail-tabs { background: none !important; box-shadow: none !important; } }

/* v28: roles spread over the page: steps in the middle of the header, undo/redo under the vase, controls on the right */
.nav .tabs.step-tabs { display: flex; }
.step-tabs { grid-column: 4 / 10; justify-self: center; position: relative; display: flex; align-items: center; gap: calc(26 * var(--u)); padding: 0; margin: 0; background: none; box-shadow: none; }
.step-tabs button[role=tab] { position: relative; padding: 8px 0; font-size: calc(14 * var(--u)); color: var(--ink-2); white-space: nowrap; transition: color .25s; }
.step-tabs button[role=tab]::after { content: none; }
.step-tabs button[role=tab]:hover, .step-tabs button[aria-selected="true"] { color: var(--ink); }
.step-tabs .tab-line { bottom: 2px; }
.stage-tools { position: fixed; left: 50%; bottom: calc(26 * var(--u)); transform: translateX(-50%); z-index: 3; }
.stage-tools .undo-redo { margin: 0; display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 55%, transparent); box-shadow: inset 0 0 0 1px var(--hair); }
.stage-tools .undo-redo button { width: 34px; height: 34px; }
.stage-tools .undo-redo .ic { width: 16px; height: 16px; }
@media (min-width: 861px) { .rail { padding-top: 6px; } }
@media (max-width: 860px) {
  .step-tabs { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 4; justify-content: space-around; gap: 0; padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--ground) 96%, transparent); border-top: 1px solid var(--hair); }
  .step-tabs .tab-line { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .stage-tools { left: auto; right: 14px; transform: none; bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) { .nav .step-tabs { justify-self: stretch; width: 100%; grid-column: auto; gap: 0; } .step-tabs button[role=tab] { flex: 1 1 0; text-align: center; font-size: 13px; } }
@media (max-width: 860px) { .stage-tools { position: absolute; top: calc(var(--navh) + 18px); bottom: auto; right: 14px; left: auto; transform: none; } }
@media (max-width: 860px) { .stage-tools .undo-redo { position: static; } }
@media (min-width: 861px) { #p-shape #profile { flex: 0 1 auto; height: calc(190 * var(--u)); max-height: calc(190 * var(--u)); min-height: 110px; margin: calc(4 * var(--u)) 0; } }
#profile .body { vector-effect: non-scaling-stroke; stroke-width: 1.3; }

/* v33: one quiet row under the vase, in the page's own type: paper swatches, then Turn / Undo / Redo / Reset all as text */
.stage-tools { position: fixed; left: 50%; bottom: calc(28 * var(--u)); transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: calc(40 * var(--u)); padding: 0; background: none; box-shadow: none; white-space: nowrap; }
.stage-tools .papers { gap: 8px; }
.stage-tools .papers > span { font-size: calc(12 * var(--u)); color: var(--ink-2); width: auto; margin-right: 2px; }
.stage-tools .paper, .stage-tools .pick-paper { width: 16px; height: 16px; min-width: 16px; min-height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transform: none; }
.stage-tools .paper:hover, .stage-tools .pick-paper:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.stage-tools .paper[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.2px var(--ink); }
.stage-acts { display: flex; align-items: center; gap: calc(18 * var(--u)); }
.tlink { font-size: calc(12.5 * var(--u)); color: var(--ink-2); padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); transition: color .2s, text-decoration-color .2s; }
.tlink:hover:not(:disabled), .tlink[aria-pressed="true"] { color: var(--ink); text-decoration-color: var(--ink); }
.tlink:disabled { opacity: .35; cursor: default; }
.stage-tools .undo-redo { display: none; }
/* shapes: two rows, big enough to read */
@media (min-width: 861px) {
  .shapes { grid-template-columns: repeat(6, 1fr) !important; row-gap: calc(4 * var(--u)) !important; }
  .shapes .shape svg { height: calc(50 * var(--u)) !important; }
}
@media (max-width: 860px) {
  .stage-tools { position: absolute; top: calc(var(--navh) + 60svh - 44px); bottom: auto; left: 20px; right: 20px; transform: none; justify-content: space-between; gap: 12px; }
  .stage-tools .papers > span { display: none; }
  .stage-acts { gap: 14px; }
  .tlink { font-size: 13px; }
}
@media (min-width: 861px) { .rail { justify-content: safe center; } .pane:not([hidden]) { flex: 0 1 auto; } #p-shape #profile { flex: 0 0 auto; } }
@media (max-width: 860px) { .stage-tools { flex-direction: column; align-items: stretch; gap: 10px; top: calc(var(--navh) + 60svh - 84px); } .stage-tools .papers { flex-wrap: nowrap; gap: 0; justify-content: space-between; } .stage-tools #papers { display: contents; } .stage-acts { justify-content: space-between; } }
@media (max-width: 860px) { .stage-tools { width: auto; max-width: calc(100vw - 40px); box-sizing: border-box; } .stage-tools .papers, .stage-acts { width: 100%; min-width: 0; } .stage-tools .pick-paper { position: relative; overflow: hidden; } }

/* v37: your room. The photo fills the stage, the panels step aside, one small bar remains */
.room-fg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
html.room-on .about, html.room-on .rail, html.room-on .step-tabs, html.room-on .stage-tools { opacity: 0; visibility: hidden; transition: opacity .3s; }
html.room-on .stage { position: fixed; inset: 0; height: auto; margin: 0; z-index: 1; }
html.room-on .stage canvas { cursor: crosshair; }
html.room-on .nav { z-index: 3; }
.room-bar { position: fixed; left: 50%; bottom: calc(24 * var(--u)); transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: calc(26 * var(--u)); padding: 12px 22px; border-radius: 18px; background: color-mix(in srgb, var(--paper) 92%, transparent); box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); white-space: nowrap; }
.room-bar[hidden] { display: none; }
.rb-note { font-size: calc(12 * var(--u)); color: var(--ink-2); }
.rb-row { display: flex; align-items: center; gap: 10px; font-size: calc(12.5 * var(--u)); color: var(--ink-2); }
.rb-row input { width: calc(120 * var(--u)); min-width: 90px; }
.rb-acts { display: flex; gap: calc(18 * var(--u)); }
@media (max-width: 860px) {
  .room-bar { left: 12px; right: 12px; transform: none; bottom: calc(14px + env(safe-area-inset-bottom)); flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; white-space: normal; }
  .rb-note { width: 100%; }
  .rb-row { flex: 1 1 40%; } .rb-row input { width: 100%; min-width: 0; }
  .rb-acts { width: 100%; justify-content: space-between; }
}
@media (max-width: 380px) { .stage-acts { gap: 8px; } .stage-acts .tlink { font-size: 12.5px; } }

/* the stage row: looking at the vase | going back. The hand-drawn switch lives in the header with the other page-wide things */
.stage-acts { gap: calc(36 * var(--u)); }
.acts-group { display: flex; align-items: center; gap: calc(18 * var(--u)); }
.nav-right .ui-toggle { font-size: calc(13 * var(--u)); color: var(--ink-2); margin-right: calc(10 * var(--u)); }
.nav-right .ui-toggle[aria-pressed="true"] { color: var(--ink); }
@media (max-width: 860px) { .stage-acts { justify-content: space-between; } .acts-group { gap: 14px; } }
@media (max-width: 380px) { .acts-group { gap: 9px; } }
/* the switch itself is drawn: a hand-drawn ring round the word, in either mode */
.nav-right .ui-toggle { position: relative; padding: 7px 14px; text-decoration: none; }
.nav-right .ui-toggle::before { content: ""; position: absolute; inset: 0; background: currentColor; -webkit-mask: url(hand/oval2.svg) center / 100% 100% no-repeat; mask: url(hand/oval2.svg) center / 100% 100% no-repeat; opacity: .55; pointer-events: none; transition: opacity .2s, rotate .3s var(--ease); }
.nav-right .ui-toggle:hover::before { opacity: 1; rotate: -2deg; }
.nav-right .ui-toggle[aria-pressed="true"]::before { opacity: 1; }
.nav-right .ui-toggle::after { display: none !important; }
@media (max-width: 860px) { .nav-right .ui-toggle { font-size: 12px; padding: 6px 11px; margin-right: 8px; } }
@media (min-width: 861px) { .nav-right .ui-toggle { margin-left: 2px; margin-right: auto; } }

/* paint, in the order you decide: pattern, colours, material and shine */
#patterns { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; gap: 6px !important; }
#patterns .tp canvas { border-radius: 4px; }
#p-paint .palettes { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 6px !important; }
#p-paint .palettes > * { height: calc(26 * var(--u)) !important; min-height: 22px; }
#p-paint .dots5 { margin-top: 12px; }
#p-paint #finish { margin-top: 12px; }
/* the way on: a quiet link at the foot of each step */
.next-step { display: flex; align-items: center; gap: 8px; margin: calc(22 * var(--u)) 0 0 auto; font-size: calc(13.5 * var(--u)); color: var(--ink); }
.next-step::after { content: "→"; transition: translate .25s var(--ease); }
.next-step:hover::after { translate: 3px 0; }
@media (max-width: 860px) { .next-step { margin: 22px 0 4px auto; } }

/* headings without rules */
.pane h2 { border-bottom: 0 !important; padding-bottom: 0; }
/* shape: shapes, the outline with its Reset, sliders, handles. No headings */
#p-shape .shapes { margin-bottom: calc(6 * var(--u)); }
.profile-wrap { position: relative; display: flex; flex-direction: column; }
.profile-wrap .reset { position: absolute; top: 0; right: 0; z-index: 1; }
.row-seg { grid-template-columns: calc(78 * var(--u)) 1fr; margin-top: calc(6 * var(--u)); }
.row-seg .seg { margin: 0; gap: calc(18 * var(--u)); }
@media (max-width: 860px) { .row-seg { grid-template-columns: 86px 1fr; } }
@media (max-width: 860px) { .nav-right { gap: 8px; } .nav-right > * { white-space: nowrap; flex: none; } .nav-right .ui-toggle { margin-right: 0; padding: 6px 10px; font-size: 12px; } .nav-right .btn { padding: 0 12px; font-size: 13px; } .nav-right .shelf-link { font-size: 13px; } }

/* phone: the header has room for Shelf and Surprise me only; the hand-drawn switch sits at the foot of the panel */
.ui-toggle-foot { display: none; }
@media (max-width: 860px) {
  .nav-right #uiHand { display: none; }
  .ui-toggle-foot { display: block; position: relative; margin: 28px auto 8px; padding: 7px 14px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
  .ui-toggle-foot::before { content: ""; position: absolute; inset: 0; background: currentColor; -webkit-mask: url(hand/oval2.svg) center / 100% 100% no-repeat; mask: url(hand/oval2.svg) center / 100% 100% no-repeat; opacity: .55; pointer-events: none; }
  .ui-toggle-foot[aria-pressed="true"] { color: var(--ink); }
  .ui-toggle-foot[aria-pressed="true"]::before { opacity: 1; }
  .ui-toggle-foot::after { display: none !important; }
}

/* header: plain words, nothing shouting */
.nav-right { gap: calc(22 * var(--u)); }
.nav-right .nav-link, .nav-right .shelf-link { font-size: calc(14 * var(--u)); color: var(--ink); text-decoration: none; }
.nav-right .nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-right .ui-toggle { margin-right: auto; }
/* the stage row: words without underlines until you point at them */
.stage-acts .tlink { text-decoration: none; color: var(--ink); }
.stage-acts .tlink:disabled { color: var(--ink-2); opacity: .45; }
.stage-acts .tlink:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
/* paper: one swatch that opens */
.paper-now { display: flex; align-items: center; gap: 9px; font-size: calc(12.5 * var(--u)); color: var(--ink); }
.paper-now i { width: calc(24 * var(--u)); height: calc(24 * var(--u)); min-width: 22px; min-height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink), 0 1px 2px rgba(0,0,0,.12); transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.paper-now:hover i { transform: rotate(-12deg) scale(1.08); }
.papers.open .paper-now i { transform: scale(.9); }
.paper-tray { display: flex; align-items: center; gap: 8px; max-width: 0; overflow: hidden; padding: 4px 0; transition: max-width .45s var(--ease), margin .45s var(--ease); }
.papers.open .paper-tray { max-width: 420px; margin-left: 10px; }
.paper-tray #papers { display: flex; gap: 8px; }
.paper-tray .paper, .paper-tray .pick-paper { transform: scale(0); opacity: 0; transition: transform .4s cubic-bezier(.34,1.56,.64,1) calc(var(--i, 0) * 28ms), opacity .2s calc(var(--i, 0) * 28ms); }
.papers.open .paper-tray .paper, .papers.open .paper-tray .pick-paper { transform: none; opacity: 1; }
.papers.open .paper-tray .paper:hover { transform: translateY(-3px); }
.stage-tools .papers { gap: 0 !important; }
@media (max-width: 860px) {
  .stage-tools .papers { justify-content: flex-start !important; }
  .papers.open .paper-tray { max-width: calc(100vw - 130px); }
  .paper-tray, .paper-tray #papers { gap: 6px; }
  .paper-now span { display: inline !important; }
}
/* save toast carries the way to the shelf */
.toast.has-link { pointer-events: auto; display: flex; gap: 14px; align-items: center; }
.toast a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.paper-tray { padding: 6px 4px; margin-block: -6px; } .papers.open .paper-tray { margin-left: 6px; }
.nav-right > * { white-space: nowrap; flex: none; } @media (max-width: 1199px) and (min-width: 861px) { .nav-right { gap: 12px; } .nav-right .nav-link, .nav-right .shelf-link { font-size: 13px; } }

/* paint, like shape: no headings, groups set apart by space alone. Pattern and its knob, colours, then material and finish */
#p-paint > .row:first-of-type { margin-top: calc(4 * var(--u)); }
#p-paint .palettes { margin-top: calc(18 * var(--u)); }
#p-paint .dots5 { margin-top: calc(10 * var(--u)); }
#p-paint .mats { margin-top: calc(18 * var(--u)); }
#p-paint #finish { margin-top: 0; }
.paper-tray, .paper-tray #papers { flex-wrap: nowrap; } .paper-tray .paper, .paper-tray .pick-paper { flex: none; }
