/* Screen 5, languages. Centred: the title and its line over the half ring, she stands
   under its middle, and the Dictionary stands on the ground at its right with its small
   line under the ground. */
.lg { padding: calc(150 * var(--u)) 0 calc(72 * var(--u)); text-align: center; }
.lg-head { padding: 0 var(--m); }
.lg-mid { max-width: 24em; margin-left: auto; margin-right: auto; }
.lg-mid span { display: block; }
.lg-stage { margin-top: calc(24 * var(--u)); text-align: left; }

/* The Dictionary: the app's two rows, what you say in Muted, what Murmur types in Ink. */
.lg-dict { position: absolute; left: calc(var(--x) * var(--s)); bottom: calc(var(--b) * var(--s)); width: calc(var(--w) * var(--s)); margin: 0; padding: calc(20 * var(--s)) calc(24 * var(--s)) calc(22 * var(--s)); border-radius: calc(22 * var(--s)); background: var(--lilac); }
.lg-row dt { font-size: max(12px, calc(14 * var(--s))); line-height: 1.3; font-weight: 700; color: var(--plum); }
.lg-row dd { position: relative; margin: 2px 0 0; font-size: max(19px, calc(26 * var(--s))); line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.lg-row + .lg-row { margin-top: calc(12 * var(--s)); padding-top: calc(12 * var(--s)); border-top: 1.5px solid var(--iris); }
.lg-said { color: var(--muted); }
.lg-typed { color: var(--ink); }
.lg-small { position: absolute; left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s)); width: max(220px, calc(var(--w) * var(--s))); font-size: 15px; }

@media (max-width: 1023.98px) {
  .lg { padding: 72px 0 24px; }
  .lg-head h2 { max-width: 7em; margin: 0 auto; }
  .lg-stage { margin-top: 28px; }
  /* The card and its line stand under the ring, centred. */
  .lg-dict { position: relative; left: auto; bottom: auto; width: min(100%, 300px); margin: 28px auto 0; padding: 18px 22px 20px; border-radius: 20px; text-align: left; }
  .lg-small { position: static; width: auto; max-width: 22em; margin: 14px auto 0; text-align: center; }
}

/* ---------------------------------------------------------------- motion
   js/pages/dictation/languages.js: the 58 come up along the ring, the three she picked
   light, a Sky dot leaves her and finds the one she is speaking (its ring draws round it),
   and the wrong spelling slides over into the right one. */
.lg-lang { transform-box: fill-box; transform-origin: center; }
.motion .lg.is-pre .lg-lang { opacity: 0; transform: scale(0.4); }
.motion .lg.is-pre.is-ring .lg-lang { opacity: 1; transform: none; transition: opacity 0.25s ease calc(var(--k) * 12ms), transform 0.25s ease calc(var(--k) * 12ms); }
/* The three she picked wait as the others do, then light (.is-on) in Sky. */
.motion .lg.is-pre.is-ring .lg-lang.is-lit:not(.is-on) { fill: var(--iris); transform: scale(0.75); }
.motion .lg.is-pre .lg-lang.is-lit.is-on { transition: fill 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.lg-found { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.motion .lg.is-pre .lg-found:not(.is-on) { stroke-dashoffset: 1; }
.motion .lg-found.is-on { transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* The right spelling waits while the wrong one (a copy, .lg-ghost) slides over into it. */
.motion .lg.is-pre .lg-typed:not(.is-on) { opacity: 0; }
.lg-typed { transition: opacity 0.3s ease; }
.lg-ghost { position: absolute; z-index: 1; margin: 0; color: var(--muted); pointer-events: none; }
