/* Start your journey, as one conversation with Riff (js/riffjourney.js, the cards in js/riffchat.js; Nick's side).
   From "Alive Jam mockups" screens 26 to 30, in the chat's own look (riff-chat.css): starlight on glass, Newsreader
   for Riff's words, Geist for anything you tap. Colour only ever means music: a pad takes its chord's step in the
   card's key (--c and --on, set inline from the palette in Customize). The star is gold, as home is. */

/* ---------- Riff's voice: the toggle in the chat's header, on the left of its keys ---------- */
.convo-voice {
  display: none;
}

body[data-state="riff"] .convo-tools .convo-voice {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin-right: auto;
  padding: 0 12px 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-family: var(--ui);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--t) ease, color var(--t) ease, background-color var(--t) ease;
}

.convo-voice .ic {
  width: 16px;
  height: 16px;
}

.convo-voice[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--starlight) 46%, transparent);
  background-color: var(--lift);
  color: var(--starlight);
}

@media (hover: hover) {
  .convo-voice:hover {
    border-color: var(--starlight);
    color: var(--starlight);
  }
}

/* Thumbs' size on a phone, as the chat's keys are there (chat-layout.css). */
@media (max-width: 639px) {
  body[data-state="riff"] .convo-tools .convo-voice {
    height: 40px;
    padding: 0 14px 0 11px;
  }
}

/* ---------- the first question: the question is the big line (screen 26) ---------- */
.log .msg-riff:has(.rc-firstlink) p.rc-p:nth-of-type(2) {
  margin-top: 6px;
  font-size: 25px;
  line-height: 1.2;
}

.rc-firstlink {
  margin-top: 10px;
  font-family: var(--ui);
}

.rc-firstlink .text-btn {
  min-height: 40px;
  padding: 0 2px;
  color: color-mix(in srgb, var(--starlight) 82%, transparent);
  font-size: 13.5px;
}

/* ---------- a groove to hear, and the friendly loop ---------- */
.rc-card.rc-groove .rc-why {
  margin-top: 6px;
  color: color-mix(in srgb, var(--starlight) 86%, transparent);
  font-size: 14px;
}

/* ---------- their first play: two pads to tap with the band, and a switch to their instrument (screen 28) ---------- */
.rc-card.rc-tap {
  border: 1px solid color-mix(in srgb, var(--starlight) 22%, transparent);
}

.rc-ways {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.rc-way {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.rc-way[aria-pressed="true"] {
  background-color: var(--lift);
  color: var(--starlight);
  font-weight: 600;
}

.rc-pads {
  display: grid;
  grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.rc-pad {
  --c: var(--starlight);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 72px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
  border-radius: 12px;
  background-color: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--starlight);
  font-family: var(--ui);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out), transform 80ms var(--ease-out);
}

.rc-pad-n {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
}

.rc-pad-s {
  font-size: 11.5px;
  line-height: 1.15;
  opacity: .82;
}

/* The chord the band is on lights in its own colour: tap that one. */
.rc-pad.is-now {
  border-color: var(--c);
  background-color: var(--c);
  color: var(--on, var(--space));
}

.rc-pad:active {
  transform: scale(.97);
}

.rc-tap .rc-acts .rc-play {
  flex: 1;
  justify-content: center;
}

.rc-acts .chip.rc-solid {
  border-color: var(--starlight);
  background-color: var(--starlight);
  color: var(--space);
  font-weight: 600;
}

/* ---------- their star, the moment they say it (screen 29) ---------- */
.rc-card.rc-star {
  --star: #F6AD3B;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px 14px;
  border: 1px solid color-mix(in srgb, var(--star) 80%, transparent);
  background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, #24364A 80%, transparent) 0%, color-mix(in srgb, var(--space) 46%, transparent) 75%);
  text-align: center;
}

.log .msg-riff:has(> .rc-star) {
  border-color: transparent;
  background-color: transparent;
}

.rc-star-ic {
  width: 48px;
  height: 48px;
}

.rc-star-ic circle {
  fill: var(--star);
  opacity: .13;
}

.rc-star-ic path {
  fill: var(--star);
}

.rc-star-h {
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 600;
}

.rc-star-w {
  max-width: 44ch;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rc-star-s {
  max-width: 44ch;
  margin: 2px 0 0;
  color: color-mix(in srgb, var(--starlight) 74%, transparent);
  font-size: 12.5px;
}

/* ---------- what a play grew, when the band stops (screens 29 and 30; js/stopline.js writes it) ---------- */
.rc-card.rc-grew {
  display: grid;
  gap: 2px;
  padding: 12px;
}

.log .msg-riff:has(> .rc-grew:only-child),
.log .msg-riff:has(> .visually-hidden + .rc-grew:last-child) {
  border-color: transparent;
  background-color: transparent;
}

.rc-grew-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rc-grew-pic {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
}

.rc-grew-arrow {
  color: var(--dust);
  font-size: 15px;
}

.rc-grew-words {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  line-height: 1.35;
}

.rc-grew-t {
  font-family: var(--ui);
  font-size: 14.5px;
  font-weight: 600;
}

.rc-grew-l {
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-family: var(--ui);
  font-size: 13px;
}

.rc-grew-acts {
  display: flex;
}

.rc-grew-go {
  min-height: 44px;
  padding: 0 4px;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- the top of each sitting: the day, and their star, small (screen 30) ---------- */
.rc-sit {
  display: grid;
  gap: 6px;
  margin: 4px 0 2px;
}

.rc-sit-day {
  justify-self: center;
  margin: 0;
  color: var(--dust);
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .rc-pad,
  .convo-voice {
    transition: none;
  }

  .rc-pad:active {
    transform: none;
  }
}
