/* Learn: the lessons (js/learn.js; the number system is js/learn-number.js) and the tap-timing check
   (js/timing.js). Nick's side. They open over the screen in the drill-through's sheet or panel (drill.css):
   starlight on glass, like the rooms. Calm on purpose: few words, quiet chrome. Riff's serif carries the
   words about the music (the feel line and the answers); Geist is everything you tap. Color only means
   music: a number's color is its step in the key (--c), and home is always gold. */

.ln {
  container-type: inline-size;
  padding-bottom: 4px;
}

.ln :focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 3px;
}

.ln-lede {
  margin: 0;
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 14px;
  line-height: 1.5;
}

/* "i": the rooms' hairline circle in a 40px hit area */
.ln-i {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -10px -6px -10px -4px;
  vertical-align: middle;
  border-radius: var(--r-pill);
}

.ln-i span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
}

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

.ln-info {
  max-width: 60ch;
  margin: 8px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13.5px;
  line-height: 1.5;
}

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

.ln-info p {
  margin: 0;
}

.ln-info p + p {
  margin-top: 6px;
}

.ln-info b {
  color: var(--starlight);
  font-weight: 500;
}

/* ---------- the path, and the key and sound ---------- */

.ln-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
}

.ln-path ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ln-p {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: var(--dust);
  font-size: 13px;
  font-weight: 500;
}

.ln-pn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
}

.ln-p.done .ln-pn {
  border-color: transparent;
  background: color-mix(in srgb, var(--starlight) 16%, transparent);
  color: var(--starlight);
}

.ln-pname {
  display: none;
  white-space: nowrap;
}

.ln-p.on {
  padding-right: 14px;
  border-color: var(--line);
  color: var(--starlight);
}

.ln-p.on .ln-pn {
  border-color: var(--starlight);
  background: var(--starlight);
  color: var(--space);
}

.ln-p.on .ln-pname {
  display: inline;
}

@media (hover: hover) {
  .ln-p:hover .ln-pn {
    border-color: var(--hair-hi);
  }
}

.ln-setbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--starlight);
  font-size: 13.5px;
  font-weight: 500;
}

.ln-setbtn[aria-expanded="true"] .pm-v {
  opacity: 0;
}

.ln-setslot {
  margin: 0 0 10px;
}

.ln-settings {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.drill-body > .ln-settings {
  padding: 0;
  border: 0;
}

.ln-srow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  font-size: 14px;
}

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

.ln-selwrap {
  position: relative;
  display: inline-flex;
}

.ln-sel {
  min-height: 40px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F1EDE4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--starlight);
  font: inherit;
  font-size: 14px;
}

.ln-sel option {
  background: var(--panel);
}

.ln-seg {
  display: inline-flex;
  gap: 6px;
}

.ln-tap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}

.ln-tapsay {
  color: var(--dust);
  font-size: 13.5px;
}

.ln-sfine {
  margin: 6px 0 0;
  color: var(--dust);
  font-size: 12.5px;
}

/* ---------- the stage ---------- */

.ln-stage {
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.ln-stephead {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.ln-stephead h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.ln-stepno {
  display: block;
  margin-bottom: 2px;
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 400;
}

.ln-stephead .ln-i {
  margin: -4px -8px 0 0;
}

/* The feel, in Riff's voice. */
.ln-feel {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.4;
}

.ln-song {
  margin: 6px 0 0;
  color: var(--dust);
  font-size: 13.5px;
  line-height: 1.5;
}

.ln-song b {
  color: var(--starlight);
  font-weight: 500;
}

/* the loop: one slot per chord, as wide as it lasts (a row is four bars) */
.ln-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 600px;
  margin: 18px auto 0;
  padding: 0;
  list-style: none;
}

.ln-slot {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  width: calc((100% - 24px) * var(--w) / 16 + (var(--w) / 4 - 1) * 8px);
  min-height: 80px;
  padding: 9px 2px 18px;
  border: 1px dashed color-mix(in srgb, var(--starlight) 24%, transparent);
  border-radius: var(--r-card);
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.ln-slot b {
  min-height: 26px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.ln-slot span {
  min-height: 16px;
  color: var(--dust);
  font-size: 13px;
  font-weight: 500;
}

.ln-slot.half b {
  min-height: 20px;
  font-size: 20px;
}

.ln-slot.half span {
  font-size: 11.5px;
}

.ln-slot.shown {
  border-style: solid;
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}

.ln-slot.shown b {
  color: color-mix(in oklab, var(--c) 82%, var(--starlight));
}

.ln-slot.cur {
  border-style: solid;
  border-color: var(--starlight);
}

.ln-slot.later b {
  color: var(--dust);
  opacity: .5;
}

.ln-slot.now {
  transform: translateY(-3px);
  border-color: var(--starlight);
}

.ln-slot.shown.now {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 22%, transparent);
}

.ln-beat {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  display: flex;
  gap: 4px;
  justify-content: center;
}

.ln-beat i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
}

.ln-beat i.on {
  background: var(--starlight);
}

/* play, the question and the answers */
.ln-ctl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.ln-play,
.ln-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--starlight);
  border-radius: var(--r-pill);
  background: var(--starlight);
  color: var(--space);
  font-size: 15px;
  font-weight: 500;
  transition: background-color var(--t) ease, color var(--t) ease, scale var(--t) ease;
}

.ln-play {
  padding-left: 16px;
}

.ln-play[aria-pressed="true"] {
  background: transparent;
  color: var(--starlight);
}

.ln-status {
  color: var(--dust);
  font-size: 13px;
}

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

.ln-ask {
  margin: 16px 0 10px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.ln-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ln-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 68px;
  padding: 8px 14px;
  border: 1.5px solid var(--c);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  transition: background-color var(--t) ease, scale var(--t) ease, opacity var(--t) ease;
}

.ln-chip b {
  color: color-mix(in oklab, var(--c) 82%, var(--starlight));
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.ln-chip.word b {
  font-size: 17px;
}

.ln-chip small {
  color: var(--dust);
  font-size: 12px;
}

.ln-chip kbd {
  position: absolute;
  top: 5px;
  right: 8px;
  color: var(--dust);
  font-family: var(--mono);
  font-size: 10px;
  opacity: .7;
}

.ln-chip:disabled {
  opacity: .36;
}

@media (hover: hover) {
  .ln-chip:hover:not(:disabled) {
    background: color-mix(in srgb, var(--c) 22%, transparent);
  }

  .ln-ghost:hover,
  .ln-setbtn:hover {
    border-color: var(--hair-hi);
    background-color: var(--lift);
  }

  .ln-primary:hover,
  .ln-play:not([aria-pressed="true"]):hover {
    background-color: #fff;
  }
}

@media (pointer: coarse) {
  .ln-chip kbd {
    display: none;
  }
}

:is(.ln-play, .ln-primary, .ln-ghost, .ln-chip, .ln-p, .ln-setbtn):active:not(:disabled) {
  scale: .98;
}

/* What happened, in words (Riff's voice), then what's next. */
.ln-say {
  max-width: 56ch;
  margin: 16px auto 0;
  text-align: center;
}

.ln-say p {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
}

.ln-say p + p {
  margin-top: 8px;
}

.ln-after {
  margin-top: 6px;
  text-align: center;
}

.ln-after > p {
  margin: 8px 0 0;
  color: var(--dust);
  font-size: 13.5px;
  line-height: 1.5;
}

.ln-after .ln-info {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.ln-after .ln-stepdone {
  color: var(--starlight);
}

/* The why, said after every round; "More about this" opens the rest. */
.ln-after .ln-why {
  max-width: 56ch;
  margin-right: auto;
  margin-left: auto;
  color: color-mix(in srgb, var(--starlight) 82%, transparent);
  font-size: 14.5px;
}

.ln-after .ln-info {
  max-width: 60ch;
  text-align: left;
}

.ln-link {
  min-height: 36px;
  padding: 4px 6px;
  color: var(--starlight);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--starlight) 40%, transparent);
  text-underline-offset: 3px;
}

.ln-land,
.ln-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.ln-next {
  margin-top: 16px;
}

.ln-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--starlight);
  font-size: 14px;
  font-weight: 500;
}

.ln-ghost .ic {
  width: 14px;
  height: 14px;
}

.ln-more {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: center;
  margin: 12px 0 0;
}

.ln-more .ln-link {
  color: var(--dust);
  font-size: 13px;
}

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

@container (max-width: 520px) {
  .ln-p {
    gap: 6px;
    padding: 3px;
  }

  .ln-p.on {
    padding-right: 12px;
  }

  .ln-pn {
    width: 30px;
    height: 30px;
  }

  .ln-path ol {
    gap: 0;
  }

  .ln-stage {
    padding: 14px 12px 16px;
  }

  .ln-feel {
    font-size: 18px;
  }

  .ln-slots {
    gap: 6px;
  }

  .ln-slot {
    width: calc((100% - 18px) * var(--w) / 16 + (var(--w) / 4 - 1) * 6px);
    min-height: 74px;
  }

  .ln-slot b {
    font-size: 22px;
  }

  .ln-choices {
    gap: 8px;
  }

  .ln-chip {
    min-width: 70px;
    padding: 8px 10px;
  }

  .ln-say p {
    font-size: 17px;
  }
}

/* ---------- the tap-timing check ---------- */

.tap {
  text-align: center;
}

.tap p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.tap-lead {
  margin-bottom: 8px !important;
  font-family: var(--serif);
  font-size: 18px !important;
}

.tap-how {
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
}

.tap-pad {
  display: block;
  width: 100%;
  height: 150px;
  margin: 14px 0 12px;
  border: 1px solid var(--hair-hi);
  border-radius: var(--r-card);
  background: var(--lift);
  color: var(--starlight);
  font-size: 20px;
  font-weight: 500;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tap-pad.run {
  border-style: dashed;
}

.tap-pad.run:active {
  background: color-mix(in srgb, var(--starlight) 14%, transparent);
}

.tap-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 2px;
}

.tap-dots i {
  width: 9px;
  height: 9px;
  border: 1px solid var(--hair-hi);
  border-radius: 50%;
}

.tap-dots i.on {
  border-color: var(--starlight);
  background: var(--starlight);
}

.tap-say {
  margin: 6px 0 12px !important;
  font-family: var(--serif);
  font-size: 18px !important;
}

.tap-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.tap-fine {
  margin-top: 10px !important;
  color: var(--dust);
  font-size: 12.5px !important;
}

/* ---------- calm: reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .ln-slot,
  .ln-chip,
  .ln-play,
  .ln-primary {
    transition: none;
  }

  .ln-slot.now {
    transform: none;
  }

  :is(.ln-play, .ln-primary, .ln-ghost, .ln-chip, .ln-p, .ln-setbtn):active:not(:disabled) {
    scale: none;
  }
}

/* ---------- Find your level (js/findlevel.js): the questions, one at a time ---------- */

.lv,
.lt {
  container-type: inline-size;
  padding-bottom: 4px;
  color: var(--starlight);
}

.lv :focus-visible,
.lt :focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 3px;
}

.lv-stage {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  text-align: center;
}

.lv-eyebrow,
.lv-hint,
.lv-lede,
.lv-ask,
.lv-words,
.lv-score,
.lv-h {
  margin: 0;
}

.lv-eyebrow {
  min-height: 18px;
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

.lv-eyebrow:empty {
  display: none;
}

.lv-lede {
  max-width: 52ch;
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 14px;
  line-height: 1.5;
}

.lv-ask,
.lv-words,
.lv-h {
  max-width: 44ch;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
}

.lv-hint {
  max-width: 52ch;
  color: var(--dust);
  font-size: 13px;
  line-height: 1.45;
}

.lv-opts,
.lv-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.lv-col {
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 340px);
}

.lv-opt {
  display: grid;
  gap: 2px;
  min-width: 96px;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--starlight);
  font-size: 16px;
  font-weight: 500;
}

.lv-opt.is-mine {
  border-color: color-mix(in srgb, var(--starlight) 55%, transparent);
}

.lv-opt-s {
  color: var(--dust);
  font-size: 12px;
  font-weight: 400;
}

.lv :is(.lv-opt, .chip, .lv-go):disabled {
  opacity: .4;
}

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

.lv .chip[aria-pressed="true"] {
  border-color: var(--starlight);
  background-color: color-mix(in srgb, var(--starlight) 12%, transparent);
}

.lv-chord {
  min-width: 56px;
  justify-content: center;
  font-size: 15px;
}

/* The one filled key: what moves you on. */
.lv-go,
.lt-go,
.lt-start {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  background-color: var(--starlight);
  color: var(--space);
  font-size: 15px;
  font-weight: 600;
}

.lv-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lv-slot {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--dust);
  font-size: 16px;
  font-weight: 500;
}

.lv-slot.is-blank {
  border-style: dashed;
  color: var(--starlight);
}

/* The chord you're hearing now. */
.lv-slot.is-now {
  border-color: var(--starlight);
  background-color: var(--starlight);
  color: var(--space);
}

.lv-said {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.lv-tick {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--starlight);
  color: var(--space);
  font-size: 20px;
  font-weight: 600;
}

.lv-foot {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 4px;
}

.lv-back,
.lv-skip,
.lv-stop {
  min-height: 40px;
  color: var(--dust);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--dust) 50%, transparent);
  text-underline-offset: 3px;
}

/* where you are */
.lv-score {
  font-size: 16px;
  font-weight: 500;
}

.lv-areas,
.lv-leaves {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lv-areas {
  gap: 14px;
  width: min(100%, 460px);
  text-align: left;
}

.lv-area-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}

.lv-step {
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 400;
  white-space: nowrap;
}

.lv-leaves {
  gap: 4px;
  padding-top: 8px;
}

.lv-leaf {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.lv-leaf::before {
  content: "";
}

.lv-leaf.is-yours::before {
  content: "✓";
  font-weight: 600;
}

.lv-leaf.is-next {
  color: var(--dust);
}

/* Each ladder's own short check, for whenever you like: its key, and how long it takes. */
.lv-more {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 6px;
}

.lv-more p {
  margin: 0;
}

.lv-more-h {
  font-size: 15px;
  font-weight: 500;
}

.lv-part {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 0 0 26px;
}

.lv-part-t {
  margin: 0;
  color: var(--dust);
  font-size: 12.5px;
}

p.lv-part-t {
  padding: 8px 0 0 26px;
}

.lv-pick {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(100%, 460px);
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--starlight) 40%, transparent);
  border-radius: 16px;
}

.lv-pick p {
  margin: 0;
}

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

.lv-pick-n {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
}

.lv-pick-w {
  margin-bottom: 8px !important;
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 14px;
  line-height: 1.45;
}

@media (hover: hover) {
  .lv :is(.lv-opt, .chip):not(:disabled):hover,
  .lt-i:hover {
    background-color: color-mix(in srgb, var(--starlight) 7%, transparent);
  }
}

/* ---------- Your tree (js/learntree.js) ---------- */

.lt {
  display: grid;
  gap: 14px;
}

.lt p {
  margin: 0;
}

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

.lt-count {
  font-size: 15px;
}

.lt-count strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.lt-i {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dust);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
}

.lt-fine,
.lt-line,
.lt-empty {
  color: var(--dust);
  font-size: 13px;
  line-height: 1.45;
}

.lt-fine[hidden] {
  display: none;
}

.lt-svg {
  display: block;
  width: min(100%, 440px);
  margin: 0 auto;
}

.lt-trunk {
  fill: color-mix(in srgb, var(--starlight) 22%, transparent);
}

.lt-limb,
.lt-ground,
.lt-ring {
  fill: none;
  stroke: color-mix(in srgb, var(--starlight) 38%, transparent);
  stroke-linecap: round;
}

.lt-limb {
  stroke-width: 3;
}

.lt-ground {
  stroke-width: 1;
}

.lt-ring {
  stroke: var(--starlight);
  stroke-width: 1.4;
}

/* A leaf at its step (js/leafart.js): an outline, a bud, a small leaf, a full leaf, a bright edge, deep green. Never
   autumnal: greener and stronger at each step, the top one the deepest green with a soft glow. A leaf that grew today
   has warm light behind it (getting-to-know-you-and-progress.md §2.1). */
.lf-body {
  fill: none;
  stroke: #A6A3AC;
  stroke-width: 1.3;
  stroke-dasharray: 2.5 2.5;
}

.lf.s1 .lf-body {
  fill: #CDEBCA;
  stroke: none;
}

.lf.s2 .lf-body {
  fill: #9EDA97;
  stroke: none;
}

.lf.s3 .lf-body {
  fill: #67A461;
  stroke: none;
}

.lf.s4 .lf-body {
  fill: #569D4F;
  stroke: #CCF0C8;
  stroke-width: 1.7;
  stroke-dasharray: none;
}

.lf.s5 .lf-body {
  fill: #418F3A;
  stroke: #94EA8A;
  stroke-width: 1.3;
  stroke-dasharray: none;
}

.lf-vein {
  fill: none;
  stroke: rgba(5, 7, 13, .38);
  stroke-width: 1;
  stroke-linecap: round;
}

.lf-glow {
  fill: #94EA8A;
  opacity: .24;
}

.lf-warm {
  fill: #FFF1C4;
  opacity: .16;
}

.lf-icon {
  display: block;
  flex: none;
  overflow: visible;
}

/* ---------- Evergreen, illustrated (js/evergreen.js; screen 33) ---------- */
/* The bark is a tree's own brown and the canopy its green; a leaf never turns autumn colours, and a fruit may ripen
   warm. Their star is gold, in its own soft light. */

.eg-far {
  fill: var(--starlight);
}

.eg-canopy {
  fill: #67A461;
}

.eg-soil {
  fill: #0D131E;
}

.eg-ground {
  fill: none;
  stroke: rgba(241, 237, 228, .22);
  stroke-width: 1.5;
}

.eg-wood,
.eg-root,
.eg-stem {
  fill: none;
  stroke: #6B523E;
  stroke-linecap: round;
}

.eg-stem {
  stroke-width: 3.2;
}

.eg-bark {
  fill: #6B523E;
}

/* On the tree the glows are quieter, so a full crown of deep green doesn't turn to bubbles. */
.eg .lf-glow {
  opacity: .15;
}

.eg-root.is-later {
  stroke: #A6A3AC;
  stroke-width: 1.6;
  stroke-dasharray: 3 4;
  opacity: .7;
}

.eg-ring {
  fill: none;
  stroke: #9A7B5E;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.eg-spark,
.st-body {
  fill: #F6AD3B;
}

.st-glow {
  fill: #F6AD3B;
  opacity: .13;
}

.st-glow2 {
  fill: #F6AD3B;
  opacity: .12;
}

.st-icon {
  display: block;
  flex: none;
}

/* A fruit, a flower and a seed. */
.fr-stem,
.fl-stem {
  fill: none;
  stroke: #6B523E;
  stroke-width: 2;
  stroke-linecap: round;
}

.fl-stem {
  stroke: #5E8F4E;
  stroke-width: 1.8;
}

.fr-shine {
  fill: none;
  stroke: rgba(255, 255, 255, .55);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.fr-wait,
.sd-wait {
  fill: none;
  stroke: #A6A3AC;
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.fl-petal {
  fill: #F4EEDC;
}

.fl-mid {
  fill: #F6AD3B;
}

/* A seed is pale, round and seamed, so it never reads as a fallen leaf. */
.sd-body {
  fill: #EFE4C8;
  stroke: #C9B48A;
  stroke-width: 1;
}

.sd-line {
  fill: none;
  stroke: #A08A5E;
  stroke-width: 1.1;
  stroke-linecap: round;
}

.sd-root {
  fill: none;
  stroke: #8A7457;
  stroke-width: 1.2;
  stroke-linecap: round;
}

.sd-shoot {
  fill: none;
  stroke: #5E8F4E;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.sd-ground {
  fill: none;
  stroke: rgba(241, 237, 228, .22);
  stroke-width: 1.2;
}

.fr-icon,
.fl-icon,
.sd-icon {
  display: block;
  flex: none;
  overflow: visible;
}

/* Leaves still to come on the tree: the next one on each branch outlined, the rest fainter. */
.lt-leaf.is-new .lf-body {
  opacity: .45;
}

.lt-twig,
.lt-root {
  fill: none;
  stroke: color-mix(in srgb, var(--starlight) 32%, transparent);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.lt-root {
  stroke-width: 2.2;
}

.lt-name {
  fill: var(--dust);
  font-size: 12px;
  font-weight: 500;
}

.lt-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background-color: color-mix(in srgb, var(--space) 55%, transparent);
}

.lt-k {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

/* How a leaf grows: the five steps, drawn and named. */
.lf-steps {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lf-steps li {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: var(--dust);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.lt-limbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px 24px;
}

.lt-sec {
  display: grid;
  align-content: start;
  gap: 4px;
}

.lt-h {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.lt-roots {
  color: var(--dust);
  font-family: var(--ui);
  font-size: 13px;
}

/* Leaf by leaf: a row for each branch, its leaves at their steps, opening its page. */
.lt-branches {
  display: grid;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.lt-branches li + li {
  border-top: 1px solid var(--line);
}

.lt-branch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--starlight);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lt-bwords {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

.lt-bname {
  font-size: 15px;
  font-weight: 600;
}

.lt-binst {
  color: var(--dust);
  font-size: 12.5px;
  font-weight: 400;
}

.lt-bline {
  color: var(--dust);
  font-size: 12.5px;
}

.lt-bline.is-today {
  color: #F6AD3B;
}

.lt-bleaves {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  max-width: 100px;
}

.lt-chev {
  color: var(--dust);
  font-size: 18px;
  line-height: 1;
}

.lt-points {
  color: var(--dust);
  font-size: 13px;
  line-height: 1.45;
}

.lt-points strong {
  color: var(--starlight);
  font-weight: 600;
}

.lt-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}

/* ---------- the stopping point (js/stopline.js): one quiet line above the play bar, once the band stops ---------- */
/* Not a pop-up: it comes without a sound or a flash, waits in its place, and goes when the band plays again. Under a
   sheet it sits behind the scrim, as the rest of the page does. */
.stopline {
  position: fixed;
  right: var(--tbar-right, var(--gutter));
  bottom: calc(var(--gutter) + 58px);
  z-index: 43;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: min(440px, calc(100vw - 2 * var(--gutter)));
  padding: 3px 3px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.stopline[hidden] {
  display: none;
}

.sl-go {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 11px;
  color: var(--starlight);
  font-size: 13.5px;
  line-height: 1.35;
  text-align: left;
}

.sl-pic {
  display: inline-flex;
  flex: none;
}

.sl-text {
  min-width: 0;
}

.sl-pts {
  flex: none;
  color: #F6AD3B;
  font-family: var(--mono);
  font-size: 13px;
}

.sl-pts:empty {
  display: none;
}

.sl-x {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  color: var(--dust);
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 640px) {
  .stopline {
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(var(--gutter) + 52px);
    width: auto;
  }
}

@media (hover: hover) {
  .sl-go:hover,
  .sl-x:hover {
    background-color: var(--lift);
  }
}

/* ---------- Evergreen's page, as screen 33 has it ---------- */

/* Their star, written out in full, above Today and the tree. */
.st-full {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 4px 12px 0;
  text-align: center;
}

.st-full .st-k {
  margin: 0;
  color: #F6AD3B;
  font-size: 12.5px;
}

.st-full .st-quote {
  max-width: 34ch;
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.35;
}

/* Their star, small: the star and their words on one line (two at most), the rest a tap away. */
.st-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.st-words {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--starlight);
  font-family: var(--serif);
  font-size: 15.5px;
  font-style: italic;
  line-height: 1.3;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.st-more {
  min-height: 44px;
  padding: 4px 0;
  border-radius: 8px;
  cursor: pointer;
}

.st-line.is-open .st-words {
  display: block;
}

/* Today: the minutes, and what grew. */
.lt-today {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.lt-tday-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--starlight) 24%, transparent);
  border-radius: 10px;
}

.lt-today.has-grown .lt-tday-ic {
  border-color: #F6AD3B;
}

.lt-tday-words {
  display: grid;
  gap: 2px;
  line-height: 1.35;
}

.lt-tday-h {
  font-size: 15px;
  font-weight: 600;
}

.lt-tday-line {
  color: color-mix(in srgb, var(--starlight) 80%, transparent);
  font-size: 13.5px;
}

.lt-tday-pts {
  color: #F6AD3B;
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

/* The tree, with the limbs and the roots as buttons over it, where each one is. */
.lt-tree {
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto;
  aspect-ratio: 360 / 470;
}

/* A sapling is framed close (js/evergreen.js), so its box is shorter. */
.lt-tree.is-sapling {
  aspect-ratio: 360 / 274;
}

.lt-tree.is-sapling .lt-svg {
  border-radius: 12px;
}

.lt-tree .lt-svg {
  width: 100%;
  height: 100%;
}

.lt-limbbtn {
  position: absolute;
  display: grid;
  align-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 12px;
  border: 1px solid color-mix(in srgb, var(--starlight) 30%, transparent);
  border-radius: 12px;
  background: rgba(10, 12, 19, .82);
  color: var(--starlight);
  line-height: 1.25;
  text-align: left;
}

.lt-lbname {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.lt-lbsub {
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 11.5px;
  white-space: nowrap;
}

.lt-limbbtn.is-today {
  border-color: #F6AD3B;
}

.lt-begin {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

/* Leaf by leaf: a row for each limb and the roots, with its leaves; it opens its branches. */
.lt-leafby {
  gap: 2px;
}

.lt-leafby .lt-limbs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lt-leafby .lt-sec {
  display: block;
}

.lt-leafby .lt-sec + .lt-sec {
  border-top: 1px solid var(--line);
}

.lt-leafby .lt-h {
  margin: 0;
  font-family: var(--ui);
  font-size: inherit;
}

.lt-limb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 8px 4px;
  border-radius: 10px;
  color: var(--starlight);
  text-align: left;
}

.lt-lwords {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

.lt-lname {
  font-size: 15px;
  font-weight: 600;
}

.lt-lline {
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 12.5px;
}

.lt-lline.is-today {
  color: #F6AD3B;
}

.lt-lleaves {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 1px;
  max-width: 132px;
}

.lt-limb .lt-chev {
  transition: rotate var(--t) ease;
}

.lt-limb[aria-expanded="true"] .lt-chev {
  rotate: 90deg;
}

.lt-leafby .lt-branches {
  margin: 0 0 8px 12px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.lt-leafby .lt-branches[hidden] {
  display: none;
}

/* Fruit and seeds, with their steps. */
.lt-song {
  display: grid;
  gap: 8px;
}

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

.lt-songhead {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lt-songwords {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

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

.lt-songname {
  font-size: 15px;
  font-weight: 600;
}

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

.lt-ripen {
  display: flex;
  gap: 2px;
}

.lt-rstep {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: color-mix(in srgb, var(--starlight) 66%, transparent);
  font-size: 10.5px;
  line-height: 1.2;
  text-align: center;
}

.lt-rstep.is-done {
  color: var(--starlight);
}

.lt-rdot {
  width: 14px;
  height: 14px;
  border: 1.5px dashed #A6A3AC;
  border-radius: 50%;
}

.lt-rstep.is-done .lt-rdot {
  border: 1.5px solid #F6AD3B;
  background: #F6AD3B;
}

/* Next for you, with the leaf it will grow. */
.lt-next {
  border-color: color-mix(in srgb, var(--starlight) 30%, transparent);
}

.lt-nexth {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.lt-grows {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--starlight) 6%, transparent);
}

.lt-arrow {
  color: #A6A3AC;
}

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

.lt-row-start {
  justify-content: flex-start;
}

@media (hover: hover) {
  .lt-branch:hover,
  .lt-limb:hover {
    background-color: color-mix(in srgb, var(--starlight) 6%, transparent);
  }

  .lt-limbbtn:hover {
    background: rgba(16, 19, 28, .94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lt-limb .lt-chev {
    transition: none;
  }
}

/* ---------- A branch's page (js/learnbranch.js): its leaves, this week, and what counted (screen 32) ---------- */

.lb {
  display: grid;
  gap: 12px;
  padding-bottom: 4px;
  color: var(--starlight);
  container-type: inline-size;
}

.lb p,
.lb h3,
.lb ol {
  margin: 0;
}

.lb :focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 3px;
}

.lb-where,
.lb-line,
.lb-which {
  color: var(--dust);
  font-size: 13.5px;
  line-height: 1.45;
}

.lb-which {
  font-size: 12.5px;
}

.lb-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background-color: color-mix(in srgb, var(--space) 55%, transparent);
}

.lb-leaves {
  border-color: color-mix(in srgb, var(--starlight) 30%, transparent);
}

.lb-k {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.lb-svg {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

.lb-wood,
.lb-twig {
  fill: none;
  stroke: #6B523E;
  stroke-linecap: round;
}

.lb-wood {
  stroke-width: 9;
}

.lb-twig {
  stroke-width: 3.2;
}

/* Drawn as Evergreen is (screen 32): the night behind it, the wood narrowing, a glow where it has grown. */
.lb-bark {
  fill: #6B523E;
}

.lb-canopy {
  fill: #67A461;
  opacity: .14;
}

.lb-spark {
  fill: #F6AD3B;
}

.lb-names {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  padding: 0;
  list-style: none;
}

.lb-name {
  display: grid;
  align-content: start;
  gap: 1px;
  line-height: 1.25;
}

.lb-leafname {
  font-size: 12.5px;
  font-weight: 600;
}

.lb-said {
  color: var(--dust);
  font-size: 12px;
}

.lb-name.is-today .lb-said {
  color: #F6AD3B;
}

.lb-filling {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.lb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-track {
  position: relative;
  display: flex;
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line);
}

/* What's filled, solid; the rest, dashed, still to come. Never a number. */
.lb-fill {
  display: block;
  flex: none;
  width: calc(var(--fill, 0) * 100%);
  height: 100%;
  border-radius: var(--r-pill);
  background-color: #9EDA97;
}

.lb-rest {
  display: block;
  flex: 1;
  height: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 5px, color-mix(in srgb, var(--starlight) 30%, transparent) 5px 7px);
}

.lb-row {
  display: flex;
}

.lb-try {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-pill);
  background-color: var(--starlight);
  color: var(--space);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* This week: minutes on this branch, Monday to Sunday. */
.lb-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.lb-sum {
  color: var(--dust);
  font-size: 12.5px;
}

.lb-days {
  display: flex;
  gap: 4px;
}

.lb-day {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 104px;
}

.lb-mins {
  min-height: 15px;
  color: var(--dust);
  font-family: var(--mono);
  font-size: 11.5px;
}

.lb-col {
  width: 22px;
  height: calc(var(--h, 0) * 62px);
  min-height: 3px;
  border-radius: 6px 6px 3px 3px;
  background-color: var(--line);
}

.lb-day.has .lb-col {
  background-color: var(--starlight);
}

.lb-day.is-today.has .lb-col {
  background-color: #F6AD3B;
}

.lb-dl {
  color: var(--dust);
  font-size: 12px;
}

.lb-day.is-today .lb-dl {
  color: var(--starlight);
  font-weight: 600;
}

/* What counted: a timeline, newest first, after the step still to come. */
.lb-items {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.lb-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}

.lb-item + .lb-item::before {
  position: absolute;
  top: -14px;
  left: 17px;
  height: 14px;
  border-left: 1.5px solid var(--line);
  content: "";
}

.lb-kind {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background-color: var(--panel);
}

.lb-kind.is-dashed {
  border-style: dashed;
}

.lb-kind.is-time,
.lb-item.is-time .lb-kname {
  color: #F6AD3B;
}

.lb-kind.is-told,
.lb-item.is-told .lb-kname {
  color: #76D7F4;
}

.lb-kind.is-made,
.lb-item.is-made .lb-kname {
  color: #829EFF;
}

.lb-kind.is-shown,
.lb-item.is-shown .lb-kname {
  color: #9EDA97;
}

.lb-item.is-next .lb-kind,
.lb-item.is-next .lb-kname {
  color: #A6A3AC;
}

.lb-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lb-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}

.lb-kname {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.lb-when {
  flex: none;
  color: var(--dust);
  font-size: 12px;
}

.lb-title {
  font-size: 15px;
  line-height: 1.4;
}

.lb-title strong {
  font-weight: 600;
}

.lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* The app's chord cards, at their own size here, side by side. */
.lb-chips .cc {
  flex: none;
  width: auto;
  min-width: 52px;
}

.lb-moved {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background-color: color-mix(in srgb, var(--starlight) 5%, transparent);
  font-size: 13px;
  line-height: 1.35;
}

.lb-arrow {
  color: var(--dust);
}

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

.lb-pts {
  flex: none;
  margin-left: auto;
  color: #F6AD3B;
  font-family: var(--mono);
  font-size: 13px;
}

.lb-points {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--dust);
  font-size: 13px;
  line-height: 1.45;
}

.lb-points strong {
  color: var(--starlight);
  font-weight: 600;
}

@media (hover: hover) {
  .lb-try:hover {
    background-color: #FFFFFF;
  }
}

/* ---------- The Learn page: what Learn's door brings up under Riff (js/learnpage.js) ----------
   Nick, 2026-11-11: "Learn needs to function like the other buttons and slide up the riff box and go to the
   learn page." It takes the drawers' place while body[data-room="learn"] is set (main.js openLearn). On glass,
   like Learn's layers; Moon is the player. */

.learnpage {
  display: none;
}

body[data-state="riff"][data-room="learn"] #drawers {
  display: none;
}

/* Room at the sides for a focus ring, since the page scrolls inside itself as the drawers do. */
body[data-state="riff"][data-room="learn"] .learnpage {
  --lp-bleed: 6px;
  display: grid;
  flex: 0 1 auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  width: calc(min(var(--col), 100%) + 2 * var(--lp-bleed));
  min-height: 0;
  margin: 0 calc(-1 * var(--lp-bleed));
  /* Room at the bottom so the last card scrolls clear of the play bar in the corner. */
  padding: 16px var(--lp-bleed) 84px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

body[data-state="riff"][data-room="learn"] .learnpage::-webkit-scrollbar {
  display: none;
}

/* Riff asks a question on the way in, so his box keeps the room its words need and the page gives way,
   scrolling under it. (On a phone his box stops at a third of the screen wherever you are: chat-layout.css.
   Folded, the chat is one line as ever; to the side on wide screens, it has its own column.) */
body[data-state="riff"][data-room="learn"]:not([data-chat-fold], [data-chat-tall]) .convo {
  flex-shrink: 0;
}

/* Riff's chat stays out of the way in Learn until you tap his box (main.js chatAway, Nick, 2026-11-16: "We probably
   shouldn't show that unless you click into the riff entry at the top and then you can expand"). Docked to the side
   on a wide screen it has its own column, so it stays. */
body[data-state="riff"][data-room="learn"][data-chat-away]:not([data-chat-side]) .convo {
  display: none;
}

@media (max-width: 1099px) {
  body[data-state="riff"][data-room="learn"][data-chat-away] .convo {
    display: none;
  }
}

/* While a card in the chat practices, the conversation takes the room, as it does over the drawers. */
body.rc-practicing[data-state="riff"][data-room="learn"] .learnpage {
  display: none;
}

/* The door of what's under Riff is lit, as an open room's door is. */
.door[aria-current="true"] {
  border-color: var(--starlight);
  color: var(--starlight);
}

.lp-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--starlight);
}

.lp-card p,
.lp-card h2 {
  margin: 0;
}

.learnpage :focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 3px;
}

/* The one card that says what to do next. */
.lp-today {
  border-color: color-mix(in srgb, var(--starlight) 40%, transparent);
}

.lp-khead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.lp-pick {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
}

.lp-line {
  max-width: 60ch;
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 14px;
  line-height: 1.45;
}

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

/* The one filled key, as in Find your level. */
.lp-go {
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background-color: var(--starlight);
  color: var(--space);
  font-size: 15px;
  font-weight: 600;
  transition: scale var(--t) ease;
}

.lp-go:active {
  scale: .97;
}

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

/* Your journey, Next for you and Evergreen, together in one box (screen 8): the journey's card holds the box's look,
   and the two under it sit inside it, each after a hairline. */
.lp-box {
  display: grid;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--starlight) 40%, transparent);
  border-radius: var(--r-card);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.lp-box > .lp-card {
  border: 0;
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.lp-box > .lp-card + .lp-card {
  margin: 0 18px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
}

.lp-box > .lp-journey {
  padding-bottom: 14px;
}

/* Their star, small: the star and their words, above Next for you. */
.lp-star {
  margin: 2px 0 0;
}

.lp-night {
  margin: -2px 0 2px 30px !important;
  color: var(--dust);
  font-size: 12.5px;
}

/* The leaf Next for you will grow. */
.lp-grows {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 6px 12px 6px 8px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--starlight) 6%, transparent);
}

.lp-arrow {
  color: var(--dust);
}

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

/* Evergreen, small, as a row: the tree, its name, what's grown and its leaves, and the way in. */
.lp-tree {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.lp-open {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 6px 2px;
  border-radius: 12px;
  color: var(--starlight);
  text-align: left;
  transition: background-color var(--t) ease;
}

.lp-treebox {
  flex: none;
  width: 84px;
}

.lp-treebox .lt-svg {
  display: block;
  width: 84px;
  height: 110px;
  margin: 0;
  border-radius: 10px;
}

.lp-treeside {
  display: grid;
  flex: 1;
  justify-items: start;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

.lp-treename {
  font-family: var(--serif);
  font-size: 19px;
}

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

.lp-treeleaves {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  padding-top: 3px;
}

.lp-chevr {
  flex: none;
  color: var(--dust);
  font-size: 20px;
  line-height: 1;
}

.lp-list {
  display: grid;
  margin: 0 -10px -8px;
  padding: 0;
  list-style: none;
}

.lp-item {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: left;
  transition: background-color var(--t) ease;
}

.lp-name {
  font-size: 15px;
  font-weight: 500;
}

.lp-sub {
  color: var(--dust);
  font-size: 13px;
  line-height: 1.4;
}

/* Games and Look it up: two drawers alike (Nick, on the mockup: "I like the look of that box"; learn-plan.md §12). Each
   is its name and a line, with Open or Close, then what's in it. */
.lp-drawer {
  gap: 0;
  padding: 2px 18px;
}

.lp-dh {
  margin: 0;
}

.lp-dbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 0;
  color: var(--starlight);
  text-align: left;
}

.lp-dart {
  display: grid;
  flex: none;
  place-items: center;
  width: 72px;
  height: 43px;
}

.lp-dart svg {
  display: block;
}

.lp-dwords {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.lp-dname {
  font-size: 15.5px;
  font-weight: 600;
}

.lp-dsub {
  color: var(--dust);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.lp-dopen {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  color: color-mix(in srgb, var(--starlight) 78%, transparent);
  font-size: 13px;
  font-weight: 500;
}

.lp-chev {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.lp-dbody {
  display: grid;
  gap: 6px;
  padding: 0 0 16px;
}

.lp-dbody[hidden] {
  display: none;
}

.lp-dline {
  color: var(--dust);
  font-size: 13.5px;
}

@media (hover: hover) {
  .lp-item:hover,
  .lp-open:hover {
    background-color: var(--lift);
  }

  .lp-go:hover {
    background-color: color-mix(in srgb, var(--starlight) 88%, var(--space));
  }
}

/* Wide enough for two: the tree beside the lessons, with Today and the questions across. */
@media (min-width: 720px) {
  body[data-state="riff"][data-room="learn"] .learnpage {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  /* The journey box across; Games and Look it up side by side under it; questions for Riff across. */
  .lp-box,
  .lp-asks {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-go,
  .lp-item,
  .lp-open {
    transition: none;
  }
}
