/* Riff gets to know you (js/riffknows.js, Nick's side): his questions in the chat, with chips, room to type and
   Not now; the You row at the top of the Menu; and You, the sheet that shows what Riff remembers. Built on v2.css's
   pieces (.chip, .text-btn, .switch, .card, .card-row) and drill.css's sheet, so it reads as the same app:
   starlight on glass, Newsreader for Riff's words, Geist for anything you tap. No colour here: colour is the music's. */

/* ---------- a question in the chat ---------- */

.rk-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--ui);
  font-size: 14px;
}

.msg-riff .rk-card .msg-actions,
.msg-riff.rk-ask > .msg-actions {
  margin: 0;
}

.msg-riff.rk-ask > .msg-actions {
  margin-top: 10px;
  font-family: var(--ui);
}

.rk-say {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 440px;
  height: 44px;
  padding: 0 4px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--space) 40%, transparent);
  transition: border-color var(--t) ease;
}

.rk-say[hidden] {
  display: none;
}

.rk-say:hover {
  border-color: var(--hair-hi);
}

.rk-say:has(input:focus-visible) {
  border-color: color-mix(in srgb, var(--starlight) 40%, transparent);
  outline: 2px solid var(--starlight);
  outline-offset: 3px;
}

.rk-say input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: 15px;
}

.rk-say input::placeholder {
  color: var(--dust);
  opacity: 1;
}

.rk-say .rk-send {
  width: 36px;
  height: 36px;
}

.rk-send .ic {
  width: 16px;
  height: 16px;
}

.rk-skip {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: -12px;
}

.rk-skip .text-btn {
  min-height: 36px;
}

/* ---------- the You row, at the top of the Menu ---------- */

.menu .rk-you-card {
  flex: none;
}

/* ---------- You: what Riff remembers ---------- */

.rk-you {
  display: grid;
  gap: 18px;
  font-size: 14px;
}

.rk-lede {
  margin: 0;
  max-width: 60ch;
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  line-height: 1.5;
}

/* ---------- You's hero: their star, in full (screen 31) ---------- */

.rk-hero {
  display: grid;
  gap: 10px;
  padding: 16px 14px 6px;
  border: 1px solid color-mix(in srgb, var(--starlight) 30%, transparent);
  border-radius: 16px;
  background: radial-gradient(120% 90% at 85% 0%, #24364A 0%, #0A0C13 70%);
}

.rk-hero.is-editing {
  padding-bottom: 14px;
}

.rk-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rk-hero-ks {
  display: grid;
  gap: 2px;
  line-height: 1.3;
}

.rk-hero-k {
  color: #F6AD3B;
  font-size: 12.5px;
}

.rk-hero-sub {
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 12.5px;
}

.rk-hero-words {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rk-hero-used {
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13px;
  line-height: 1.45;
}

.rk-hero-foot {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rk-hero-foot .rk-from {
  flex: 1;
}

.rk-hero-foot .text-btn {
  min-height: 44px;
}

/* Evergreen, small, and the way in. */
.rk-tree {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--space) 50%, transparent);
  color: var(--starlight);
  text-align: left;
}

.rk-treepic {
  flex: none;
  width: 96px;
}

.rk-treepic .lt-svg {
  display: block;
  width: 96px;
  height: 125px;
  border-radius: 10px;
}

.rk-treeside {
  display: grid;
  gap: 4px;
  min-width: 0;
  line-height: 1.3;
}

.rk-treename {
  font-family: var(--serif);
  font-size: 20px;
}

.rk-treecount {
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13px;
}

.rk-treeleaves {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.rk-treego {
  font-size: 13.5px;
  font-weight: 600;
}

/* Their songs as fruit, their own songs as seeds, with their steps. */
.rk-songlist {
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.rk-song {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rk-song + .rk-song {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rk-songw {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.3;
}

.rk-songname {
  font-family: var(--serif);
  font-size: 18px;
}

.rk-songline {
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13px;
}

.rk-steps {
  display: flex;
  gap: 6px;
  padding-top: 2px;
}

.rk-step {
  width: 12px;
  height: 12px;
  border: 1.5px dashed #A6A3AC;
  border-radius: 50%;
}

.rk-step.is-done {
  border: 1.5px solid #F6AD3B;
  background: #F6AD3B;
}

.rk-sec {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rk-h {
  margin: 0;
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

.rk-h:focus {
  outline: none;
}

.rk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rk-row .switch,
.rk-row .chip {
  flex: none;
}

.rk-row .chip {
  min-height: 40px;
  color: var(--starlight);
}

.rk-line {
  margin: 0;
  max-width: 60ch;
  line-height: 1.45;
}

.rk-empty {
  color: var(--dust);
}

.rk-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-item {
  display: grid;
  gap: 2px;
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--line);
}

.rk-item:last-child {
  border-bottom: 0;
}

.rk-k {
  margin: 0;
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 500;
}

.rk-v {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rk-from {
  margin: 0;
  color: var(--dust);
  font-size: 12.5px;
}

.rk-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-left: -12px;
}

.rk-acts .text-btn {
  min-height: 40px;
}

.rk-acts .chip {
  min-height: 40px;
  margin-left: 12px;
  color: var(--starlight);
}

.rk-edit {
  display: grid;
  gap: 6px;
}

.rk-edit input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--starlight) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--space) 40%, transparent);
  font-size: 15px;
}

.rk-edit input:focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 2px;
}

.rk-confirm {
  display: grid;
  gap: 6px;
}

.rk-all {
  justify-self: start;
  margin-left: -12px;
}

.rk-danger {
  border-color: color-mix(in srgb, var(--starlight) 55%, transparent);
}

.rk-status {
  min-height: 1.45em;
  margin: -6px 0 0;
  color: var(--dust);
}

@media (hover: hover) {
  .rk-tree:hover {
    background: var(--lift);
  }

  .rk-acts .text-btn:hover,
  .rk-hero-foot .text-btn:hover,
  .rk-skip .text-btn:hover {
    color: var(--starlight);
  }
}

/* ---------- You, grouped the way Riff thinks (phase C, screen 31) ----------
   What you love, Your story, Where you're headed, How you play: each with its one line on what it's used for. Then
   "Riff hasn't asked yet", the rows still empty with Tell him now, and the foot: Riff asks questions, and where
   pausing his memory or forgetting everything has gone (Settings). */
.rk-used {
  margin-top: -4px;
  color: #A6A3AC;
  font-size: 13px;
}

.rk-unlist {
  display: grid;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.rk-un {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.rk-un + .rk-un {
  border-top: 1px solid var(--line);
}

.rk-un-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px dashed #A6A3AC;
  border-radius: 50%;
}

.rk-un-w {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.rk-you .rk-tell {
  flex: none;
  min-height: 44px;
  color: var(--starlight);
}

.rk-foot {
  gap: 0;
  padding: 2px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--space) 50%, transparent);
}

.rk-foot:focus {
  outline: none;
}

.rk-foot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 0;
}

.rk-foot-row + .rk-foot-row {
  border-top: 1px solid var(--line);
}

.rk-foot-ks {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  line-height: 1.35;
}

.rk-foot-k {
  font-weight: 600;
}

.rk-foot-sub {
  color: #A6A3AC;
  font-size: 12.5px;
}

.rk-you .rk-open-settings {
  flex: none;
  min-height: 44px;
  color: var(--starlight);
}

/* Tell him now's question in the chat: the page's own words, in Riff's voice. */
.msg-riff.rk-tell {
  margin-bottom: 2px;
}

/* Riff's pick beside his line at the top of You. */
.rk-lede-riff {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rk-lede-riff .rp {
  flex: none;
  margin-top: 2px;
}
