/* Liquid glass look for index2.html and admin2.html. Looks only: remove the <link> to go back to flat dark.
   Nothing here animates continuously, to leave the computer free for sound. */

:root {
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 1px 0 0 rgba(255, 255, 255, 0.14),
          inset 0 -1px 0 rgba(255, 255, 255, 0.1), inset -1px 0 0 rgba(255, 255, 255, 0.07);
  --lens: inset 0 10px 22px -14px rgba(255, 255, 255, 0.4), inset 0 -12px 24px -18px rgba(255, 255, 255, 0.28);
  --float: 0 12px 36px rgba(0, 0, 0, 0.45);
  --glass: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.07));
  --blur: blur(26px) saturate(170%);
  --round: 26px;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

body {
  font-family: var(--sans);
  padding: 12px;
  gap: 12px;
  background:
    radial-gradient(55vmax 45vmax at 6% 0%, rgba(125, 31, 209, 0.55), transparent 70%),
    radial-gradient(50vmax 50vmax at 34% 108%, rgba(0, 119, 179, 0.5), transparent 70%),
    radial-gradient(45vmax 40vmax at 100% 4%, rgba(200, 0, 92, 0.4), transparent 70%),
    radial-gradient(40vmax 40vmax at 96% 100%, rgba(0, 122, 61, 0.38), transparent 70%),
    #07070c;
}

/* ── Panes ── */
.instructions, .score, .right, .panel, .countdown {
  border: 0;
  border-radius: var(--round);
  background: var(--glass), rgba(10, 10, 18, 0.5);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--edge), var(--lens), var(--float);
}
.score, .right, .panel { overflow: hidden; }
.instructions { padding: 13px 24px; }
.right { background: var(--inst); font-family: var(--sans); font-size: 0.85rem; }
.panel { font-family: var(--sans); }

/* ── Buttons: small glass capsules ── */
.right button:not(.cell), .panel button, .note-chip, .expand-btn, .reset-btn, .badge {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-family: var(--sans);
  background: var(--glass), rgba(255, 255, 255, 0.07);
  box-shadow: var(--edge), 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.6, 1), filter 0.18s;
}
.right button:not(.cell):hover, .panel button:hover, .note-chip:hover, .expand-btn:hover, .reset-btn:hover { filter: brightness(1.3); }
.right button:not(.cell):active, .panel button:active, .note-chip:active, .reset-btn:active { transform: scale(0.95); }
.badge { background: var(--glass), var(--fill); padding: 4px 10px; }
.note-chip { color: #8dffc0; padding: 3px 10px; }
.note-chip.done { background: var(--glass), #0d6b3a; color: #fff; }

/* ── Instrument row: solid colours; the open one joins its panel ── */
.right .tabs { gap: 6px; padding: 10px 14px 0; border: 0; background: rgba(0, 0, 0, 0.5); }
.right .tabs button, .right .tabs button:active { padding: 9px 12px 7px; border-radius: 16px 16px 0 0; background: var(--inst); box-shadow: none; transform: none; }
.right .tabs button[aria-selected=true] { font-weight: 700; }
.right .tabs small { color: #fff; font-weight: 400; }

/* ── Play bar ── */
.transport {
  margin: 0 12px 12px;
  padding: 10px 18px 10px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--glass), rgba(0, 0, 0, 0.22);
  box-shadow: var(--edge), var(--lens), 0 6px 20px rgba(0, 0, 0, 0.3);
}
.right button.play-btn { height: 38px; padding: 0 20px; min-width: 136px; }
.right button.play-btn.on, .right button.send { background: var(--glass), var(--fill); }
.right button.play-btn.on { box-shadow: var(--edge), var(--lens); }

/* ── Sliders ── */
input[type=range] { -webkit-appearance: none; appearance: none; height: 28px; background: none; }
input[type=range]::-webkit-slider-runnable-track {
  height: 7px; border-radius: 9px; background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.12);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 32px; height: 21px; margin-top: -7px; border-radius: 999px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05) 60%), var(--fill);
  box-shadow: var(--edge), 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 12px -2px var(--neon);
}
input[type=range]::-moz-range-track { height: 7px; border-radius: 9px; background: rgba(255, 255, 255, 0.16); }
input[type=range]::-moz-range-thumb { width: 32px; height: 21px; border: 0; border-radius: 999px; background: var(--fill); box-shadow: var(--edge); }

/* ── Sunken fields ── */
.wave-canvas, .pad, .composer textarea, .composer select, .right .bpm, .panel input {
  border: 0;
  border-radius: 14px;
  background-color: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 1px 0 rgba(255, 255, 255, 0.12);
}
.panel input { color: #fff; }
.wave-canvas { border-radius: 22px; }
.pad { border-radius: 24px; overflow: hidden; background:
  linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) 50% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) 0 50% / 100% 1px no-repeat, rgba(0, 0, 0, 0.38); }
.pad span { color: #d5d3dc; }
.knob {
  width: 34px; height: 34px; margin: -17px;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.85), transparent 42%), color-mix(in srgb, var(--neon) 70%, transparent);
  box-shadow: var(--edge), 0 0 22px -2px var(--neon), 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* ── Drum machine ── */
.seg { padding: 3px; gap: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); }
.right .seg button { border-radius: 999px; box-shadow: none; background: none; }
.right .seg button[aria-pressed=true] { background: var(--glass), var(--fill); box-shadow: var(--edge), 0 2px 8px rgba(0, 0, 0, 0.4); }
.drum-grid { gap: 5px; }
.cell { border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.06); }
.cell.cell.on { background: linear-gradient(165deg, rgba(255, 255, 255, 0.38), transparent 48%), var(--fill); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 12px -3px var(--neon); }
.cell.now { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.cell.cell.on.now { background: linear-gradient(165deg, rgba(255, 255, 255, 0.6), transparent 60%), var(--neon); }
.drum-grid.out .cell.on:not(.now) { background: linear-gradient(165deg, rgba(255, 255, 255, 0.22), transparent 48%), #7b2350; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }

/* ── Unlock pattern ── */
.unlock-pad .ring { fill: rgba(255, 255, 255, 0.08); stroke: rgba(255, 255, 255, 0.4); }
.unlock-pad .in .ring { fill: color-mix(in srgb, var(--fill) 55%, transparent); }
.unlock-pad .sung { filter: drop-shadow(0 0 5px var(--neon)); }

/* ── Speech ── */
.spoken li, .composer { border: 0; border-radius: 20px; background: var(--glass), rgba(0, 0, 0, 0.2); box-shadow: var(--edge); }
.spoken li { padding-left: 16px; }
.spoken li.speaking { background: var(--fill); }
.spoken li p, .composer textarea { font-family: var(--sans); }
.right .spoken li button { box-shadow: none; background: none; }

/* ── Score ── */
.body h1 { font-weight: 600; letter-spacing: -0.02em; }
.stage, .code-block { border: 0; border-radius: 18px; background: var(--glass), rgba(0, 0, 0, 0.3); box-shadow: var(--edge); }
.collapsible.collapsed::after { border-radius: 0 0 18px 18px; background: linear-gradient(transparent, rgba(14, 14, 24, 0.9) 85%); }
.gather { border-radius: 18px; background: rgba(255, 255, 255, 0.04); }
.inst, .kicker .inst { border-radius: 999px; padding: 5px 12px; background: var(--inst); margin-right: 4px; }
.kicker { color: #c9c8d4; }

/* ── Countdown ── */
.countdown { padding: 13px 24px; }

@media (max-width: 820px) {
  body { padding: 10px 10px 76px; }
  .score { border: 0; }
  .countdown { left: 10px; right: 10px; bottom: 10px; z-index: 4; }
}
@media (prefers-reduced-transparency: reduce) {
  .instructions, .score, .panel, .countdown { background: #14141d; }
  .right { background: var(--inst); }
}

/* ── Full screen button ── */
.score { position: relative; }
.full-btn {
  position: absolute; right: 14px; bottom: 14px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; font: 0.78rem var(--sans); background: var(--glass), rgba(20, 20, 30, 0.8); box-shadow: var(--edge), 0 3px 10px rgba(0, 0, 0, 0.3);
}
.full-btn:hover { filter: brightness(1.3); }

/* ── Not playing: a raised, slowly flashing yellow button ── */
.right button.play-btn:not(.on) {
  position: relative;
  font-weight: 700;
  color: #1a1400 !important;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.55), transparent 50%), #ffd60a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 0 #a37f00, 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: unmute 2s ease-in-out infinite;
}
.right button.play-btn:not(.on)::after { /* glow that swells with each flash */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.55), 0 0 22px 5px rgba(255, 214, 10, 0.8);
  pointer-events: none;
  animation: unmute-glow 2s ease-in-out infinite;
}
.right button.play-btn:not(.on):active { transform: translateY(2px); box-shadow: none; }
@keyframes unmute { 0%, 100% { background-color: #c79f00; } 50% { background-color: #ffe23d; } }
@keyframes unmute-glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .right button.play-btn:not(.on), .right button.play-btn:not(.on)::after { animation: none; } }

/* ── Sampler ── */
.sample-all { flex: none; width: 100%; height: 120px; border-radius: 18px; background: rgba(0, 0, 0, 0.45); touch-action: none; }
.clips { flex: 1; min-height: 170px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; }
.right button.clip { position: relative; overflow: hidden; border-radius: 16px; padding: 0; background: rgba(0, 0, 0, 0.45); touch-action: none; min-height: 0; }
.clip canvas { position: absolute; left: 8px; top: 20px; width: calc(100% - 16px); height: calc(100% - 40px); }
.clip b { position: absolute; left: 10px; top: 5px; font-size: 0.78rem; }
.clip em { position: absolute; right: 10px; top: 5px; font: bold 0.78rem var(--sans); color: #fff; }
.clip small { position: absolute; right: 10px; bottom: 5px; font-size: 0.68rem; color: #d9dcc8; }
.clip i { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.2); transform: scaleX(0); transform-origin: left; visibility: hidden; }
.clip.sounding i { visibility: visible; }
.right button.clip.picked { background: rgba(0, 0, 0, 0.7); }
.right button:disabled { opacity: 0.45; cursor: default; filter: none !important; }
.patterns { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.patterns button { padding: 9px 4px; }
.right .patterns button[aria-pressed=true] { background: var(--glass), var(--fill); }
.every { background: rgba(0, 0, 0, 0.38); border: 0; border-radius: 12px; padding: 7px 10px; }
.sample-msg { flex: 1; min-width: 12em; }
@media (max-width: 1100px) { .patterns { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── Drum grid: off is nearly black, on is bright cyan ── */
.cell { background: #1a020d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.cell.beat { background: #2b0617; }
.cell.now { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.cell.cell.on { background: #2ff6ff; box-shadow: 0 0 14px -2px #2ff6ff; }
.cell.cell.on.now { background: #fff; }
.drum-grid.out .cell.on:not(.now) { background: #1fb9c4; box-shadow: none; }

/* ── Wave: the pad takes the lower half ── */
.wave-canvas { flex: 1 1 0; }
.wave-bottom { flex: 1 1 0; min-height: 200px; }
.wave-ctls { flex: 0 0 150px; justify-content: flex-start; }
.wave-ctls input { flex: 1 1 0; }
.pitch { min-width: 0; width: 100%; border: 0; border-radius: 12px; padding: 9px 10px; background: rgba(0, 0, 0, 0.38); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.pad { flex: 1; width: auto; min-width: 0; height: auto; }
.pad span { font-size: 0.8rem; }

/* ── Countdown: a plain grey bar that fills from right to left ── */
.countdown i { background: rgba(255, 255, 255, 0.13); border-radius: 0; }
.countdown.soon i { background: rgba(255, 255, 255, 0.26); }

.scope { flex: 1; width: 100%; min-height: 50px; height: 0; border-radius: 14px; background: rgba(0, 0, 0, 0.38); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.wave-ctls > div { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }

#volume-db { min-width: 5em; text-align: right; font-variant-numeric: tabular-nums; }
/* a tick at 0 dB */
#volume { background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)) 50% 50% / 2px 20px no-repeat; }
#volume.locked::-webkit-slider-thumb { background: linear-gradient(170deg, rgba(255, 255, 255, 0.7), transparent 60%), var(--neon); } /* lights up at 0 dB */

/* ── Wave: LFO dials ── */
.wave-ctls { flex-basis: 190px; }
.wave-bottom { min-height: 250px; }
.wave-ctls > div { flex-direction: row; gap: 8px; }
.wave-ctls > div:not(.dials) button { flex: 1; padding: 7px 8px; white-space: nowrap; }
.dials { justify-content: space-around; }
.dial { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.72rem; }
.dial output { font-variant-numeric: tabular-nums; color: #fff; font-weight: 600; }
.dial-face {
  --turn: 0deg; position: relative; width: 52px; height: 52px; border-radius: 50%; cursor: ns-resize; touch-action: none;
  background: radial-gradient(circle, #0c4a30 0 60%, transparent 62%),
    conic-gradient(from 225deg, var(--neon) 0 var(--turn), rgba(0, 0, 0, 0.45) var(--turn) 270deg, transparent 270deg);
}
.dial-face i { position: absolute; left: 50%; top: 50%; width: 3px; height: 15px; margin-left: -1.5px; border-radius: 2px; background: #fff; transform-origin: 50% 0; transform: rotate(calc(45deg + var(--turn))); }

/* ── Top bar: settings, instructions, who I am ── */
#instructions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 9px 16px 9px 10px; white-space: normal; }
#instructions .message { flex: 1; min-width: 0; min-height: 1.45em; white-space: pre-wrap; overflow-wrap: anywhere; }
.bar-btn { border: 0; border-radius: 999px; padding: 8px 14px; color: #fff; font: 0.8rem var(--sans); cursor: pointer; background: var(--glass), rgba(255, 255, 255, 0.07); box-shadow: var(--edge); }
.bar-btn:hover { filter: brightness(1.3); }
.bar-btn.sure { background: #a3132f; }
.settings { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.me { flex: none; font: 600 0.9rem var(--sans); font-variant-numeric: tabular-nums; }

/* ── Long text to copy from ── */
.transcript { margin-top: 20px; padding: 18px 20px; border-radius: 18px; background: rgba(0, 0, 0, 0.3); line-height: 1.6; user-select: text; }
.transcript p + p { margin-top: 10px; }
.transcript b { color: var(--neon); font-weight: 600; }
.score .cards { padding-bottom: 72px; } /* so the last lines clear the full screen button */
.transcript b { -webkit-user-select: none; user-select: none; margin-right: 0.3em; } /* names are left out when copying */
