:root {
  --bg: #120d0a;
  --fg: #efe3d6;
  --dim: #8a7a6c;
  --line: #3a2d24;
  --fire: #e2772c;
  --ember: #8e2f17;
  --gold: #f4c46a;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.3 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  overscroll-behavior: none;
}
body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: env(safe-area-inset-top) 16px calc(env(safe-area-inset-bottom) + 12px);
  user-select: none;
}
header {
  text-align: center;
  padding: 14px 0 8px;
}
#rhythm {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
#meta {
  color: var(--dim);
  font-size: 0.85rem;
  margin-top: 2px;
  min-height: 1.1em;
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 0;
}
#sliders {
  flex: 1;
  display: flex;
  gap: 14px;
  width: min(92vw, 420px);
  min-height: 0;
}
.col {
  flex: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.col.narrow {
  flex: 1;
}
.cap {
  text-align: center;
  color: var(--dim);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 6px;
}
.slider {
  position: relative;
  flex: 1;
  border-radius: 28px;
  overflow: hidden;
  background: #1b1410;
  border: 1px solid var(--line);
  touch-action: none;
  cursor: pointer;
  outline: none;
}
.fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10%;
  background:
    linear-gradient(
      to top,
      var(--ember),
      var(--fire) 60%,
      var(--gold));
  opacity: 0.85;
  transition: height 0.6s ease-out;
}
.fill.cool {
  background:
    linear-gradient(
      to top,
      #3b2a52,
      #6b4b8a 60%,
      #b391d6);
}
.slider.idle .fill {
  opacity: 0.25;
}
.knob {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 35%;
  height: 0;
  border-top: 2px solid var(--fg);
}
.knob span {
  position: absolute;
  left: 50%;
  top: -11px;
  width: 44px;
  height: 20px;
  margin-left: -22px;
  border-radius: 10px;
  background: var(--fg);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}
.mark {
  position: absolute;
  left: 12px;
  font-size: 0.72rem;
  color: rgba(239, 227, 214, 0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
#players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 360px;
}
#players span {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--dim);
  transition: all 0.4s;
}
#players span.on {
  color: var(--bg);
  background: var(--fire);
  border-color: var(--fire);
}
footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  align-items: center;
}
footer .row {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: min(92vw, 420px);
}
footer .row button {
  flex: 1;
}
button.big.brk {
  background: #241a14;
  color: var(--gold);
  border-color: var(--gold);
}
button.big.brk.armed {
  background: var(--gold);
  color: var(--bg);
}
button {
  font: inherit;
  color: var(--fg);
  background: #241a14;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  min-width: 72px;
}
button.big {
  padding: 16px 10px;
  min-width: 96px;
  background: var(--fire);
  color: var(--bg);
  border-color: var(--fire);
  font-weight: 600;
}
button.big.stop {
  background: #241a14;
  color: var(--fg);
  border-color: var(--fire);
}
button.toggle[aria-pressed=true] {
  border-color: var(--gold);
  color: var(--gold);
}
footer .row button.toggle {
  flex: 0.8;
}
button:disabled {
  opacity: 0.5;
}
#status {
  text-align: center;
  color: var(--dim);
  font-size: 0.8rem;
  min-height: 1.2em;
  padding-top: 6px;
}
#credits {
  text-align: center;
  color: #5d5047;
  font-size: 0.66rem;
  padding-top: 4px;
}
#credits a {
  color: inherit;
}
.center {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dotted rgba(239, 227, 214, 0.55);
  display: none;
  pointer-events: none;
}
.slider.drifting .center {
  display: block;
}
.slider.drifting .knob {
  transition: bottom 1.5s linear;
}
body.playing #meta {
  cursor: pointer;
}
.mark.at92 {
  bottom: 92%;
}
.mark.at72 {
  bottom: 72%;
}
.mark.at50 {
  bottom: 50%;
}
.mark.at26 {
  bottom: 26%;
}
.mark.at4 {
  bottom: 4%;
}
.mark.at81_8 {
  bottom: 81.8%;
}
.mark.at63_6 {
  bottom: 63.6%;
}
.mark.at45_5 {
  bottom: 45.5%;
}
.mark.at27_3 {
  bottom: 27.3%;
}
.mark.at9_1 {
  bottom: 9.1%;
}
body.doc {
  display: block;
  height: auto;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.2rem 1.2rem 3rem;
  user-select: text;
  overflow: auto;
}
body.doc h1 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.4rem 0 1rem;
}
body.doc h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.6rem 0 0.4rem;
  color: var(--gold);
}
body.doc p,
body.doc li {
  color: var(--fg);
  line-height: 1.5;
}
body.doc ul {
  padding-left: 1.2rem;
}
body.doc a {
  color: var(--gold);
}
