/* Dementia lesson. Scoped under .de-* */

/* the shelf: moments of her life down, kinds across */
.de-shelf { display: flex; flex-direction: column; gap: 5px; padding: 10px 10px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.de-head, .de-row { display: grid; grid-template-columns: 50px repeat(3, minmax(0, 1fr)); gap: 5px; align-items: center; }
.de-head span { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); text-align: center; line-height: 1.1; }
.de-row { border-bottom: 2px solid rgba(201,140,27,.28); padding-bottom: 5px; }
.de-dec { font-size: 12px; font-weight: 700; color: var(--dim); line-height: 1.1; }
.de-it {
  min-height: 38px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3px 5px; border-radius: 8px;
  font-size: 13px; font-weight: 700; line-height: 1.12;
  border: 1px solid transparent; transition: opacity .5s, background .5s, color .5s, border-color .5s, box-shadow .5s;
}
.de-it.k0 { background: rgba(169,155,255,.2); color: #D8D1FF; }
.de-it.k1 { background: rgba(63,214,154,.16); color: #A9EFD3; }
.de-it.k2 { background: rgba(252,192,80,.18); color: #FFE0A3; }
.de-it.gone { background: transparent; color: transparent; border: 1px dashed var(--line); }
.de-it.last { background: var(--gold); color: #2A1B00; box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(252,192,80,.7); }
.de-count { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.de-count b { font: 600 13px var(--mono); color: var(--text); text-transform: none; letter-spacing: 0; margin-left: 4px; }

/* Ruth's reply on a visit */
.de-say { align-self: center; margin-bottom: 8px; padding: 7px 14px; border-radius: 14px; font-size: 14px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--dim); animation: copyIn .3s both; }
.de-say.yes { border-color: var(--gold); color: var(--gold); }
.de-say.no { color: var(--faint); }
.de-it.ping { animation: dePing .9s ease-out; }
.de-it.miss { animation: deMiss .9s ease-out; }
@keyframes dePing { 0% { box-shadow: 0 0 0 0 rgba(252,192,80,.9); } 100% { box-shadow: 0 0 0 10px rgba(252,192,80,0); } }
@keyframes deMiss { 0%, 60% { border-color: var(--red); background: rgba(216,85,85,.18); } }
.de-note { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; }

/* the visit's four tries, two by two */
.choices.de-tries { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.de-tries .choice { min-height: 58px; padding: 10px 12px; font-size: 14.5px; line-height: 1.2; justify-content: center; text-align: center; }

/* two songs */
.de-tunes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.de-tune { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); text-align: center; transition: border-color .5s, background .5s, opacity .5s, transform .2s; }
.de-tune b { font-size: 15px; color: var(--text); }
.de-tune em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--faint); }
.de-yr { font: 600 13px var(--mono); color: var(--dim); height: 14px; }
.de-plays { display: flex; gap: 6px; height: 14px; align-items: center; }
.de-plays i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }
.de-plays i.on { background: var(--violet-bright); border-color: var(--violet-bright); }
.de-tune.playing { border-color: var(--violet-bright); transform: scale(1.03); }
.de-tune.lost { opacity: .55; border-style: dashed; }
.de-tune.known { border-color: var(--gold); background: rgba(252,192,80,.14); }
.de-tune.known em { color: var(--gold); }

@media (max-height: 700px) {
  .de-shelf { gap: 3px; padding: 7px 8px 5px; }
  .de-row { padding-bottom: 4px; }
  .de-it { min-height: 32px; }
  .de-say { margin-bottom: 5px; padding: 5px 12px; font-size: 13px; }
  .de-tries .choice { min-height: 50px; font-size: 14px; }
}
