:root {
  --background: #faf9f6;
  --card: #ffffff;
  --text: #171714;
  --muted: #6f6d66;
  --line: #dedcd5;
  --accent: #3559e0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a { color: inherit; }

.home,
.detail {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

header {
  margin-bottom: 64px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: -.06em;
}

header p,
.subtitle,
.note,
.empty {
  color: var(--muted);
  line-height: 1.55;
}

section {
  margin: 0 0 56px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-title h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-title span {
  color: var(--muted);
  font-size: .85rem;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.item:hover h3,
.back:hover {
  color: var(--accent);
}

.item h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.item p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}

.item > span {
  font-size: 1.3rem;
}

.empty {
  padding: 20px 4px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.back {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--muted);
  text-decoration: none;
}

.detail header {
  margin-bottom: 44px;
}

.detail h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
}

.tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.measure {
  min-height: 106px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}

.measure small {
  display: block;
  margin-bottom: 20px;
  color: var(--muted);
}

.beats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  text-align: center;
  font-weight: 700;
}

.part-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.part-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}

.part-list strong {
  color: var(--accent);
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #efeee9;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .9em;
}

.tab {
  overflow-x: auto;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
}

.tab pre {
  width: max-content;
  min-width: 100%;
  margin: 0;
  font: 600 .86rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.note {
  padding: 16px 18px;
  background: #f0f2ff;
  border-left: 3px solid var(--accent);
}

@media (max-width: 620px) {
  .home, .detail { padding-top: 42px; }
  header { margin-bottom: 46px; }
  .chart { grid-template-columns: 1fr 1fr; }
  .part-list li { grid-template-columns: 1fr; gap: 5px; }
}
