body.is-home {
  display: block;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
}

body.is-home > nav {
  position: fixed;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  width: var(--nav-width);
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 5rem);
  overflow: visible;
}

body.is-home main {
  position: fixed;
  inset: 0;
  overflow: hidden;
  container-type: normal;
}

.home {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  overflow: hidden;
  touch-action: none;
}

.home-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-pattern canvas {
  display: block;
}

.home-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: min(11vw, 23dvh, 12rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-align: center;
  overflow-wrap: normal;
  pointer-events: none;
}

.home-line { display: block; white-space: nowrap; }

.home-controls {
  position: absolute;
  z-index: 2;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 0;
}

.home-controls button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.home-controls .home-tilt { text-decoration: underline; }

@media (max-width: 760px) {
  body.is-home > nav { position: absolute; width: calc(100vw - 2rem); overflow: auto; }
}
