/* Spell (/spell): a tiny modular synth you cast with your voice. Plain CSS. Same rainbow palette as /music and /rainbow. */
:root { --bg: #0b0a0d; --ink: #efeaf5; --muted: #bcb4c8; --gold: #e3ad45; --line: rgba(239, 234, 245, .16);
  --title: "Beth Ellen", cursive; --mono: "Space Mono", ui-monospace, monospace; --note: "Gruppo", var(--mono); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--mono); overflow-x: hidden; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
#field { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; }

.stage { position: relative; z-index: 1; min-height: 76vh; min-height: 76svh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 24px 20px 10px; pointer-events: none; }
.stage button, .stage a { pointer-events: auto; }
.rainbow { display: inline-block; font: 400 clamp(2.8rem, 8vw, 4.4rem)/1.45 var(--title); margin: 0 0 -.15em; padding: 0 .2em .4em 0;
  background-image: linear-gradient(90deg, #c8402e 4%, #d9702a 20%, #e2a43c 38%, #5f9a6e 56%, #4a82b8 74%, #8a64c4 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro { color: var(--muted); font-style: italic; margin: 0; text-wrap: balance; }

.note { flex: 1; display: flex; align-items: center; justify-content: center; font: 400 clamp(4rem, 16vw, 8rem)/1 var(--note); margin: 0; min-height: 1.1em; color: var(--ink); text-shadow: 0 0 30px currentColor; transition: color .2s; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.btn { font: inherit; font-size: .9rem; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: rgba(22, 19, 28, .74); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: rgba(239, 234, 245, .45); color: #fff; }
.btn--glow { border: 1.5px solid transparent;
  background: linear-gradient(#141118, #141118) padding-box, linear-gradient(90deg, #c8402e, #d9702a, #e2a43c, #5f9a6e, #4a82b8, #8a64c4) border-box; }
.btn[hidden], .hint[hidden] { display: none; }

.spell { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; justify-content: center; min-height: 2.4em; max-width: 46em; }
.spell button { font: 400 1.6rem/1.3 var(--note); min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: inherit; cursor: pointer; text-shadow: 0 0 14px currentColor; transition: transform .12s, opacity .2s; }
.spell button.is-rest { opacity: .22; text-shadow: none; }
.spell button.is-on { transform: scale(1.3); border-bottom-color: currentColor; }
.hint { color: var(--muted); font-size: .74rem; margin: 2px 0 0; letter-spacing: .04em; }

/* the rack */
.rack { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 6px 20px 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.mod { flex: var(--n) 1 calc(var(--n) * 66px + 18px); }
.mod { background: rgba(16, 14, 20, .84); border: 1px solid var(--line); border-top: 2px solid var(--c); border-radius: 14px; padding: 10px 8px 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mod h2 { font: 400 .68rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--c); margin: 4px 6px 10px; }
.mod__row { display: flex; justify-content: center; gap: 6px 14px; flex-wrap: wrap; }
.knob { width: 60px; display: flex; flex-direction: column; align-items: center; touch-action: none; cursor: ns-resize; user-select: none; -webkit-user-select: none; border-radius: 10px; padding: 2px 0; }
.knob svg { width: 48px; height: 48px; display: block; }
.knob__track { fill: none; stroke: rgba(239, 234, 245, .13); stroke-width: 4; stroke-linecap: round; }
.knob__arc { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--c)); }
.knob__dot { fill: var(--ink); }
.knob__val, .choice__val { font-size: .72rem; line-height: 1.4; color: var(--ink); white-space: nowrap; }
.knob__label, .choice__label { font-size: .64rem; line-height: 1.3; color: var(--muted); letter-spacing: .06em; }
.choice { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 0; }
.choice__val { display: flex; align-items: center; justify-content: center; width: 58px; height: 48px; border: 1.5px solid var(--c); border-radius: 12px; font-size: .78rem; box-shadow: 0 0 8px -2px var(--c) inset; }
.choice:hover .choice__val { color: #fff; }

.foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 14px 20px 22px; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line); background: rgba(11, 10, 13, .7); }
.foot p { margin: 0; }
.foot__home { color: var(--gold); text-decoration: none; font-size: .88rem; }
@media screen and (max-width: 600px) {
  .stage { min-height: 70svh; }
  .rack { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .foot { flex-direction: column; align-items: center; text-align: center; }
}
