* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.45 sans-serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 16px;
  border-bottom: 1px solid #000;
  background: #fff;
  font-size: 20px;
}

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  min-height: 0;
}

.side {
  position: sticky;
  top: 45vh;
  align-self: start;
  height: 48px;
  margin: 8px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
}

.side:disabled {
  cursor: default;
  color: #888;
}

.sheet {
  padding: 16px 8px 24px;
  min-width: 0;
}

.slide-no {
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
}

.text p,
.figure p {
  margin: 0 0 8px;
}

.text ul {
  margin: 0 0 8px;
  padding-left: 20px;
}

.figure {
  width: min(100%, 360px);
  min-height: 360px;
  margin-top: 16px;
  padding: 12px;
  border: 2px dashed #000;
}

.figure-kind {
  margin: 0 0 8px;
  font-weight: 700;
}

.scale {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid #000;
  background: #fff;
}

.scale button {
  min-width: 32px;
  height: 28px;
  padding: 0 4px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
}

.scale button[aria-current="true"] {
  font-weight: 700;
  background: #ddd;
}
