/* Browser demo. Colours follow the app's palette: primary #b8541e, primaryDim #7a3712. */
:root {
  --amber: #b8541e;
  --amber-dim: #7a3712;
  --well: #0a0604;
}

.play { padding-block: 3rem 2rem; border-top: 1px solid var(--line); }
.play-intro { max-width: var(--measure); }
.play-intro p { color: var(--muted); }
.play-intro .lede { margin-bottom: 1rem; }

.instrument { max-width: 30rem; margin: 2.5rem 0 0; }

/* Play orb */
.orb-row { display: flex; justify-content: center; padding-block: .5rem 1rem; }
.orb {
  position: relative;
  width: 10.5rem;
  height: 10.5rem;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  color: #1a0d06;
  background: radial-gradient(circle at 50% 45%, #d69360 0%, var(--amber) 38%, var(--amber-dim) 68%, #2a1208 100%);
  box-shadow: 0 0 2.5rem rgba(184, 84, 30, .22);
  transition: box-shadow .6s ease, transform .6s ease, filter .6s ease;
}
.orb:disabled { cursor: not-allowed; filter: grayscale(.7) brightness(.6); }
.orb:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.orb-icon { position: absolute; inset: 0; margin: auto; width: 2.6rem; height: 2.6rem; fill: currentColor; opacity: .85; }
.orb-icon-pause { display: none; }
.orb.is-playing .orb-icon-play { display: none; }
.orb.is-playing .orb-icon-pause { display: block; }
.orb.is-playing { animation: breathe 7s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 2.5rem rgba(184, 84, 30, .22); }
  50% { transform: scale(1.035); box-shadow: 0 0 4rem rgba(184, 84, 30, .38); }
}

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 19rem; margin: .25rem auto .75rem; }
.mode { padding: 0 .25rem; }

.panel.is-muted .fader, .panel.is-muted .scenes, .panel.is-muted .toggle, .panel.is-muted .scene-caption { opacity: .4; }
.muted-note { margin: -.2rem .25rem .1rem; font-size: .8125rem; color: var(--text); }

.status { min-height: 1.5rem; margin: 0 0 1rem; text-align: center; font-size: .9375rem; color: var(--text); }

/* Panels and fader rows */
.panel {
  display: grid;
  gap: .5rem;
  padding: .75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .1rem .25rem .25rem; }
.panel h2 { font-size: 1.1875rem; }
.family-title { margin: .6rem .25rem 0; font: 600 .75rem/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.fader {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: 0 .9rem;
  border-radius: 10px;
  background: var(--well);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .4s ease, opacity .3s ease;
}
.fader:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fader-fill {
  position: absolute;
  inset: 0;
  background: var(--amber-dim);
  opacity: .5;
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}
.fader.is-dragging .fader-fill { opacity: .62; }
.fader-name, .fader-value, .fader-dot { position: relative; }
.fader-name { flex: 1; font-size: .9375rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fader-value { font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.fader-dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #e0894e; opacity: .12; transition: opacity .45s ease; }

/* A scene or Auto Mix is moving this slider. */
.fader.is-automated { box-shadow: inset 0 0 0 1px rgba(214, 147, 96, .6), 0 0 .9rem rgba(184, 84, 30, .28); }
.fader.is-automated .fader-fill { opacity: .62; }
.fader.is-dimmed { opacity: .45; }

.space-reason { margin: -.1rem .25rem .2rem; font-size: .8125rem; color: var(--muted); }

/* Buttons */
.toggle, .scene, .mode {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--well);
  color: var(--muted);
  font: 500 .9375rem/1 var(--body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.toggle:focus-visible, .scene:focus-visible, .mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle[aria-pressed="true"], .scene[aria-pressed="true"], .mode[aria-pressed="true"] {
  border-color: rgba(214, 147, 96, .6);
  background: rgba(122, 55, 18, .45);
  color: var(--text);
}
.scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .5rem; }
.scene { padding: 0 .25rem; }
.scene-caption { min-height: 3.2em; margin: .1rem .25rem .3rem; font-size: .875rem; line-height: 1.55; color: var(--muted); }

.legend { margin: 0 .25rem 0; font-size: .8125rem; line-height: 1.6; color: var(--muted); }

.play-notes { max-width: var(--measure); margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.play-notes h2 { margin-bottom: 1rem; }
.play-notes p { color: var(--muted); }

@media (max-width: 560px) {
  .play { padding-block: 2rem 1.5rem; }
  .instrument { margin-top: 1.5rem; }
  .orb { width: 9rem; height: 9rem; }
  .panel { padding: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .orb.is-playing { animation: none; box-shadow: 0 0 3.5rem rgba(184, 84, 30, .34); }
  .fader, .fader-dot, .orb { transition: none; }
}
