study.css

At 9c1dec1Copy the commit ID

9c1dec1History

Preview

Code5.7 KiB
:root {
  color-scheme: light;
  --ink: #181818;
  --muted: #525252;
  --paper: #f5f5f5;
  --panel: #fff;
  --line: rgb(0 0 0 / 12%);
  --control-fill: rgb(0 0 0 / 5%);
  --loop-fill: rgb(0 0 0 / 2%);
  --hover-fill: rgb(0 0 0 / 10%);
  --selected-fill: #2c2c2c;
  --selected-ink: #fff;
  --focus: #3b3b3b;
  --stage-glow: #383838;
  --stage-fill: #262626;
  --stage-edge: #171717;
  --stage-ink: #f2f2f2;
  --stage-control: rgb(20 20 20 / 94%);
  --stage-outline: rgb(255 255 255 / 47%);
  --stage-hover: rgb(255 255 255 / 12%);
  --stage-focus: #fff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 960px; margin: auto; padding: clamp(22px, 5vh, 52px) 24px 10px; }
.intro { margin-bottom: 28px; }
.intro p { margin: 0; color: var(--muted); }
.intro .brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.04em;
}
.brand span { color: var(--muted); font-size: 12px; font-weight: 550; letter-spacing: 0; }
h1 {
  margin: 18px 0 7px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(47px, 8vw, 84px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 600;
}
.card { border: 1px solid var(--line); border-radius: 19px; overflow: hidden; background: var(--panel); }
.card { position: relative; }
.stage {
  position: relative;
  height: clamp(260px, 49vh, 440px);
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 48% 36%, var(--stage-glow), var(--stage-fill) 62%, var(--stage-edge));
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.stage canvas:active { cursor: grabbing; }
.status { color: var(--stage-ink); }
.rotation-panel {
  position: absolute;
  z-index: 1;
  inset: auto auto 10px 10px;
  min-inline-size: 0;
  max-width: calc(100% - 20px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 21%);
  border-radius: 10px;
  background: var(--stage-control);
  color: var(--stage-ink);
  font-size: 12px;
}
.rotation-panel[hidden] { display: none; }
.rotation-title { margin: 0 5px; }
.axis {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline: 6px 2px;
  border-radius: 6px;
  background: rgb(255 255 255 / 7%);
  font-weight: 600;
}
.axis input {
  width: 3.25rem;
  height: 32px;
  padding: 0 2px;
  border: 1px solid var(--stage-outline);
  border-radius: 4px;
  color: var(--stage-ink);
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.axis:focus-within { background: var(--stage-hover); }
.reset-angles {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 7px;
  background: transparent;
  color: var(--stage-ink);
  cursor: pointer;
}
.reset-angles:hover { background: rgb(255 255 255 / 7%); }
.rotation-panel :focus-visible, .reset-view:focus-visible { outline-color: var(--stage-focus); }
@media (max-width: 430px) {
  .rotation-title { display: none; }
  .axis input { width: 2.75rem; }
}

.view-controls {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--stage-ink);
  font-size: 12px;
}
.view-controls > span {
  padding: 5px 6px;
  border-radius: 6px;
  background: var(--stage-control);
}
.reset-view {
  padding: 8px 10px;
  border: 1px solid var(--stage-outline);
  border-radius: 7px;
  background: var(--stage-control);
  color: var(--stage-ink);
  cursor: pointer;
}
.reset-view:hover { background: var(--stage-hover); }
.controls { padding: 10px 15px 12px; }
.beats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
button { font: inherit; }
.beats button, .play, .actions button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.beats button:hover, .play:hover, .actions button:hover { background: var(--hover-fill); color: var(--ink); }
.beats button[aria-current="step"] { color: var(--selected-ink); background: var(--selected-fill); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.poses { flex: 1; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.actions button { padding: 4px 8px; background: var(--control-fill); color: var(--ink); }
.actions button[aria-pressed="true"] { background: var(--selected-fill); color: var(--selected-ink); }
.loop-options { flex: 0 1 304px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.loop-options button { background: var(--loop-fill); box-shadow: inset 0 0 0 1px var(--line); }
.beats[hidden] { display: none; }
.loop-controls { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.transport { display: flex; align-items: center; gap: 12px; padding: 3px 8px 0; }
.play { width: 53px; padding: 0; text-align: left; }
input[type="range"] { width: 100%; min-width: 0; accent-color: var(--selected-fill); cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 860px) {
  .poses { flex-basis: 100%; grid-template-columns: repeat(20, minmax(0, 1fr)); }
  .poses button { grid-column: span 5; }
  .poses button:nth-child(-n + 5) { grid-column: span 4; }
  .loop-options { flex-basis: 100%; }
  .actions { row-gap: 10px; }
}
@media (max-width: 480px) {
  main { padding-inline: 16px; }
  .intro { margin-bottom: 26px; }
  .controls { padding-inline: 8px; }
}

@media (max-height: 580px) and (min-width: 481px) {
  .intro { margin-bottom: 15px; }
  h1 { font-size: clamp(46px, 8vh, 64px); }
}

Files

Loading files