/* The Listen room (js/listenroom.js): the visual, full size, and a small player. Starlight on glass, like the play
   bar and the rooms. Nick's side. Riff, the doors, the drawers and the chips step aside while it's open; the
   settings at the top stay. */

/* ---------- the room: everything that builds steps aside ---------- */

body.is-listen :is(.stage, .bottom, .corner, .scrim, .tbar, .show-ui) {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out), visibility 0s 300ms;
}

body.is-listen .viz {
  filter: none;
}

/* Full screen from inside Listen: the player steps aside with the rest, and is back when you leave it. */
body.is-display :is(.lsn, .lsb) {
  visibility: hidden;
  opacity: 0;
}

/* Quiet: after a few seconds of music the player and the settings fade, and come back at a touch. The live chord
   stays: it's for watching, like the visual. */
.lsn > *,
body.is-listen :is(.stack, .wordmark) {
  transition: opacity 500ms var(--ease-out);
}

body.lsn-idle :is(.lsn > *, .stack, .wordmark) {
  opacity: 0;
  pointer-events: none;
}

body.lsn-idle .lsn {
  pointer-events: none;
}

body.lsn-idle {
  cursor: none;
}

@media (prefers-reduced-motion: reduce) {
  .lsn > *,
  body.is-listen :is(.stack, .wordmark) {
    transition: none;
  }
}

/* ---------- the pill and the live chord, over the visual (Listen A, screens 45 and 48) ---------- */

.lsn-over {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 7vh, 72px);
  padding: 80px var(--gutter) 0;
  pointer-events: none;
}

.lsn-over[hidden],
.lsn-over [hidden] {
  display: none;
}

.lsn-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--hair-hi);
  border-radius: var(--r-pill);
  background-color: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--starlight);
  font-size: 13.5px;
  pointer-events: auto;
  cursor: pointer;
}

.lsn-pill .ic {
  flex: none;
  width: 16px;
  height: 16px;
}

.lsn-pill .ic:last-child {
  width: 14px;
  height: 14px;
  color: var(--dust);
}

.lsn-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsn-pill-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9EDA97;
  box-shadow: 0 0 0 4px rgba(158, 218, 151, .18);
}

.lsn-live {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  text-align: center;
  text-shadow: 0 0 40px rgba(0, 0, 0, .6), 0 1px 3px rgba(0, 0, 0, .5);
}

.lsn-live[hidden] {
  display: none;
}

.lsn-live-label {
  color: var(--dust);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lsn-live-now {
  min-width: 2ch;
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
}

.lsn-live-now.is-quiet {
  color: var(--dust);
}

.lsn-live-sub {
  color: color-mix(in srgb, var(--starlight) 82%, transparent);
  font-size: 14px;
}

.lsn-live-num:empty {
  display: none;
}

.lsn-live-trail {
  margin-top: 6px;
  overflow: hidden;
  color: color-mix(in srgb, var(--starlight) 64%, transparent);
  font-size: 15px;
  white-space: pre;
}

.lsn-live-trail:empty {
  display: none;
}

/* The strip that follows the chart: "Hey Jude, verse, bar 5", and five bars with this one lit. */
.lsn-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: clamp(18px, 5vh, 48px);
  text-shadow: none;
}

.lsn-strip-label {
  color: color-mix(in srgb, var(--starlight) 72%, transparent);
  font-size: 12.5px;
}

.lsn-strip-cells {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.lsn-cell {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--hair-hi);
  border-radius: 10px;
  background: color-mix(in srgb, var(--space) 70%, transparent);
  color: color-mix(in srgb, var(--starlight) 75%, transparent);
  font-size: 15px;
  font-weight: 600;
}

.lsn-cell.is-now {
  border-color: transparent;
  background: var(--starlight);
  color: var(--space);
}

/* With room, over the middle of the visual, with no label: the chord sits inside the circle (screen 48). */
@media (min-width: 900px) {
  .lsn-over {
    gap: 0;
    padding-top: 22px;
  }

  .lsn-live {
    margin-top: clamp(80px, 24vh, 220px);
  }

  .lsn-live-label {
    display: none;
  }

  .lsn-live-now {
    font-size: 112px;
  }
}

@media (max-width: 899px) {
  .lsn-live-num {
    display: none;
  }
}

/* While the player fades, the pill fades with it; the live chord stays. */
body.lsn-idle .lsn-pill {
  opacity: 0;
  pointer-events: none;
}

.lsn-pill {
  transition: opacity 500ms var(--ease-out);
}

/* Live chords, Chart, How it looks and Full screen. */
.lsn-ctl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lsn-ctl .chip {
  min-height: 40px;
}

.lsn-ctl .lsn-btn {
  border: 1px solid var(--line);
}

/* ---------- the player, and the panel that opens above it ---------- */

.lsn {
  position: fixed;
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  left: 50%;
  z-index: 56;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(520px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 2 * var(--gutter) - 64px);
  translate: -50% 0;
  color: var(--starlight);
}

.lsn[hidden] {
  display: none;
}

.lsn-player,
.lsn-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background-color: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.lsn-player {
  display: grid;
  flex: none;
  gap: 8px;
  padding: 14px 14px 12px 18px;
}

.lsn-now {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lsn-words {
  flex: 1;
  min-width: 0;
}

/* A named song's cover, small, when the song box isn't showing it beside the room. */
.lsn-art {
  flex: none;
  width: 56px;
  height: 56px;
  margin-right: 4px;
  border-radius: 8px;
  object-fit: cover;
}

.lsn-title,
.lsn-sub,
.lsn-status {
  margin: 0;
}

.lsn-title {
  overflow: hidden;
  font-family: var(--serif, "Newsreader", Georgia, serif);
  font-size: 22px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsn-sub {
  overflow: hidden;
  color: var(--dust);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsn-status {
  color: var(--dust);
  font-size: 12.5px;
  line-height: 1.4;
}

.lsn-status:empty {
  display: none;
}

.lsn-keys {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: -8px;
}

.lsn-gap {
  flex: 1;
}

.lsn-btn,
.lsn-play {
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: var(--starlight);
}

.lsn-btn {
  width: 44px;
  height: 44px;
}

.lsn-btn .ic {
  width: 22px;
  height: 22px;
}

.lsn-btn:disabled {
  color: color-mix(in srgb, var(--dust) 55%, transparent);
}

.lsn-play {
  width: 52px;
  height: 52px;
  background: var(--starlight);
  color: var(--space);
}

.lsn-play .ic {
  width: 24px;
  height: 24px;
}

/* Up next: the list's mark with how many are lined up. */
.lsn-more {
  display: inline-flex;
  gap: 4px;
  width: auto;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.lsn-more[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--starlight) 55%, transparent);
  background-color: color-mix(in srgb, var(--starlight) 8%, transparent);
}

.lsn-more-n {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.lsn-more-n:empty {
  display: none;
}

.lsn-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  color: var(--dust);
}

.lsn-close .ic {
  width: 16px;
  height: 16px;
}

.lsn-keep {
  flex: none;
  color: var(--starlight);
}

.lsn :is(.lsn-btn, .lsn-play, .lsn-pick, .lsn-item):active {
  scale: .97;
}

@media (hover: hover) {
  .lsn-btn:not(:disabled):hover,
  .lsn-item:hover,
  .lsn-pick:hover {
    background-color: color-mix(in srgb, var(--starlight) 7%, transparent);
  }
}

/* Name this song, and "About this song" once it has a name: shown when the sound isn't the band. */
.lsn-namerow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lsn-namerow .chip {
  min-height: 36px;
  color: var(--starlight);
}

.lsn-namerow .chip:disabled {
  color: var(--dust);
}

.lsn-vol {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lsn-vol[hidden],
.lsn-panel[hidden],
.lsn-moods[hidden],
.lsn [hidden] {
  display: none;
}

.lsn-vol-h {
  color: var(--dust);
  font-size: 13px;
}

.lsn-range {
  flex: 1;
  height: 32px;
  accent-color: var(--starlight);
}

/* ---------- the panel ---------- */

.lsn-panel {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 16px 12px 14px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lsn-sec {
  display: grid;
  gap: 8px;
  min-width: 0;
}

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

.lsn-queue {
  display: grid;
  gap: 2px;
  margin: 0 0 0 -10px;
  padding: 0;
  list-style: none;
}

.lsn-item,
.lsn-pick {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--starlight);
  text-align: left;
}

.lsn-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  min-height: 40px;
}

.lsn-item-name,
.lsn-pick-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsn-item-sub,
.lsn-pick-line {
  color: var(--dust);
  font-size: 12.5px;
  line-height: 1.4;
}

.lsn-item-sub {
  white-space: nowrap;
}

/* The one that's playing. */
.lsn-item[aria-current="true"] {
  background-color: color-mix(in srgb, var(--starlight) 10%, transparent);
}

.lsn-empty {
  padding: 4px 10px;
  color: var(--dust);
  font-size: 13px;
}

.lsn-picks {
  display: grid;
  gap: 2px;
  margin-left: -10px;
}

.lsn-moods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 10px 8px;
}

.lsn-vrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lsn :is(button, input):focus-visible,
.lsb :is(button, a, [role="tabpanel"]):focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 2px;
}

/* ---------- the song box (js/listensong.js): a named song's cover, its chords and Riff's words ---------- */

.lsb {
  display: grid;
  flex: 0 1 auto;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  background-color: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--starlight);
}

.lsb[hidden],
.lsb [hidden] {
  display: none;
}

/* On a wide screen: on the left, clear of the player (520 pixels wide, in the middle), with the cover across the
   top. Folded, the cover and the names stay while the player fades. listenroom.js's WIDE is where it fits. */
.lsb[data-place="side"] {
  position: fixed;
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  left: var(--gutter);
  z-index: 56;
  width: min(360px, calc(50vw - 260px - var(--gutter) - 16px));
  max-height: calc(100dvh - 88px - var(--gutter));
}

.lsb-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.lsb-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background-color: color-mix(in srgb, var(--starlight) 8%, transparent);
  object-fit: cover;
}

.lsb-noart {
  display: grid;
  place-items: center;
  color: var(--dust);
}

.lsb-noart .ic {
  width: 40%;
  height: 40%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Beside the room: the cover across the box, the names under it, the keys on the cover's corner. */
.lsb[data-place="side"] .lsb-head {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.lsb[data-place="side"] .lsb-art {
  border-radius: 14px;
}

.lsb[data-place="side"] .lsb-title {
  font-size: 24px;
}

.lsb[data-place="side"] .lsb-keys {
  position: absolute;
  top: 8px;
  right: 8px;
}

.lsb[data-place="side"] .lsb-keys .lsn-btn {
  border-color: transparent;
  background-color: color-mix(in srgb, var(--space) 72%, transparent);
  color: var(--starlight);
}

.lsb-words {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lsb-title,
.lsb-artist,
.lsb-album,
.lsb-line,
.lsb-fine,
.lsb-p,
.lsb-h,
.lsb-links {
  margin: 0;
}

.lsb-title {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--serif, "Newsreader", Georgia, serif);
  font-size: 20px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.lsb-artist {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsb-album {
  overflow: hidden;
  color: var(--dust);
  font-size: 12.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsb-keys {
  display: flex;
  align-self: start;
  gap: 4px;
}

.lsb-keys .lsn-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  color: var(--dust);
}

.lsb-keys .ic {
  width: 16px;
  height: 16px;
}

/* The chevron points down when there's more to open, up when it's open. */
.lsb-fold .ic {
  rotate: 90deg;
}

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

/* Above the player there's no compact view: it's open or away. */
.lsb[data-place="stack"] .lsb-fold {
  display: none;
}

.lsb-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.lsb-tabs {
  display: flex;
  gap: 6px;
}

.lsb-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--dust);
  font-size: 13px;
  font-weight: 500;
}

.lsb-tab[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--starlight) 55%, transparent);
  background-color: color-mix(in srgb, var(--starlight) 8%, transparent);
  color: var(--starlight);
}

.lsb-pane {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lsb-line {
  font-size: 14px;
  line-height: 1.5;
}

.lsb-wait,
.lsb-fine {
  color: var(--dust);
}

.lsb-fine {
  font-size: 12.5px;
  line-height: 1.45;
}

.lsb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--dust);
  font-size: 13px;
}

.lsb-i {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dust);
  font-family: var(--serif, "Newsreader", Georgia, serif);
  font-size: 14px;
  font-style: italic;
}

.lsb-i[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--starlight) 55%, transparent);
  color: var(--starlight);
}

.lsb-parts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lsb-part {
  display: grid;
  gap: 6px;
}

.lsb-part-name,
.lsb-h {
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

.lsb-prog {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* The chord the page hears, lit in the chart. */
.lsb-ch.is-heard {
  border-color: var(--starlight);
  background-color: var(--starlight);
  color: var(--space);
}

.lsb-check {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.lsb-check[hidden] {
  display: none;
}

.lsb-ch {
  min-width: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.lsb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lsb .chip {
  min-height: 36px;
  color: var(--starlight);
}

/* Links that sit with the keys: Find it on Ultimate Guitar. */
.lsb a.chip {
  text-decoration: none;
}

/* Set it up in Jam: the box's one filled key, as Play is the player's. */
.lsb .lsb-setup {
  min-height: 40px;
  padding: 0 16px;
  border-color: var(--starlight);
  background-color: var(--starlight);
  color: var(--space);
  font-size: 14px;
  font-weight: 600;
}

.lsb-sec {
  display: grid;
  gap: 4px;
}

.lsb-p {
  font-size: 14px;
  line-height: 1.5;
}

.lsb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.lsb-links a {
  color: var(--starlight);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--starlight) 40%, transparent);
  text-underline-offset: 3px;
}

.lsb :is(.lsn-btn, .chip, .lsb-tab, .lsb-i):active {
  scale: .97;
}

@media (hover: hover) {
  .lsb :is(.lsn-btn, .lsb-tab, .lsb-i, .chip:not(.lsb-setup)):hover {
    background-color: color-mix(in srgb, var(--starlight) 7%, transparent);
  }

  .lsb[data-place="side"] .lsb-keys .lsn-btn:hover {
    background-color: color-mix(in srgb, var(--space) 88%, transparent);
  }

  .lsb-links a:hover {
    text-decoration-color: currentColor;
  }
}

@media (max-width: 639px) {
  .lsn {
    --gutter: 12px;
    max-height: calc(100dvh - 96px);
  }

  .lsn-title {
    font-size: 20px;
  }
}

/* ---------- What should Jam listen to? (js/listenwayin.js; screens 43, 44 and 49) ---------- */
/* On a phone a sheet from the bottom, one page at a time; with room, a panel with the choices on the left and the
   page on the right. The visual moves on behind it. */

.lwi {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: color-mix(in srgb, var(--space) 35%, transparent);
  color: var(--starlight);
}

.lwi[hidden],
.lwi [hidden] {
  display: none;
}

.lwi-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100dvh - 72px);
  padding: 10px 16px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.lwi-top {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.lwi-gap {
  flex: 1;
}

.lwi-close {
  border: 1px solid var(--line);
}

.lwi-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-left: -6px;
  padding: 0 8px 0 2px;
  border-radius: var(--r-pill);
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13.5px;
}

.lwi-back .ic {
  width: 16px;
  height: 16px;
}

.lwi-cols {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lwi-choose,
.lwi-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.lwi-h {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

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

h3.lwi-h {
  font-size: 22px;
}

.lwi-sub {
  margin: 8px 0 0;
  color: var(--dust);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.lwi-p {
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 14px;
}

.lwi-lead {
  color: var(--starlight);
}

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

.lwi-warn {
  margin: 0;
  color: #F6AD3B;
  font-size: 13.5px;
}

.lwi-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lwi-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--hair-hi);
  border-radius: 16px;
  background: color-mix(in srgb, var(--space) 55%, transparent);
  text-align: left;
  cursor: pointer;
}

.lwi-choice[aria-current="true"] {
  border-color: color-mix(in srgb, var(--starlight) 70%, transparent);
  background: color-mix(in srgb, var(--starlight) 7%, transparent);
}

.lwi-choice-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--starlight) 8%, transparent);
}

.lwi-choice-ic .ic {
  width: 22px;
  height: 22px;
}

.lwi-choice-words {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.35;
}

.lwi-choice-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 15.5px;
  font-weight: 600;
}

.lwi-choice-line {
  color: color-mix(in srgb, var(--starlight) 68%, transparent);
  font-size: 13px;
}

.lwi-tag {
  padding: 2px 8px;
  border: 1px solid var(--hair-hi);
  border-radius: var(--r-pill);
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 11.5px;
  font-weight: 500;
}

.lwi .ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lwi-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--starlight);
  color: var(--space);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lwi-go .ic {
  width: 18px;
  height: 18px;
}

.lwi-go:disabled {
  opacity: .7;
}

.lwi-detail > .lwi-go {
  width: 100%;
}

.lwi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lwi-row .chip,
.lwi-tomic {
  min-height: 44px;
  color: var(--starlight);
}

.lwi-out .ic,
.lwi-row .chip .ic {
  width: 14px;
  height: 14px;
}

.lwi-out {
  text-decoration: none;
}

.lwi-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--space) 60%, transparent);
  list-style: none;
}

.lwi-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13.5px;
}

.lwi-bullets .ic {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: #9EDA97;
}

/* After yes: Play something, with the level and whether it's loud enough. */
.lwi-check {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--hair-hi);
  border-radius: 16px;
}

.lwi-check-h {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.lwi-meter {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
}

.lwi-bar {
  flex: 1;
  height: calc(34px * var(--h, .2));
  border-radius: 2px;
  background: var(--hair-hi);
  transition: height 70ms linear;
}

.lwi-bar.is-on {
  background: #9EDA97;
}

.lwi-heard {
  margin: 0;
  color: #F6AD3B;
  font-size: 13.5px;
}

.lwi-heard.is-ok {
  color: #9EDA97;
}

.lwi-heard:empty {
  display: none;
}

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

.lwi-help summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.lwi-help p + p {
  margin-top: 6px;
}

/* Hear music on this computer: three steps, and the browser's own window drawn. */
.lwi-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lwi-step {
  display: flex;
  gap: 14px;
}

.lwi-step-n {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--starlight);
  color: var(--space);
  font-size: 14px;
  font-weight: 600;
}

.lwi-step-words {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lwi-step-h {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.lwi-step-words strong {
  color: var(--starlight);
  font-weight: 600;
}

.lwi-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  padding: 12px;
  border-radius: 12px;
  background: #E9E7E2;
  color: #222;
  font-size: 12px;
}

.lwi-picker-tabs {
  display: flex;
  gap: 14px;
  color: #555;
  font-weight: 600;
}

.lwi-picker-tabs .is-on {
  border-bottom: 2px solid #1A73E8;
  color: #1A5BC4;
}

.lwi-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lwi-picker-list span {
  padding: 6px 8px;
  border-radius: 6px;
}

.lwi-picker-list .is-on {
  background: #D2E3FC;
}

.lwi-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lwi-picker-sw {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lwi-picker-knob {
  position: relative;
  width: 26px;
  height: 14px;
  border-radius: 7px;
  background: #1A73E8;
}

.lwi-picker-knob::after {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.lwi-picker-share {
  padding: 5px 12px;
  border-radius: 6px;
  background: #1A5BC4;
  color: #fff;
  font-weight: 600;
}

/* Songs from your lessons. */
.lwi-songs {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lwi-song {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 6px 4px;
  border-top: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.lwi-song-words {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.lwi-song-name {
  font-size: 14.5px;
  font-weight: 600;
}

.lwi-song-by {
  color: var(--dust);
  font-size: 12.5px;
}

.lwi-song .ic {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--dust);
}

.lwi-moments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  list-style: none;
  font-size: 14px;
}

.lwi-moments li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lwi-at {
  color: var(--dust);
  font-size: 12.5px;
}

.lwi :is(button, a):focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 2px;
}

@media (hover: hover) {
  .lwi-choice:hover,
  .lwi-song:hover {
    background-color: color-mix(in srgb, var(--starlight) 6%, transparent);
  }
}

@media (min-width: 900px) {
  .lwi {
    align-items: flex-start;
    padding-top: 84px;
  }

  .lwi-sheet {
    width: min(1000px, calc(100vw - 2 * var(--gutter)));
    max-height: calc(100dvh - 108px);
    padding: 16px 24px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
  }

  .lwi-cols {
    flex-direction: row;
    align-items: flex-start;
    gap: 22px;
  }

  .lwi-choose {
    flex: none;
    width: 340px;
  }

  .lwi-detail {
    flex: 1;
    gap: 14px;
    padding: 20px 22px;
    border: 1px solid var(--hair-hi);
    border-radius: 18px;
    background: color-mix(in srgb, var(--space) 45%, transparent);
  }

  .lwi-detail > .lwi-go {
    width: auto;
    align-self: flex-start;
  }
}

/* ---------- the song card's marks: where a fact came from, how sure (screen 46) ---------- */

.lsb-sure {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #F6AD3B;
  font-size: 12px;
  line-height: 1.35;
}

.lsb-sure.is-heard,
.lsb-sure.is-checked,
.lsb-sure.is-reviewed {
  color: #9EDA97;
}

.lsb-part-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
}

.lsb-for {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsb-moments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  list-style: none;
}

.lsb-moment {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lsb-at {
  color: var(--dust);
  font-size: 12.5px;
}

.lsb-wrong-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsb-words-in {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--hair-hi);
  border-radius: 10px;
  background: color-mix(in srgb, var(--space) 60%, transparent);
  color: var(--starlight);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.lsb-wrong-btn {
  margin-left: -12px;
  text-decoration-color: color-mix(in srgb, var(--dust) 60%, transparent);
}

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

/* The words around the live chord keep a little dark behind them, so they read over a bright visual. */
.lsn-live-sub,
.lsn-live-trail,
.lsn-strip-label {
  padding: 1px 10px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--space) 58%, transparent);
}

/* ---------- the song library's marks (Listen B1): the level, its i with the score, and Jam certified ---------- */

.lsb-mark {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  max-width: 100%;
}

.lsb-mark .lsb-i {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.lsb-mark-tip {
  flex-basis: 100%;
  margin: 0;
}

.lsb-certified {
  color: var(--starlight);
}

.lsb-down {
  color: var(--dust);
}

/* ---------- Listen B2: worked out from the chart (you can play this now, how it moves, the artist's shows) ---------- */

.lsb-play {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.lsb-play-v {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.lsb-play-v.is-now {
  color: #9EDA97;
}

.lsb-play-inst {
  color: var(--dust);
  font-weight: 500;
}

.lsb-play .lsb-fine,
.lsb-moves .lsb-fine {
  margin: 0;
}

.lsb-moves {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsb-move-parts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lsb-move-part {
  display: grid;
  gap: 6px;
}

.lsb-move-name {
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

.lsb-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lsb-num {
  min-width: 40px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

/* A chord from outside the key: borrowed, a pull, or from further off. */
.lsb-num.is-borrowed,
.lsb-num.is-pull,
.lsb-num.is-outside {
  border-color: #F6AD3B;
  color: #F3D9A4;
}

.lsb-like {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lsb-like-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lsb-like-song {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lsb-like-name {
  font-size: 13.5px;
}

.lsb-shows {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin: 0;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.lsb-shows[hidden] {
  display: none;
}

.lsb-shows-a {
  color: var(--starlight);
}

.lsb-shows-from {
  flex-basis: 100%;
}

/* Songs from your lessons (Listen B2): can you play it now, how it moves, and the playlists by progression. */
.lwi-song-play {
  color: #F6AD3B;
  font-size: 12.5px;
}

.lwi-song-play.is-now {
  color: #9EDA97;
}

p.lwi-song-play {
  margin: 0;
}

.lwi-lists {
  margin-bottom: 4px;
}

.lwi-list[aria-pressed="true"] {
  border-color: var(--starlight);
  color: var(--starlight);
}

/* ---------- How it looks (Listen C, screens 47 and 50; js/looksheet.js) ----------
   A sheet over the bottom of a phone, a panel at the side of a computer; the visual changes behind it either way. */

.lks {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--starlight);
}

.lks[hidden],
.lks [hidden] {
  display: none;
}

.lks-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-height: min(64dvh, calc(100dvh - 120px));
  padding: 14px 16px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.lks-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lks-h {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.2;
}

.lks-close {
  border: 1px solid var(--line);
}

.lks-auto {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--space) 40%, transparent);
}

.lks-auto-words {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.lks-auto-name {
  font-size: 14.5px;
  font-weight: 600;
}

.lks-auto-line,
.lks-gl,
.lks-from-p {
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 62%, transparent);
  font-size: 12.5px;
  line-height: 1.4;
}

.lks-switch {
  display: flex;
  flex: none;
  align-items: center;
  width: 46px;
  height: 28px;
  padding: 0 3px;
  border: 1px solid var(--hair-hi);
  border-radius: var(--r-pill);
  cursor: pointer;
}

.lks-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--dust);
  transition: translate 160ms var(--ease-out), background-color 160ms;
}

.lks-switch[aria-checked="true"] {
  border-color: var(--starlight);
  background: var(--starlight);
}

.lks-switch[aria-checked="true"] .lks-knob {
  background: var(--space);
  translate: 18px 0;
}

.lks-note {
  margin: 0;
  color: #F3C46A;
  font-size: 13px;
}

.lks-note:empty {
  display: none;
}

.lks-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lks-gh {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
}

.lks-gl {
  margin-top: -6px;
}

.lks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lks-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 6px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lks-tile:hover {
  border-color: var(--hair-hi);
}

.lks-tile[aria-pressed="true"] {
  border: 2px solid var(--starlight);
  padding: 5px 5px 7px;
}

.lks-tile[aria-disabled="true"] {
  cursor: default;
}

.lks-tile[aria-disabled="true"] :is(.lks-pic, .lks-name) {
  opacity: .5;
}

.lks-pic {
  display: block;
  overflow: hidden;
  border-radius: 9px;
  background: #070910;
  aspect-ratio: 104 / 70;
}

.lks-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.lks-new {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: #F6AD3B;
  color: var(--space);
  font-size: 10.5px;
  font-weight: 600;
}

.lks-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.lks-sub {
  color: color-mix(in srgb, var(--starlight) 58%, transparent);
  font-size: 11px;
  line-height: 1.25;
}

.lks-sub:empty {
  display: none;
}

.lks-from {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px dashed var(--hair-hi);
  border-radius: 14px;
}

.lks-from-h {
  margin: 0;
  font-size: 13.5px;
}

.lks-from-a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--starlight);
  font-size: 13px;
  text-underline-offset: 3px;
}

/* The flat visuals' canvas (js/looks.js), where the Three.js one is; while one shows, the Three.js canvas steps aside. */
.viz-flat[hidden] {
  display: none;
}

.viz.is-flat {
  opacity: 0;
}

.viz-flat {
  pointer-events: none;
}

@media (min-width: 900px) {
  .lks {
    align-items: stretch;
    justify-content: flex-end;
    pointer-events: none;
  }

  .lks-sheet {
    width: 400px;
    max-height: none;
    padding: 22px 20px 24px;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    pointer-events: auto;
  }

  /* The visual's middle, the live chord and the player move over, out from under the panel. */
  body.is-looking.is-listen .lsn-over {
    padding-right: 400px;
  }

  body.is-looking.is-listen .lsn {
    left: calc(50% - 200px);
  }
}
