:root {
  color-scheme: light;
  background: #f7efe7;
}

.choreography-study {
  background: #f7efe7;
  cursor: ns-resize;
  isolation: isolate;
}

.choreography-study__canvas,
.choreography-study__photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.choreography-study__canvas {
  z-index: 0;
}

.choreography-study__photo {
  z-index: 1;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.choreography-study .particle-study__status {
  z-index: 5;
}

.choreography-readout {
  position: absolute;
  top: clamp(22px, 3.6vw, 70px);
  left: clamp(22px, 3.8vw, 74px);
  z-index: 2;
  display: grid;
  gap: 7px;
  color: rgb(37 31 27 / 76%);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.choreography-readout span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.choreography-readout strong {
  font-size: clamp(14px, 1.25vw, 24px);
  font-weight: 500;
  letter-spacing: 0.035em;
}

.choreography-timeline {
  position: absolute;
  right: clamp(24px, 4vw, 78px);
  bottom: clamp(24px, 4vw, 74px);
  left: clamp(24px, 4vw, 78px);
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: 16px 18px 14px;
  border: 1px solid rgb(37 31 27 / 13%);
  border-radius: 10px;
  background: rgb(250 246 241 / 82%);
  box-shadow: 0 14px 44px rgb(69 50 35 / 10%);
  backdrop-filter: blur(18px);
}

.choreography-timeline__meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: rgb(37 31 27 / 48%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.choreography-timeline__meta output {
  color: #251f1b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.choreography-timeline__meta span:last-child {
  text-align: right;
}

.choreography-timeline > input[type="range"] {
  width: 100%;
  height: 3px;
  margin: 0;
  accent-color: #5f4b38;
  cursor: ew-resize;
}

.choreography-timeline__chapters {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.choreography-timeline__chapters button {
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  color: rgb(37 31 27 / 42%);
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.choreography-timeline__chapters button:hover,
.choreography-timeline__chapters button[aria-current="true"] {
  color: #251f1b;
  background: rgb(37 31 27 / 7%);
}

.choreography-panel {
  z-index: 6;
  width: 520px;
  cursor: default;
}

.choreography-panel .particle-panel__header small {
  font-size: 10px;
}

.choreography-panel .particle-panel__header strong {
  font-size: 17px;
}

.choreography-panel .particle-panel__header > output {
  font-size: 11px;
}

.choreography-panel__group {
  margin-top: 12px;
  border-top: 1px solid rgb(37 31 27 / 11%);
}

.choreography-panel__group > summary {
  padding: 12px 2px 0;
  color: rgb(37 31 27 / 62%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.choreography-panel__group .particle-panel__controls {
  gap: 11px;
  margin-top: 12px;
}

.choreography-panel .particle-control > span:first-child,
.choreography-panel .particle-control input[type="number"] {
  font-size: 13px;
}

.choreography-panel .particle-control__inputs {
  grid-template-columns: 1fr 80px;
}

.choreography-panel .particle-control input[type="number"] {
  width: 80px;
  height: 32px;
}

.choreography-panel button {
  font-size: 12px;
}

.choreography-panel__footer {
  grid-template-columns: 1fr 0.8fr 0.8fr;
}

.choreography-study[data-panel="closed"] .choreography-timeline {
  right: clamp(24px, 4vw, 78px);
}

.choreography-study[data-stage="photo"] .choreography-readout {
  color: rgb(255 255 255 / 80%);
  mix-blend-mode: difference;
}

@media (max-width: 760px) {
  .choreography-panel {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .choreography-timeline {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .choreography-timeline__meta {
    grid-template-columns: 1fr auto;
  }

  .choreography-timeline__meta span:last-child {
    display: none;
  }
}
