/* VowelFace page shell. An homage to the Interactive Vowel Space: white, Arial, orchid for the
   measured signal, periwinkle for predictions, violet for controls, pale fills. */

:root {
  --ink: #333;
  --ink-2: #5d5a69;
  --ink-3: #6e6b7b; /* 5.2:1 on white, enough for the small meter labels and Tune summaries */
  --line: #ebe8f2;
  --field: #8d88a0; /* form-field borders: 3.4:1 on white */
  --key: #d9d4e6; /* <kbd> outlines, decorative */
  --orchid: #da70d6;
  --orchid-ink: #a2338f;
  --periwinkle: #968ffa;
  --violet: #ba80f0;
  --violet-ink: #6f3fc0;
  --face: #5cc8b0;
  --face-ink: #23917b;
  --pale-pink: #ffeef5;
  --pale-periwinkle: #eff3ff;
  --pale-violet: #f7f0fc;
  --link: #0645ad;
  --link-hover: #f3470f;
  --error: #b93a0c;
  --header-h: 56px;
  --pad: 16px;
  --gap: 12px;
  --drawer-w: 400px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 14px/1.45 Arial, Helvetica, sans-serif;
}

h1, h2, h3, h4, p, dl, dd, ul {
  margin: 0;
}

button, input, select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--link);
  font-weight: bold;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: 0 0.45em;
  border: 1px solid var(--key);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 0.86em;
  line-height: 1.6;
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--violet-ink);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.defs {
  position: absolute;
}

/* Visually hidden, still read. The -1px margin keeps an element at the end of the page (such as
   #statusLive) from adding a pixel of scroll. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Buttons: pale pills, like the original's "show explanation" and "always voice". ---- */

button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--pale-violet);
  color: var(--violet-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s;
}

button:hover {
  background: #efe3fb;
}

button:active {
  background: #e6d5f8;
}

button:disabled {
  background: #f6f5f8;
  color: var(--ink-3);
  cursor: default;
}

button.primary {
  background: var(--violet-ink);
  color: #fff;
}

button.primary:hover {
  background: #5d33a6;
}

button.primary:disabled {
  background: #ebe8f0;
  color: var(--ink-3);
}

/* A pressed toggle (Mute, Hold) is pink with a dark orchid ring, so the state shows at a glance. */
button[aria-pressed="true"] {
  background: var(--pale-pink);
  box-shadow: inset 0 0 0 1.5px var(--orchid-ink);
  color: var(--orchid-ink);
}

button[aria-pressed="true"]:hover {
  background: #ffe0ee;
}

.icon {
  width: 16px;
  height: 16px;
  margin: 0 6px 0 -2px;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

[aria-pressed="true"] > .icon .icon-on,
[aria-pressed="false"] > .icon .icon-off,
.phone-icon > .icon {
  display: none;
}

button[aria-expanded="true"] {
  background: #e6d5f8;
}

/* ---- Header ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: var(--header-h);
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.brand h1 {
  font-size: 21px;
  letter-spacing: -0.01em;
}

.brand p {
  color: var(--ink-2);
  white-space: nowrap;
}

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

/* ---- The panel grid. <main> is a size container, so the docked drawer can narrow it. It has
   no padding (the stage has), so its width is the window's less a classic (space-taking)
   scrollbar of up to 17 px. The two-column query below asks for 680 px, so it holds from a
   700 px window, and from 1100 px with the drawer docked, either way; the three-column one
   comes about 15 px after 1100 px with such a scrollbar, which is harmless. ---- */

.app {
  container: app / inline-size;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "camera" "chart" "tract" "response" "spectrum" "waveform";
  gap: var(--gap);
  padding: var(--pad);
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

/* --accent is the colour of the panel's main trace; --ar the plot's aspect ratio when the
   layout lets plots take their natural height. */
.panel[data-panel="camera"] { grid-area: camera; --accent: var(--face); --ar: 4 / 3; }
.panel[data-panel="chart"] { grid-area: chart; --accent: var(--periwinkle); --ar: 1 / 1; }
.panel[data-panel="tract"] { grid-area: tract; --accent: var(--orchid); --ar: 4 / 3; }
.panel[data-panel="response"] { grid-area: response; --accent: var(--periwinkle); --ar: 2 / 1; }
.panel[data-panel="spectrum"] { grid-area: spectrum; --accent: var(--orchid); --ar: 2 / 1; }
.panel[data-panel="waveform"] { grid-area: waveform; --accent: var(--orchid); --ar: 2 / 1; }

.caption {
  display: grid;
  gap: 1px;
  margin-bottom: 6px;
}

.caption h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.caption h2::before {
  content: "";
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.caption p {
  color: var(--ink-2);
  font-size: 12.5px;
}

/* Canvases are taken out of flow so their backing-store size never feeds back into layout. */
.plot {
  position: relative;
  min-height: 0;
  aspect-ratio: var(--ar);
}

.plot > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.camera {
  overflow: hidden;
  border-radius: 10px;
  background: #1e1c24;
}

.camera video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The chart's source note: one quiet line that opens to the full citation. */
.source {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 12px;
}

.source summary {
  width: fit-content;
  cursor: pointer;
}

.source p {
  max-width: 60em;
  padding-top: 2px;
}

.readout {
  min-height: 1.45em;
  padding-top: 4px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Two columns: the chart on the left spans the camera and tract rows. */
@container app (min-width: 680px) {
  .stage {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-areas:
      "chart camera"
      "chart tract"
      "response response"
      "spectrum waveform";
  }

  .panel[data-panel="response"] { --ar: 4 / 1; }
  .panel[data-panel="spectrum"] { --ar: 16 / 9; }

  .panel[data-panel="chart"] .plot,
  .panel[data-panel="waveform"] .plot {
    flex: 1 1 0;
    aspect-ratio: auto;
  }
}

/* Three columns filling the window: camera, chart, tract over response, spectrum, waveform. */
@container app (min-width: 1100px) {
  .stage {
    height: max(600px + 2 * var(--pad), calc(100vh - var(--header-h)));
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 2.1fr) minmax(0, 1fr);
    grid-template-areas:
      "camera chart tract"
      "response spectrum waveform";
  }

  /* dvh (Chrome 108) follows the browser's own bars. Not as a later declaration in the rule
     above: with var() in it, an unknown unit fails only after the cascade, which leaves no height
     at all and collapses the plots in Chrome 105-107. */
  @supports (height: 1dvh) {
    .stage {
      height: max(600px + 2 * var(--pad), calc(100dvh - var(--header-h)));
    }
  }

  .panel .plot {
    flex: 1 1 0;
    aspect-ratio: auto;
  }
}

/* ---- Controls drawer ---- */

.drawer {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(var(--drawer-w), 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -16px 0 40px -24px rgb(60 40 90 / 0.35);
  font-size: 13px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
}

.drawer.open {
  transform: none;
  visibility: visible;
  transition: transform 0.28s var(--ease), visibility 0s;
}

.drawer:focus {
  outline: none;
}

/* Between 700 and 1100 px the drawer covers only the right column, so it ends where the chart
   (the left 3/5 of the stage) does: chart right edge = 16 + 0.6 * (W - 44 px), W the window
   less any scrollbar, which is also what a fixed box's percentages (unlike vw) refer to. */
@media (min-width: 700px) and (max-width: 1099px) {
  .drawer {
    width: min(var(--drawer-w), calc(40% + 8px));
  }
}

/* Wide windows: the drawer docks and the stage makes room for it (re-flowing to two columns,
   which the 683 px or more left from 1100 px still allow), so the vowel chart is never covered. */
@media (min-width: 1100px) {
  body:has(.drawer.open) .app {
    margin-right: var(--drawer-w);
  }

  .drawer {
    box-shadow: none;
  }
}

@media (max-width: 699px) {
  .drawer {
    top: 0;
    z-index: 40;
  }
}

.cp-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.96);
}

.cp-head h2 {
  font-size: 16px;
}

.cp-close {
  width: 32px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

/* One minmax(0, 1fr) column: the long option labels of the selects must not widen the drawer. */
.cp-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.cp-section > h3 {
  font-size: 14px;
}

.cp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-field {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.cp-field output {
  min-width: 5.5em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cp-field select {
  grid-column: span 2;
}

.cp-check {
  display: flex;
  align-items: center;
  gap: 7px;
}

.drawer select,
.drawer input[type="number"] {
  height: 28px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid var(--field);
  border-radius: 6px;
  background: #fff;
}

.drawer input[type="range"],
.drawer input[type="checkbox"] {
  margin: 0;
  accent-color: var(--violet-ink);
}

.drawer input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

.cp-status,
.cp-description,
.cp-message {
  color: var(--ink-2);
}

.cp-message:empty {
  display: none;
}

.cp-message.error {
  color: var(--error);
}

.cp-preset {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-preset select {
  flex: 1;
}

.cp-modified {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pale-pink);
  color: var(--orchid-ink);
  font-size: 11.5px;
}

.cp-group > h4 {
  margin: 10px 0 2px;
  color: var(--ink-2);
  font-size: 12px;
}

.cp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
}

.cp-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-target {
  font-weight: bold;
}

.cp-quality {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: #e5f5f0;
  color: #1d6b59;
  font-size: 11px;
  line-height: 18px;
}

.cp-quality[data-quality="ok"] {
  background: #fdf2dc;
  color: #835400;
}

.cp-quality[data-quality="poor"] {
  background: #fde8e2;
  color: #a1310c;
}

.cp-source {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-source select {
  flex: 1;
}

.cp-source > label {
  color: var(--ink-2);
}

.cp-shared {
  color: #835400;
  font-size: 12px;
}

.cp-off-note {
  color: var(--ink-2);
  font-size: 12px;
}

.cp-row.off .cp-source,
.cp-row.off .cp-meter,
.cp-row.off .cp-tune {
  opacity: 0.45;
}

/* Live meter: input against its range, shaped value, output. */
.cp-meter {
  display: grid;
  grid-template-columns: 3.8em minmax(0, 1fr) 5.2em;
  align-items: center;
  gap: 3px 8px;
  font-size: 11.5px;
}

.cp-meter-line {
  display: contents;
}

.cp-meter-label {
  color: var(--ink-3);
}

.cp-meter-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cp-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: #f0eef5;
}

.cp-band,
.cp-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}

.cp-band {
  background: #ddd3f7;
}

.cp-meter-line:nth-child(2) .cp-fill {
  background: var(--periwinkle);
}

.cp-meter-line:nth-child(3) .cp-fill {
  background: var(--violet);
}

.cp-rest,
.cp-mark,
.cp-tick {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink-3);
}

.cp-tick {
  top: -4px;
  bottom: -4px;
  width: 3px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--face-ink);
}

.cp-mark {
  background: var(--violet-ink);
}

.cp-tune summary {
  display: flex;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
}

.cp-tune summary::-webkit-details-marker {
  display: none;
}

.cp-tune-label {
  color: var(--violet-ink);
}

.cp-tune-label::before {
  content: "▸";
  display: inline-block;
  width: 1em;
}

.cp-tune[open] .cp-tune-label::before {
  content: "▾";
}

.cp-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-tune-grid {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  align-items: center;
  gap: 6px 10px;
  padding: 8px 0 2px;
}

.cp-tune-field {
  display: contents;
}

.cp-tune-field > label {
  color: var(--ink-2);
}

.cp-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}

.cp-pair select {
  flex: 1;
}

.cp-number {
  width: 5.5em;
}

.cp-param {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-unused {
  margin-top: 14px;
}

.cp-unused > summary {
  color: var(--ink-2);
  cursor: pointer;
}

/* ---- Intro overlay: a soft white veil over the panels, as in the original. ---- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 40px 16px;
  background: rgb(255 255 255 / 0.66);
  backdrop-filter: blur(2px);
}

.intro.hidden {
  display: none;
}

.intro-card {
  width: 100%;
  max-width: 880px;
  padding: 30px 48px 24px;
  border-radius: 75px;
  background: rgb(255 255 255 / 0.88);
  box-shadow: 0 0 24px 50px rgb(255 255 255 / 0.88);
}

.intro-card > h2 {
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
}

.lead {
  max-width: 34em;
  margin: 12px auto 0;
  color: var(--ink-2);
  font-size: 17px;
  text-align: center;
  text-wrap: balance;
}

.intro-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px 48px;
  margin-top: 26px;
}

/* The gesture reference is the longer column. */
@media (min-width: 900px) {
  .intro-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }
}

.intro-columns h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.where-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.where-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.where {
  flex: none;
  width: 23px;
  height: 15px;
  fill: none;
  stroke: #b9b4c8;
  stroke-width: 1;
  transform: translateY(2px);
}

.where[data-cell="1"] { --cell-1: var(--face); }
.where[data-cell="2"] { --cell-2: var(--periwinkle); }
.where[data-cell="3"] { --cell-3: var(--orchid); }
.where[data-cell="4"] { --cell-4: var(--periwinkle); }
.where[data-cell="5"] { --cell-5: var(--orchid); }
.where[data-cell="6"] { --cell-6: var(--orchid); }

/* The markers show the three-column layout; narrower windows arrange the panels differently. */
@media (max-width: 1099px) {
  .where {
    display: none;
  }
}

.guide-preset {
  margin-bottom: 10px;
  color: var(--ink-2);
}

.guide-preset b {
  color: var(--ink);
}

.guide-more {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 13px;
}

.gestures > div {
  display: grid;
  grid-template-columns: 12.5em 1fr;
  gap: 12px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.gestures > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.gestures dt {
  font-weight: bold;
}

.gestures dd {
  color: var(--ink-2);
}

.note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--pale-periwinkle);
  color: var(--ink-2);
  font-size: 13px;
}

.intro-start {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 26px;
  text-align: center;
}

/* The calibration hint sits right above Start, where it is read just before tracking begins. */
.intro-start .note {
  max-width: 40em;
  margin: 0 0 8px;
}

button.big {
  min-height: 54px;
  padding: 0 36px;
  font-size: 18px;
  font-weight: bold;
}

.privacy {
  color: var(--ink-2);
  font-size: 13px;
}

.intro-error {
  max-width: 34em;
  color: var(--error);
  font-weight: bold;
}

.intro-error:empty {
  display: none;
}

.credits {
  color: var(--ink-2);
  font-size: 12.5px;
}

.intro-card > .credits {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ---- Help dialog ---- */

dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); /* where dvh is unknown; no var(), so it is dropped at parse time */
  max-height: calc(100dvh - 32px);
  padding: 28px 32px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 60px -24px rgb(60 40 90 / 0.4);
  color: var(--ink);
}

dialog::backdrop {
  background: rgb(255 255 255 / 0.6);
  backdrop-filter: blur(2px);
}

dialog h2 {
  font-size: 22px;
}

dialog h3 {
  margin: 20px 0 8px;
  font-size: 15px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.dialog-close button {
  width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.keys > div {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 12px;
  padding: 4px 0;
}

.tips {
  display: grid;
  gap: 6px;
  padding-left: 1.2em;
}

/* Touch screens without a keyboard have no use for the shortcut list, or for a key named in
   passing elsewhere: such a mention (" or <kbd>C</kbd>") goes in a .key-hint span. */
@media (hover: none) and (pointer: coarse) {
  .help-keys,
  .key-hint {
    display: none;
  }
}

/* ---- Toast: set its text to show a message, clear it to hide. ---- */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  /* A pill on one line, a rounded box when a long message wraps (not a blob). */
  width: max-content;
  max-width: min(36em, calc(100vw - 32px));
  padding: 10px 18px;
  border-radius: 21px;
  background: var(--ink);
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.4);
  transform: translateX(-50%);
  animation: toast-in 0.2s var(--ease);
}

#toast:empty {
  display: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

/* ---- Small screens ---- */

/* The tagline, the title and the six buttons after Start (Mute and Hold with their labels) need
   about 976 px, 991 px with a classic scrollbar; any less and the actions wrap to a second row,
   which the drawer's top (--header-h) does not allow for. */
@media (max-width: 1023px) {
  .brand p {
    display: none;
  }
}

@media (max-width: 699px) {
  :root {
    --pad: 10px;
    --gap: 10px;
  }

  .topbar {
    padding-block: 6px;
  }

  .actions {
    gap: 5px;
  }

  .actions button {
    min-height: 30px;
    padding: 0 11px;
  }

  /* Icon-only Mute, Hold and Help keep the six buttons on one row; the label stays for screen
     readers (the accessible name does not change). */
  .actions .has-icon {
    width: 34px;
    padding: 0;
  }

  .actions .has-icon > .icon {
    display: inline-block;
    margin: 0;
  }

  .actions .has-icon > .label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .intro {
    padding: 16px 8px;
  }

  .intro-card {
    padding: 24px 18px 20px;
    border-radius: 32px;
  }

  .lead {
    font-size: 15px;
  }

  .gestures > div {
    grid-template-columns: 9em 1fr;
  }

  dialog {
    padding: 22px 20px;
  }
}

/* Narrow or short windows bring the Start button up, right under the lead, so it shows without
   scrolling; the details follow below it. */
@media (max-width: 699px), (max-height: 860px) {
  .intro-card {
    display: flex;
    flex-direction: column;
  }

  .intro-start {
    order: 1;
    margin-top: 24px;
  }

  .intro-columns {
    order: 2;
  }

  .intro-card > .credits {
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0s !important;
  }
}
