:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101114;
  color: #f3f3f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgb(74 71 117 / 15%), transparent 54%),
    #101114;
}

button,
select {
  font: inherit;
}

.topbar {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
}

.brand {
  color: #f3f3f5;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.brand span {
  color: #a99bff;
}

.set-picker {
  position: relative;
}

.set-picker::after {
  position: absolute;
  top: 50%;
  right: 14px;
  color: #aaa9b3;
  content: "⌄";
  pointer-events: none;
  transform: translateY(-58%);
}

.set-picker select {
  max-width: min(62vw, 250px);
  appearance: none;
  padding: 10px 36px 10px 14px;
  border: 1px solid #34343d;
  border-radius: 10px;
  outline: none;
  background: #191a20;
  color: #e5e4eb;
  cursor: pointer;
}

.set-picker select:focus-visible,
.arrow:focus-visible {
  outline: 2px solid #a99bff;
  outline-offset: 3px;
}

.viewer {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr minmax(0, 760px) 1fr;
  align-items: center;
  padding: 100px 32px;
}

.word-card {
  grid-column: 2;
  text-align: center;
}

.set-name {
  margin: 0 0 26px;
  color: #92919e;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.word {
  margin: 0;
  color: #f6f5fb;
  font-size: clamp(2.8rem, 9vw, 7rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.progress {
  min-height: 1.25rem;
  margin: 28px 0 0;
  color: #777682;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.arrow {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #34343d;
  border-radius: 50%;
  background: #191a20;
  color: #e7e5ee;
  cursor: pointer;
  font-size: 1.4rem;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.arrow:hover:not(:disabled) {
  border-color: #77708f;
  background: #24232c;
}

.arrow:disabled {
  cursor: default;
  opacity: 0.32;
}

.arrow--left {
  justify-self: center;
}

.arrow--right {
  grid-column: 3;
  justify-self: center;
}

.message {
  position: absolute;
  right: 24px;
  bottom: 72px;
  left: 24px;
  margin: 0;
  color: #ef9d9d;
  font-size: 0.9rem;
  text-align: center;
}

.footer {
  position: absolute;
  right: 0;
  bottom: 26px;
  left: 0;
  color: #62616c;
  font-size: 0.8rem;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 600px) {
  .topbar {
    padding: 20px;
  }

  .viewer {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 10px;
    padding: 90px 12px;
  }

  .arrow {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
