.lx-vowel-space {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.lx-vowel-space__header { max-width: 720px; margin-bottom: 1.5rem; }
.lx-vowel-space__back { display: inline-block; margin-bottom: 1rem; }
.lx-vowel-space__game { display: grid; gap: 1.25rem; }

.lx-vowel-space__chart-wrap {
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 1.4rem;
  padding: clamp(.75rem, 2vw, 1.5rem);
  background: color-mix(in srgb, currentColor 3%, transparent);
  overflow: hidden;
}

.lx-vowel-space__chart { display: block; width: 100%; min-height: 300px; }

.lx-vowel-space__axes path,
.lx-vowel-space__axes line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: .22;
}

.lx-vowel-space__axes text {
  fill: currentColor;
  font-size: 16px;
  opacity: .6;
}

.lx-vowel-space__point {
  transition: opacity .42s ease var(--delay, 0ms), transform .42s cubic-bezier(.2,.8,.2,1) var(--delay, 0ms);
}

.lx-vowel-space__point circle {
  fill: Canvas;
  stroke: currentColor;
  stroke-width: 2.5;
}

.lx-vowel-space__point text {
  fill: CanvasText;
  font-size: 20px;
  font-family: "Noto Sans", "Arial Unicode MS", sans-serif;
  pointer-events: none;
}

.lx-vowel-space__point.is-rounded circle { stroke-width: 5; }
.lx-vowel-space__point--comparison { opacity: .48; }
.lx-vowel-space__point--comparison circle { fill: transparent; stroke-dasharray: 5 4; }
.lx-vowel-space__point.is-entering { opacity: 0; }
.lx-vowel-space__point.is-entering.is-visible { opacity: 1; }

.lx-vowel-space__hint {
  margin: .5rem 0 0;
  text-align: center;
  font-size: .9rem;
  opacity: .68;
}

.lx-vowel-space__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.lx-vowel-space__choice,
.lx-vowel-space__another {
  min-height: 3.2rem;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: .9rem;
  padding: .75rem 1rem;
  background: color-mix(in srgb, currentColor 5%, transparent);
  color: inherit;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.lx-vowel-space__choice:hover:not(:disabled),
.lx-vowel-space__another:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.lx-vowel-space__choice:disabled { cursor: default; }
.lx-vowel-space__choice.is-correct { outline: 3px double currentColor; outline-offset: 2px; }
.lx-vowel-space__choice.is-wrong { text-decoration: line-through; opacity: .58; }

.lx-vowel-space__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .9rem;
}

.lx-vowel-space__legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lx-vowel-space__legend-dot { width: 1rem; height: 1rem; border: 2px solid currentColor; border-radius: 50%; }
.lx-vowel-space__legend-dot--comparison { border-style: dashed; opacity: .55; }

.lx-vowel-space__status,
.lx-vowel-space__reveal,
.lx-vowel-space__source { margin: 0; }

.lx-vowel-space__reveal {
  padding: .9rem 1rem;
  border-left: 3px solid currentColor;
  background: color-mix(in srgb, currentColor 4%, transparent);
}

.lx-vowel-space__source { margin-top: 1rem; font-size: .88rem; opacity: .68; }

@media (max-width: 640px) {
  .lx-vowel-space { width: min(100% - 1rem, 960px); padding-top: 1rem; }
  .lx-vowel-space__choices { grid-template-columns: 1fr; }
  .lx-vowel-space__chart { min-height: 250px; }
  .lx-vowel-space__axes text { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-vowel-space__point { transition: none; }
}

/* Viewport-fit Vowel Space layout.
 * Desktop rounds should remain visible without scrolling.
 */

.lx-vowel-space {
  width: min(1100px, calc(100% - 2rem));
  padding: .75rem 0 1.5rem;
}

.lx-vowel-space__header {
  max-width: none;
  margin-bottom: .7rem;
}

.lx-vowel-space__back {
  margin-bottom: .35rem;
}

.lx-vowel-space__header .lx-explore-kicker {
  margin: 0;
}

.lx-vowel-space__header h1 {
  margin: .1rem 0;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.lx-vowel-space__header > p:last-child {
  margin: .15rem 0 0;
}

.lx-vowel-space__source {
  margin-top: .55rem;
}

@media (min-width: 760px) {
  .lx-vowel-space__game {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
    grid-template-areas:
      "chart choices"
      "chart status"
      "chart reveal"
      "chart legend"
      "chart another";
    gap: .65rem 1rem;
    align-items: start;
  }

  .lx-vowel-space__chart-wrap {
    grid-area: chart;
    padding: .65rem .8rem;
  }

  .lx-vowel-space__chart {
    width: 100%;
    height: clamp(260px, 43svh, 390px);
    min-height: 0;
  }

  .lx-vowel-space__choices {
    grid-area: choices;
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .lx-vowel-space__choice,
  .lx-vowel-space__another {
    min-height: 2.85rem;
    padding: .55rem .8rem;
  }

  .lx-vowel-space__status {
    grid-area: status;
    min-height: 1.4rem;
  }

  .lx-vowel-space__reveal {
    grid-area: reveal;
    padding: .65rem .8rem;
  }

  .lx-vowel-space__reveal p {
    margin: 0;
  }

  .lx-vowel-space__legend {
    grid-area: legend;
    gap: .65rem;
  }

  .lx-vowel-space__another {
    grid-area: another;
    width: 100%;
  }

  .lx-vowel-space__hint {
    margin-top: .25rem;
    font-size: .82rem;
  }
}

@media (min-width: 760px) and (max-height: 700px) {
  .lx-vowel-space {
    padding-top: .4rem;
  }

  .lx-vowel-space__header {
    margin-bottom: .4rem;
  }

  .lx-vowel-space__back {
    margin-bottom: .15rem;
  }

  .lx-vowel-space__chart {
    height: 38svh;
  }

  .lx-vowel-space__game {
    gap: .45rem .85rem;
  }
}
