/* Audio Magic Lab: The Dial (2026-10-03). The real object: a dark concrete cube with a round well in its top and a
   concrete puck sitting flush in it, seen from above (refrences/IMG_6257, IMG_6258). Drawn in CSS: no image layers.
   The puck turns; a ring of 50 ticks around the cube shows the level. */
.dialspec { --block: clamp(220px, 26vw, 320px); --puck: calc(var(--block) * .78); --concrete: #6F6E69; --concrete-dark: #5C5B57; }
.dialspec__stage { position: relative; display: grid; place-items: center; padding: clamp(56px, 9vw, 110px) 0 var(--s-4); -webkit-user-select: none; user-select: none; }
.dialspec__block, .dialspec__dial { grid-area: 1 / 1; }
.dialspec__block { width: var(--block); aspect-ratio: 1; position: relative;
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, .18), transparent), radial-gradient(1.2px 1.2px at 70% 15%, rgba(255, 255, 255, .14), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(0, 0, 0, .25), transparent), radial-gradient(1.4px 1.4px at 85% 60%, rgba(0, 0, 0, .2), transparent),
    linear-gradient(135deg, #7A7973, var(--concrete) 45%, var(--concrete-dark));
  background-size: 37px 41px, 53px 47px, 29px 31px, 43px 37px, 100% 100%;
  }
.dialspec__block::after { content: ''; position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .5;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.dialspec__dial { position: relative; width: var(--puck); aspect-ratio: 1; border-radius: 50%; cursor: grab; touch-action: none; }
.dialspec__dial:focus-visible { outline: 2px solid var(--focus); outline-offset: 8px; }
.dialspec__well { position: absolute; inset: -5%; border-radius: 50%; background: #3D3C39; box-shadow: inset 0 4px 8px rgba(0, 0, 0, .55); }
.dialspec__puck { position: absolute; inset: 0; border-radius: 50%; transform: rotate(var(--turn, 0deg)); transition: transform 90ms ease-out;
  background:
    radial-gradient(1.4px 1.4px at 30% 25%, rgba(255, 255, 255, .2), transparent), radial-gradient(1.2px 1.2px at 65% 70%, rgba(0, 0, 0, .25), transparent),
    radial-gradient(1px 1px at 80% 35%, rgba(255, 255, 255, .15), transparent),
    radial-gradient(circle at 35% 30%, #87857F, var(--concrete) 55%, #605F5A);
  background-size: 31px 29px, 23px 27px, 41px 37px, 100% 100%;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35), inset 0 1px 1px rgba(255, 255, 255, .18), inset 0 -2px 3px rgba(0, 0, 0, .25); }
.dialspec__notch { position: absolute; left: 50%; top: 6%; width: 3px; height: 9%; margin-left: -1.5px; border-radius: 2px; background: rgba(30, 28, 25, .55); box-shadow: 0 1px 0 rgba(255, 255, 255, .15); }
.dialspec__dial.is-pressed .dialspec__puck { box-shadow: 0 1px 1px rgba(0, 0, 0, .35), inset 0 1px 1px rgba(255, 255, 255, .12), inset 0 -1px 2px rgba(0, 0, 0, .25); }
/* the ring of ticks sits around the cube */
.dialspec__ring { grid-area: 1 / 1; position: relative; width: calc(var(--block) * 1.62); aspect-ratio: 1; pointer-events: none; }
.dialspec__ring i { position: absolute; left: 50%; top: 0; width: 2px; height: 10px; margin-left: -1px; background: var(--line-strong);
  transform-origin: 50% calc(var(--block) * .81); transition: background .2s ease, height .2s ease; }
.dialspec__ring i.is-lit { background: var(--ink-strong); height: 14px; }
.dialspec__ring i.is-wall { background: var(--burgundy); }
.dialspec__read { display: flex; align-items: baseline; justify-content: center; gap: .4em; font: 700 var(--fs-title)/1 var(--serif); color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.dialspec__unit { font: 500 var(--fs-caption)/1 var(--sans); letter-spacing: var(--track-caption); text-transform: uppercase; color: var(--ink-soft); }
.dialspec.is-wall .dialspec__read { color: var(--burgundy); }
.dialspec.is-wall .dialspec__unit::after { content: ' · loud'; }
@media (prefers-reduced-motion: reduce) { .dialspec__puck { transition: none; } }

/* ---- isometric (2026-10-03): the cube seen from above and to the side. The top face (block, ring, well, puck) lies in
   one tilted plane; two concrete sides hang below it. Turning still follows the hand: dial.js undoes the tilt. ---- */
.dialspec { --tilt: 56deg; --spin: -45deg; --depth: calc(var(--block) * .9); }
.dialspec__stage { perspective: none; }
.dialspec__iso { grid-area: 1 / 1; display: grid; place-items: center; width: calc(var(--block) * 1.62); aspect-ratio: 1;
  transform-style: preserve-3d; transform: translateY(calc(var(--block) * -.18)) rotateX(var(--tilt)) rotateZ(var(--spin)); }
.dialspec__iso > * { grid-area: 1 / 1; }
.dialspec__block { transform-style: preserve-3d; box-shadow: none; }
/* the two sides, drawn flat under the tilted top (isometric construction). With tilt 56° and spin 45°, a square of side B
   projects to a diamond 1.414B wide and .791B tall; a depth of .9B projects to .746B straight down. */
.dialspec__sides { grid-area: 1 / 1; position: relative; width: calc(var(--block) * 1.4142); height: calc(var(--block) * 1.5367);
  transform: translateY(calc(var(--block) * .193)); pointer-events: none; }
.dialspec__side { position: absolute; inset: 0; display: block;
  background: linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(0, 0, 0, .2)), linear-gradient(135deg, #73726E, #5D5C58); }
.dialspec__side::after { content: ''; position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .5;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.dialspec__side--l { clip-path: polygon(0 25.73%, 50% 51.45%, 50% 100%, 0 74.28%); filter: brightness(.86); }
.dialspec__side--r { clip-path: polygon(50% 51.45%, 100% 25.73%, 100% 74.28%, 50% 100%); filter: brightness(.68); }
/* a soft shadow on the floor/wall below the cube */
.dialspec__stage::before { content: ''; grid-area: 1 / 1; align-self: center; width: calc(var(--block) * 1.9); height: calc(var(--block) * .5); transform: translateY(calc(var(--block) * .78));
  border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 40, 24, .28), rgba(60, 40, 24, 0)); pointer-events: none; }
.dialspec__read { margin-top: calc(var(--block) * .7); }
@media (prefers-reduced-motion: reduce) { .dialspec__iso { transition: none; } }
.dialspec__sides { z-index: 2; }   /* the cube's sides sit in front of the ring's near arc, as a real cube would */
.dialspec__iso { position: relative; z-index: 1; }
.dialspec__iso .dialspec__dial { z-index: 3; }
.dialspec__iso { pointer-events: none; }   /* only the dial itself takes the hand */
.dialspec__iso .dialspec__dial { pointer-events: auto; }
.dialspec__iso .dialspec__block { pointer-events: none; }
/* 3D (task 0099, ?render=3d): dial3d.js draws the model on a canvas behind the dial; the CSS cube hands over */
.dialspec__canvas { position: absolute; top: 0; left: 0; height: 100%; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.dialspec.is-3d .dialspec__canvas { opacity: 1; }
.dialspec.is-3d :is(.dialspec__block, .dialspec__sides, .dialspec__ring, .dialspec__well, .dialspec__puck) { opacity: 0; transition: opacity .4s ease; }
.dialspec.is-3d .dialspec__stage::before { opacity: 0; }

/* press (2026-11-03): the guide under the readout, after Opus One's; the CSS block rocks when the 3D one can't */
.dialspec__guide { list-style: none; margin: var(--s-3) auto 0; padding: 0; display: flex; justify-content: center; gap: 6px; font: 400 12.5px/1.3 var(--sans); color: var(--ink-soft); }
.dialspec__guide li { padding: 6px 12px; border-radius: 8px; background: rgba(255, 255, 255, .45); box-shadow: inset 0 0 0 1px var(--line); }
.dialspec__guide b { font-weight: 500; color: var(--burgundy); margin-right: .4em; }
.dialspec.is-muted .dialspec__read { color: var(--ink-soft); }
@keyframes dial-rock { 30% { rotate: -1.6deg; translate: 0 1px; } 65% { rotate: .7deg; } }   /* rotate/translate compose with the iso transform */
.dialspec:not(.is-3d).is-rocking :is(.dialspec__iso, .dialspec__sides) { animation: dial-rock .42s var(--ease); }
@media (prefers-reduced-motion: reduce) { .dialspec.is-rocking :is(.dialspec__iso, .dialspec__sides) { animation: none; } }
