:root {
  --paper: #ffffff;
  --ink: #2a2a2a;
  --muted: #6a6a6a;
  --tab: #efefef;
  --lime: #d4f26a;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.stage.is-dragging {
  cursor: grabbing;
}

.nav {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px;
}

.tab {
  min-width: 132px;
  padding: 11px 16px 10px;
  border: 0;
  border-radius: 2px;
  background: var(--tab);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.tab[aria-pressed="true"] {
  background: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sound {
  position: fixed;
  z-index: 6;
  top: 28px;
  right: 22px;
  padding: 11px 14px 10px;
  border: 0;
  border-radius: 2px;
  background: var(--tab);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.sound[aria-pressed="true"] {
  background: var(--lime);
}

.hero {
  position: fixed;
  z-index: 4;
  left: 54%;
  top: 54%;
  width: min(380px, 32vw);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero.is-settled {
  opacity: 1;
  transform: none;
}

.hero-name {
  display: inline-block;
  margin: 0;
  padding: 14px 18px 13px;
  background: #f2f2f2;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-copy {
  margin-top: 16px;
}

.hero-copy p {
  margin: 0 0 14px;
  max-width: 32ch;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.45;
  color: var(--muted);
}

.hero-copy p:last-child {
  margin-bottom: 0;
}

.hero-copy em {
  font-style: italic;
}

.fallback {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  background: white;
}

@media (max-width: 760px) {
  .nav {
    top: max(22px, env(safe-area-inset-top));
    gap: 8px;
    padding: 0 18px;
  }

  .sound {
    top: calc(max(22px, env(safe-area-inset-top)) + 54px);
    right: 14px;
    bottom: auto;
    padding: 12px 12px 11px;
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .tab {
    flex: 1;
    min-width: 0;
    padding: 13px 4px 12px;
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  .tab[aria-pressed="true"] {
    text-decoration: none;
  }

  .hero {
    left: 50%;
    right: auto;
    top: auto;
    bottom: max(36px, env(safe-area-inset-bottom));
    width: min(280px, calc(100vw - 72px));
    transform: translateX(-50%) translateY(6px);
  }

  .hero.is-settled {
    transform: translateX(-50%);
  }

  .hero-name {
    font-size: 11px;
    letter-spacing: 0.14em;
    padding: 11px 14px 10px;
    background: #f3f3f3;
  }

  .hero-copy {
    margin-top: 22px;
  }

  .hero-copy p {
    max-width: 34ch;
    font-size: 13px;
    line-height: 1.45;
    color: #8d8d8d;
  }

  .hero-copy p + p {
    margin-top: 16px;
  }
}
