/* Riff in v2: the conversation's bubbles, chords, cards, practice and rooms (js/riffchat.js, Nick's side).
   Built on Peter's tokens and pieces in v2.css (.chip, .text-btn, .room-i, .msg-menu-*), so it reads as the
   same app: starlight on glass, Newsreader for Riff's voice, Geist for anything you tap, Geist Mono for
   numbers. Colour only ever means music: a chord or a note takes its step in its card's key (--c, set inline
   from the palette in Customize), with --on as the ink that reads on it. Everything else is starlight. */

/* ---------- bubbles: Riff's on the left, yours on the right, the newest at the bottom (pick A) ---------- */

body[data-state="riff"] .convo {
  position: relative;
}

.log .msg-riff {
  align-self: flex-start;
  max-width: min(100%, 62ch);
  padding: 9px 16px 11px;
  border: 1px solid var(--line);
  border-radius: 6px 18px 18px 18px;
  background: color-mix(in srgb, var(--starlight) 4%, transparent);
  overflow-wrap: anywhere;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}

/* The opener settles into its bubble as Riff rises: the bubble's edge comes in after it lands. */
.convo.is-rising .msg-opener {
  border-color: transparent;
  background-color: transparent;
}

.log .msg-riff.has-cards {
  align-self: stretch;
  max-width: none;
}

.log .msg-thinking {
  height: auto;
  min-height: 42px;
  padding: 0 16px;
}

.log .msg-you {
  max-width: min(85%, 52ch);
  border-radius: 18px 6px 18px 18px;
  overflow-wrap: anywhere;
}

.rc-p {
  margin: 0;
}

.rc-p + .rc-p {
  margin-top: 10px;
}

.rc-p code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--lift);
  font-family: var(--mono);
  font-size: .8em;
}

.msg-riff .msg-actions {
  margin: 10px 0 0;
  font-family: var(--ui);
}

/* Cards and controls inside a bubble are Geist: Riff's voice is only his words. */
.rc-card,
.rc-rooms,
.rc-dias,
.rc-inst-h,
.rc-one {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.45;
}

/* A new reply while you're reading further up. */
.rc-jump {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  margin: 10px auto 0;
  background-color: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--starlight);
}

.rc-jump[hidden] {
  display: none;
}

/* ---------- pills: a chord or a note, in its colour ---------- */

.rc-pill {
  --c: var(--starlight);
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 1px 0;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--c) 62%, transparent);
  border-radius: var(--r-pill);
  color: color-mix(in oklab, var(--c) 70%, var(--starlight));
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  vertical-align: .06em;
  white-space: nowrap;
  transition: background-color var(--t) ease, border-color var(--t) ease, color var(--t) ease;
}

button.rc-pill {
  cursor: pointer;
}

/* A note (in a scale, or a chord spelled out) isn't a chord to play: a wash of its colour, no edge. */
.rc-note {
  border-color: transparent;
  background-color: color-mix(in srgb, var(--c) 22%, transparent);
  font-weight: 500;
}

/* The chord the band is on lights in its own colour, as the Chords drawer's chips do. */
.rc-pill.is-now {
  border-color: var(--c);
  background-color: var(--c);
  color: var(--on, var(--space));
}

@media (hover: hover) {
  button.rc-pill:hover:not(.is-now) {
    border-color: var(--c);
  }
}

.rc-pills,
.rc-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.rc-pills .rc-pill,
.rc-strip .rc-pill {
  min-width: 48px;
  min-height: 36px;
  justify-content: center;
  padding: 0 14px;
  font-size: 15px;
}

.rc-one {
  margin-top: 10px;
}

/* ---------- a card: inside Riff's bubble, a quiet panel of its own ---------- */

.rc-card {
  margin: 12px -6px 2px;
  padding: 10px 14px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--space) 46%, transparent);
}

.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -6px -10px 0 0;
}

.rc-key {
  margin: 0;
  color: var(--dust);
  font-size: 13px;
  font-weight: 500;
}

.rc-keyof {
  font-weight: 400;
}

.rc-info {
  max-width: 56ch;
  margin: 2px 0 4px;
  color: color-mix(in srgb, var(--starlight) 74%, transparent);
  font-size: 13.5px;
}

.rc-info[hidden] {
  display: none;
}

.rc-info p {
  margin: 0 0 6px;
}

.rc-why {
  margin: 6px 0 0;
  color: color-mix(in srgb, var(--starlight) 74%, transparent);
  font-size: 13.5px;
}

.rc-lab {
  margin: 12px 0 0;
  color: var(--dust);
  font-size: 12px;
  font-weight: 500;
}

.rc-title {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
}

.rc-meta {
  margin: 4px 0 0;
  color: var(--dust);
  font-size: 13px;
}

.rc-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.rc-acts .chip,
.rc-insts .chip,
.rc-picker .chip,
.rc-rooms .chip,
.rc-sec .chip,
.rc-one .chip {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.rc-acts .chip-icon {
  padding-left: 11px;
}

.rc-acts .text-btn {
  margin-left: -2px;
}

.rc-say,
.rc-res {
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13.5px;
}

.rc-say:empty,
.rc-res:empty {
  display: none;
}

.rc-undo {
  min-height: 32px;
  margin: -6px 0 -6px -4px;
  color: var(--starlight);
  text-decoration-color: color-mix(in srgb, var(--starlight) 40%, transparent);
}

/* ---------- pictures: the shared chord module, for what you play ---------- */

.rc-inst-h {
  margin: 12px 0 0;
  color: var(--dust);
  font-size: 12px;
  font-weight: 500;
}

.rc-dias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 78px));
  gap: 8px 12px;
  margin-top: 10px;
}

.rc-dias[data-inst="kb"] {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

/* A chord with no guitar or uke shape falls back to the piano, which needs the room. */
.rc-dias:not([data-inst="kb"]) .rc-fig[data-inst="kb"] {
  grid-column: span 2;
}

.rc-fig {
  --c: var(--starlight);
  min-width: 0;
  margin: 0;
  color: var(--starlight);
  text-align: center;
}

.rc-fig .cd-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.rc-fig figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.rc-fname {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: color-mix(in oklab, var(--c) 70%, var(--starlight));
  font-size: 13px;
  font-weight: 600;
  transition: background-color var(--t) ease, color var(--t) ease;
}

.rc-fig.is-now .rc-fname {
  background-color: var(--c);
  color: var(--on, var(--space));
}

.rc-falt {
  color: var(--dust);
  font-size: 11.5px;
}

/* ---------- practicing, right in the card ---------- */

/* The card stands on its own while you practice: the bubble around it steps back. */
.log .msg-riff:has(.rc-card.is-practicing) {
  border-color: transparent;
  background-color: transparent;
}

.rc-card.is-practicing {
  margin-right: -10px;
  margin-left: -10px;
}

.rc-stage {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 2fr);
  align-items: end;
  gap: 18px;
  margin-top: 6px;
}

.rc-now .rc-fig[data-inst="kb"] {
  max-width: 420px;
  margin: 0 auto;
}

.rc-now .rc-fig:not([data-inst="kb"]) {
  max-width: 156px;
  margin: 0 auto;
}

.rc-next .rc-fig:not([data-inst="kb"]) {
  max-width: 88px;
  margin: 0 auto;
}

.rc-fig.is-big figcaption,
.rc-fig.is-next figcaption {
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.rc-fig figcaption .rc-lab {
  margin: 0;
}

.rc-fig.is-big .rc-fname {
  min-height: 34px;
  padding: 0 14px;
  background-color: var(--c);
  color: var(--on, var(--space));
  font-size: 20px;
}

.rc-fig.is-next .cd-svg {
  opacity: .62;
}

.rc-beats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.rc-beats i {
  width: 8px;
  height: 8px;
  border: 1px solid color-mix(in srgb, var(--starlight) 45%, transparent);
  border-radius: 50%;
}

.rc-beats i.is-on {
  border-color: var(--starlight);
  background-color: var(--starlight);
}

.rc-strip {
  justify-content: center;
  margin-top: 12px;
}

.rc-insts {
  justify-content: center;
  margin-top: 12px;
}

.rc-prac + .rc-acts {
  justify-content: center;
}

/* ---------- a song chart: sections of bars, each with Practice it ---------- */

.rc-sec {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rc-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rc-sec-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.rc-rep {
  color: var(--dust);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}

.rc-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 8px;
}

.rc-bar {
  display: inline-flex;
  gap: 4px;
  padding: 0 8px;
  border-left: 1px solid var(--line);
}

.rc-bar:first-child {
  padding-left: 0;
  border-left: 0;
}

.rc-chart .rc-card {
  margin: 10px 0 0;
  background: color-mix(in srgb, var(--starlight) 4%, transparent);
}

/* ---------- strumming, lyrics, who's playing ---------- */

.rc-strum {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1;
}

.rc-strum-g i {
  display: inline-block;
  width: 18px;
  font-style: normal;
  text-align: center;
}

.rc-strum-g .rest {
  color: var(--dust);
}

.rc-lines {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

.rc-lines p {
  margin: 0;
}

.rc-picker .chips {
  margin-top: 10px;
}

.rc-picker .text-btn {
  margin: 4px 0 -8px -12px;
}

/* ---------- [ROOMS]: the three rooms as chips, Peter's chat menu ---------- */

.rc-rooms {
  margin-top: 14px;
  gap: 16px;
}

.rc-room .chips + .text-btn,
.rc-room .rc-more + .text-btn {
  margin: 2px 0 -10px -12px;
}

.rc-more {
  margin-top: 6px;
}

.rc-more[hidden] {
  display: none;
}

.rc-rooms > .text-btn {
  margin: -6px 0 -10px -12px;
}

/* ---------- the way the reply appears: words first (Peter's .word), then the cards ---------- */

.rc-in {
  animation: rc-in 260ms var(--ease-out) both;
}

@keyframes rc-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- a phone ---------- */

@media (max-width: 640px) {
  .log .msg-riff {
    padding: 8px 13px 10px;
    font-size: 18px;
  }

  /* A card runs the bubble's full width, so the pictures get every pixel across. */
  .msg-riff.has-cards .rc-card {
    margin-right: -14px;
    margin-left: -14px;
    padding: 10px 13px 12px;
    border-radius: 0;
  }

  .msg-riff.has-cards .rc-card:last-child {
    margin-bottom: -11px;
    border-radius: 0 0 17px 17px;
  }

  .rc-chart .rc-card {
    margin-right: 0;
    margin-left: 0;
  }

  .rc-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .rc-next .rc-fig[data-inst="kb"] {
    width: 52%;
    margin: 0 auto;
  }

  .rc-next .rc-fig:not([data-inst="kb"]) {
    max-width: 76px;
  }

  .rc-dias[data-inst="kb"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .rc-insts .chip {
    min-height: 36px;
    padding: 0 11px;
    font-size: 13px;
  }

  .rc-insts {
    gap: 4px;
  }
}

/* While you practice, the conversation takes the room and the drawers step aside: the band is playing
   the card, not the Chords drawer. Done (or Close) brings them back. Once the drawers move into Create
   (P41) there's nothing under the conversation to move. */
body.rc-practicing[data-state="riff"] .drawers {
  display: none;
}

body.rc-practicing[data-state="riff"] .convo {
  flex: 1 1 auto;
  max-height: none;
}

/* ---------- a remembered conversation ---------- */

/* Pick up where we left off: it leads the starters row at the bottom of the home (Nick, 2026-11-12), lit a
   little so it reads as yours and not one more thing to ask. Its place in the row closes up when there's
   nothing to pick up. */
.rc-resume {
  border-color: color-mix(in srgb, var(--starlight) 45%, transparent);
  color: var(--starlight);
}

.rc-resume-li:has(> .rc-resume[hidden]) {
  display: none;
}

.rc-resume[hidden],
body[data-state="riff"] .rc-resume {
  display: none;
}

/* New chat, at the foot of the Menu, lined up with the rooms. */
.rc-menu-chat {
  width: min(var(--pill), 100%);
  margin: 0 auto 8px;
}

.rc-menu-chat .chip {
  min-height: 44px;
  padding: 0 16px 0 13px;
  font-size: 14px;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .rc-in {
    animation: none;
  }

  .log .msg-riff,
  .rc-pill,
  .rc-fname {
    transition: none;
  }
}

/* A link in Riff's words (a song's page, a source): his colour, underlined. */
.rc-p a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .rc-p a:hover {
    text-decoration-color: currentColor;
  }
}

/* ---------- the song builder's cards (js/riffsongcards.js; "Alive Jam mockups", screens 1 and 2) ---------- */

/* The app's chord card: the chord in its step's color, its number in the key under it. Large ones carry their
   notes below; "from verse" says in words that a chord comes from your progression. */
.rc-ccs {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 10px;
}

.rc-ccw {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rc-cc {
  --c: var(--starlight);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 9px;
  border-radius: 10px;
  background-color: var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 color-mix(in srgb, var(--c) 70%, #000);
  color: var(--on, var(--space));
  font-family: var(--ui);
  text-align: left;
  transition: translate var(--t) ease, box-shadow var(--t) ease;
}

.rc-cc-n {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-cc-num {
  font-size: 11px;
  line-height: 1.15;
}

.rc-ccs-lg .rc-cc {
  height: 56px;
  padding: 0 10px;
  border-radius: 11px;
}

.rc-ccs-lg .rc-cc-n {
  font-size: 17px;
}

.rc-ccs-lg .rc-cc-num {
  font-size: 12px;
}

.rc-cc-notes,
.rc-cc-from {
  padding-left: 2px;
  color: color-mix(in srgb, var(--starlight) 68%, transparent);
  font-size: 11px;
  line-height: 1.3;
}

.rc-cc-notes {
  font-family: var(--mono);
  font-size: 11.5px;
}

/* The chord the band is on. */
.rc-cc.is-now {
  outline: 2px solid var(--starlight);
  outline-offset: 2px;
}

.rc-cc:active {
  translate: 0 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 color-mix(in srgb, var(--c) 70%, #000);
}

/* Small ones, for a song's parts in a row: the name only. */
.rc-ccs-sm {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: auto;
  margin-top: 0;
}

.rc-ccs-sm .rc-ccw {
  flex: none;
}

.rc-ccs-sm .rc-cc {
  width: auto;
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  align-items: center;
}

.rc-ccs-sm .rc-cc-n {
  font-size: 13px;
}

.rc-ccs-sm .rc-cc-num {
  display: none;
}

/* The progression you brought, and the idea cards: panels of their own inside the bubble. */
.rc-card.rc-prog,
.rc-card.rc-idea,
.rc-card.rc-sofar,
.rc-card.rc-built,
.msg-riff.has-cards .rc-card.rc-prog,
.msg-riff.has-cards .rc-card.rc-idea,
.msg-riff.has-cards .rc-card.rc-sofar,
.msg-riff.has-cards .rc-card.rc-built {
  margin: 12px 0 4px;
  padding: 12px;
  border-radius: 12px;
}

.rc-card.rc-idea,
.msg-riff.has-cards .rc-card.rc-idea {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--space) 72%, transparent);
}

.rc-prog-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rc-prog-t {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.rc-prog-s {
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 68%, transparent);
  font-size: 12.5px;
  text-align: right;
}

.rc-prog .rc-acts,
.rc-idea .rc-acts {
  margin-top: 12px;
}

.rc-prog .rc-acts .chip,
.rc-idea .rc-acts .chip,
.rc-built .rc-acts .chip,
.rc-more .chip,
.rc-choices .chip {
  min-height: 44px;
  padding: 0 16px;
  border-color: var(--hair-hi);
  color: var(--starlight);
  font-size: 14px;
}

.rc-prog .rc-acts .chip-icon,
.rc-idea .rc-acts .chip-icon,
.rc-built .rc-acts .chip-icon {
  padding-left: 12px;
}

/* The key, with its reasons open. */
.rc-keybox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 0 12px 12px;
  border: 1px solid var(--hair-hi);
  border-radius: 12px;
}

.rc-keyhead {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  text-align: left;
}

.rc-keyname {
  font-size: 14.5px;
  font-weight: 600;
}

.rc-keysub {
  flex: 1;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13px;
}

.rc-keyhead .ic {
  width: 16px;
  height: 16px;
  rotate: 90deg;
  transition: rotate var(--t) ease;
}

.rc-keyhead[aria-expanded="true"] .ic {
  rotate: -90deg;
}

.rc-keywhy[hidden],
.rc-keyall[hidden] {
  display: none;
}

.rc-reasons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rc-reasons li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rc-reason-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--hair-hi);
  border-radius: 50%;
  font-size: 11.5px;
  line-height: 1;
}

.rc-reasons p,
.rc-keynote {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 14px;
}

.rc-reasons strong {
  color: var(--starlight);
  font-weight: 600;
}

.rc-keyask {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13.5px;
}

.rc-keyopts,
.rc-kinds,
.rc-feels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.rc-keyopt,
.rc-kind,
.rc-feel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid var(--hair-hi);
  border-radius: 12px;
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  transition: background-color var(--t) ease, border-color var(--t) ease, color var(--t) ease;
}

.rc-keyopt[aria-pressed="true"],
.rc-kind[aria-pressed="true"],
.rc-kind.is-guess,
.rc-feel[aria-pressed="true"] {
  border-color: var(--starlight);
  background-color: var(--starlight);
  color: var(--space);
  font-weight: 600;
}

.rc-keyall {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.rc-keysel {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hair-hi);
  border-radius: 12px;
  background-color: var(--panel);
  color: var(--starlight);
  font: inherit;
  font-size: 16px;
}

/* Which part is it? */
.rc-ask,
.rc-feels,
.rc-choices,
.rc-more {
  margin-top: 12px;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.45;
}

.rc-kind {
  min-height: 50px;
  padding: 4px;
  border-radius: 14px;
  font-size: 14.5px;
  white-space: nowrap;
}

.rc-kind-sub {
  font-size: 11.5px;
  font-weight: 500;
  opacity: .78;
}

.rc-unsure {
  margin: 6px 0 0 -8px;
  padding: 0 8px;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  text-align: left;
  text-decoration-color: currentColor;
}

/* How should it feel? Two across, so each feel reads whole on a phone. */
.rc-feels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rc-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-choices .chip {
  white-space: normal;
  text-align: left;
}

/* Your song so far, and a whole build: a row a part. */
.rc-sofar .rc-head {
  margin: -8px -6px 2px 0;
}

.rc-opensong {
  flex: none;
  white-space: nowrap;
}

.rc-sofar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
}

.rc-sofar-n {
  flex: none;
  min-width: 72px;
  font-size: 13.5px;
  font-weight: 600;
}

.rc-sofar-new {
  padding: 4px 9px;
  border: 1px dashed var(--hair-hi);
  border-radius: 8px;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 12.5px;
}

.rc-sofar-then {
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--starlight) 74%, transparent);
  font-size: 13px;
}

.rc-built .rc-key {
  color: var(--starlight);
  font-size: 14px;
}

/* An idea: a title of its own, in Riff's serif. */
.rc-idea-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 8px;
}

.rc-idea-t {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.rc-idea-now {
  flex: none;
  color: color-mix(in srgb, var(--starlight) 74%, transparent);
  font-size: 12.5px;
}

.rc-idea-now:empty {
  display: none;
}

.rc-idea .rc-why {
  margin-top: 10px;
  color: color-mix(in srgb, var(--starlight) 86%, transparent);
  font-size: 14px;
}

.rc-lent {
  margin: 6px 0 0;
  color: color-mix(in srgb, var(--starlight) 68%, transparent);
  font-size: 13px;
}

.rc-idea .rc-acts {
  flex-wrap: wrap;
  gap: 8px;
}

.rc-idea .rc-use {
  flex: 1;
  justify-content: center;
}

/* Change it is the quieter of the three. */
.rc-idea .rc-acts .rc-changeit {
  padding: 0 10px;
  border-color: transparent;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--starlight) 40%, transparent);
  text-underline-offset: 4px;
}

/* Under a set of ideas. */
.rc-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rc-more-note {
  flex: 1 0 100%;
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 74%, transparent);
  font-size: 13.5px;
}

.rc-rest {
  display: flex;
  flex: 1 0 100%;
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  padding: 10px 16px;
  border-radius: 14px;
  background-color: var(--starlight);
  color: var(--space);
  font-family: var(--ui);
  text-align: left;
}

.rc-rest-t {
  font-size: 15px;
  font-weight: 600;
}

.rc-rest-s {
  font-size: 12.5px;
  opacity: .8;
}

@media (hover: hover) {
  .rc-keyopt:hover:not([aria-pressed="true"]),
  .rc-kind:hover:not([aria-pressed="true"], .is-guess),
  .rc-feel:hover:not([aria-pressed="true"]) {
    border-color: var(--starlight);
  }

  .rc-cc:hover {
    translate: 0 -1px;
  }
}

@media (max-width: 640px) {
  .msg-riff.has-cards .rc-card.rc-prog:last-child,
  .msg-riff.has-cards .rc-card.rc-idea:last-child,
  .msg-riff.has-cards .rc-card.rc-sofar:last-child,
  .msg-riff.has-cards .rc-card.rc-built:last-child {
    margin-bottom: 4px;
    border-radius: 12px;
  }

  .rc-prog-s {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rc-cc,
  .rc-keyopt,
  .rc-kind,
  .rc-feel,
  .rc-keyhead .ic {
    transition: none;
  }
}
