.metadata {
  margin: 0 0 0.5rem 0;
}

.lyrics-line {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
}

.chord-lyrics {
  display: flex;
  flex-direction: column;
  align-items: left;
}
.section-title {
  font-weight: bold;
}
.above-lyrics {
  padding-right: 0.3em;
  margin-right: auto;
  padding-left: 3px;
  padding-right: 3px !important;
}

.tab-section {
  color: var(--af-citron-ink);
}

.chord {
  font-weight: bold;
  color: var(--color-primary-content, #000000);
  background-color: var(--color-primary, #C4FD63);
}

.chord-lyrics:last-child .chord {
  padding-right: 0;
}

.word {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  margin-right: 0.33em;
  /*border: 1px solid red;*/
}

.empty-line {
  margin-top: 1.5em;
}

.song-metadata {
  margin-bottom: 20px;
  color: #ff3700;
  display:none;
}

.song-content {
  margin-top: 1.2em;
}

.chorus-section {
  font-weight: bold;
  border-left: 2px solid var(--af-line-control);
  padding-left: 1em;
}
.line.comment-line {
  font-weight: bold;
  margin-top: 10px;
}

#chordProjectEditor .ace_keyword,
#chordProjectEditor .ace_character {
  color: var(--color-primary-darker, #000000) !important;
}

/* Song parts: each kind of part has its color, shared by its badge and its card. */
.part-intro { --part-color: #0f8a7e; }
.part-verse { --part-color: #6d4fd1; }
.part-prechorus { --part-color: #c27c0e; }
.part-chorus { --part-color: #d9532c; }
.part-prebridge { --part-color: #2a7fc4; }
.part-bridge { --part-color: #2a6fc4; }
.part-instrumental { --part-color: #4a8f22; }
.part-tag { --part-color: #c03a7a; }
.part-ending { --part-color: #0f7a8a; }
.part-other { --part-color: #6b7280; }

.song-arrangement {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.25rem 0 1rem;
}

.part-badge {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  border: 2px solid var(--part-color);
  border-radius: 999px;
  color: var(--part-color);
  background: color-mix(in oklab, var(--part-color) 10%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

button.part-badge {
  cursor: pointer;
  min-width: 2.75rem;
  height: 2.75rem;
}

@media (hover: hover) {
  button.part-badge:hover {
    background: color-mix(in oklab, var(--part-color) 22%, transparent);
  }
}

.song .content {
  container-type: inline-size;
}

.song-parts > .song-part + .song-part {
  margin-top: 1rem;
}

@container (min-width: 44rem) {
  .song-parts-columns {
    columns: 2;
    column-gap: 1.25rem;
  }
}

.song-parts-columns > .song-part {
  break-inside: avoid;
}

.song-parts-columns > .song-part + .song-part {
  margin-top: 0;
}

.song-parts-columns > .song-part:not(:last-child) {
  margin-bottom: 1rem;
}

.song-part:not(.part-none) {
  border: 1px solid color-mix(in oklab, var(--part-color) 30%, var(--color-base-300, #ddd));
  border-left: 3px solid var(--part-color);
  border-radius: var(--radius-box, 0.5rem);
  padding: 0.5rem 0.75rem 0.75rem;
  scroll-margin-top: 5rem;
}

.song-part-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.song-part-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

.song-part-note {
  margin-left: auto;
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.7;
}

.song-part .song-content {
  margin-top: 0;
}

/* Arrangement editor */
.arrangement-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.arrangement-sequence:not(:empty) {
  margin-bottom: 0.25rem;
}

.arrangement-chip,
.arrangement-option {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.25rem 0.25rem 0.375rem;
  border: 1px solid color-mix(in oklab, var(--part-color) 40%, var(--color-base-300, #ddd));
  border-radius: 999px;
  background: color-mix(in oklab, var(--part-color) 6%, var(--color-base-100, #fff));
  font-size: 0.875rem;
}

.arrangement-chip {
  cursor: grab;
  touch-action: none;
}

.arrangement-option {
  padding-right: 0.875rem;
  cursor: pointer;
}

.arrangement-chip-missing {
  border-style: dashed;
  opacity: 0.7;
}

.arrangement-chip-remove {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.arrangement-chip-remove:hover {
  opacity: 1;
  background: color-mix(in oklab, var(--part-color) 15%, transparent);
}

/* Song form: chord palette and chord sheet, made for fingers as much as for a mouse. */
.chord-placer-toolbar {
  position: sticky;
  top: 5rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-block: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: var(--color-base-100);
}

.chord-choice {
  min-width: 2.75rem;
  height: 2.75rem;
  padding-inline: 0.75rem;
  font-weight: bold;
}

@media (min-width: 640px) {
  .chord-choice {
    height: 2.25rem;
  }
}

.chord-sheet {
  font-size: 1.25rem;
  line-height: 1.2;
  min-height: 20rem;
  padding: 0.5rem 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.chord-sheet-line {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.chord-sheet-directive {
  font-size: 0.875rem;
  opacity: 0.6;
  margin: 0.75rem 0 0.25rem;
}

.chord-sheet-word {
  display: inline-flex;
  white-space: nowrap;
}

.chord-sheet-cell {
  display: inline-flex;
  flex-direction: column;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 0.25rem;
}

@media (hover: hover) {
  .chord-sheet-cell:hover .chord-sheet-char {
    background-color: color-mix(in oklab, var(--color-primary) 40%, transparent);
  }
}

.chord-sheet-end {
  min-width: 1.5rem;
}

.chord-sheet-chords {
  display: flex;
  gap: 0.125rem;
  min-height: 2.25rem;
  align-items: flex-end;
}

.chord-sheet-chords:not(:empty) {
  padding-right: 0.25rem;
}

.chord-sheet-chord {
  min-height: 2.25rem;
  min-width: 1.75rem;
  padding: 0 0.25rem;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-primary-content, #000);
  background-color: var(--color-primary, #C4FD63);
  border-radius: 0.375rem;
  touch-action: manipulation;
}

.chord-sheet-chord[aria-pressed="true"] {
  outline: 3px solid var(--color-base-content);
  outline-offset: 1px;
}

.chord-sheet-char {
  white-space: pre;
  border-radius: 0.125rem;
}

.chord-sheet-hint-flash {
  animation: chord-sheet-hint-flash 0.6s ease-in-out 2;
}

@keyframes chord-sheet-hint-flash {
  50% {
    opacity: 1;
    color: var(--color-error);
  }
}
