/* Chapter 5: ion and equation text in the scenes, the pH mixer and the dissolving lab. */

.ion-text { font: 800 15px system-ui, sans-serif; fill: #0d1730; }
.scene-eq { font: 800 52px system-ui, sans-serif; fill: #fff; }
.scene-eq.small-eq { font-size: 44px; }
.scene-mid { font: 800 28px system-ui, sans-serif; fill: #e8eefc; }
.scene-note { font: 600 22px system-ui, sans-serif; fill: #9fb4dd; }
.gold-text { fill: #ffd166; }
.acid-note { fill: #ff8787; }
.alk-note { fill: #91a7ff; }
.scale-num { font: 700 22px system-ui, sans-serif; fill: #e8eefc; }
.bottle-formula { font: 800 24px system-ui, sans-serif; fill: #14213d; }
.bottle-kind { font: 700 18px system-ui, sans-serif; fill: #5b6b86; }
.bottle-warn { font: 900 20px system-ui, sans-serif; fill: #fff; }

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: max(10px, 1.6cqw);
  width: 100%;
  align-items: start;
}
.lab-picture { width: 100%; border-radius: .8em; overflow: hidden; background: #0d1730; }
.lab-controls { display: flex; flex-direction: column; gap: 6px; }
.lab-controls .lab-tools { justify-content: flex-start; }
.lab-controls .chip-btn { padding: .35em .7em; font-size: .9em; }
.lab-readout { margin: 0; font-weight: 700; font-size: .9em; color: #e8eefc; min-height: 2.6em; }

.mix-row .chip-btn { min-width: 6.5em; }
.chip-btn.acid-btn { border-left: 6px solid #ff8787; }
.chip-btn.base-btn { border-left: 6px solid #74c0fc; }
.mix-goals { justify-content: flex-start; }
.mix-goals li { font-size: .82em; }
.mix-link { margin: 0; font-size: .8em; color: #9fb4dd; }
.mix-link a { color: var(--gold); }

.mx-label { font: 800 20px system-ui, sans-serif; fill: #e8eefc; }
.mx-ph { font: 800 34px system-ui, sans-serif; fill: #fff; }
.mx-note { font: 600 17px system-ui, sans-serif; fill: #9fb4dd; }
.mx-liquid { transition: fill .6s; }
.mx-flash { font: 800 30px system-ui, sans-serif; fill: #ffd166; opacity: 0; pointer-events: none; paint-order: stroke; stroke: #0d1730; stroke-width: 6px; }
.mx-flash.on { animation: mx-flash 1.6s ease-out; }
@keyframes mx-flash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.dl-ion { transition: transform 1.1s cubic-bezier(.3, .7, .4, 1); }
.dl-shell { opacity: 0; transition: opacity .6s .5s; }
.dl-ion.free .dl-shell { opacity: 1; }
.dl-pick { flex-direction: column; align-items: stretch; }
.dl-legend { list-style: none; margin: 0; padding: 0; justify-content: flex-start; }

.explain { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.explain[hidden] { display: none; }
.explain-slots { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.slot-line { padding: .45em .8em; border-radius: .6em; border: 2px dashed rgba(255, 255, 255, .3); font-weight: 600; font-size: .9em; color: #9fb4dd; }
.slot-line.filled { border-style: solid; border-color: var(--ok); background: #143a28; color: #e8eefc; }
.explain-options .chip-btn { font-size: .9em; }
.chip-btn.hint { box-shadow: 0 0 0 3px var(--gold); }

.quiz-box { display: block; width: min(200px, 40%); margin: .5em auto 0; }

@container (max-width: 620px) {
  .lab-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-ion, .dl-shell, .mx-liquid { transition: none; }
}
