/* Cross-device refinements: touch targets, tablets, narrow phones and safe areas. */
.fitness-link {
  margin: 18px 0 0 auto;
  width: min(440px, 100%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-underline-offset: 5px;
}

.fitness-link span { display: inline-block; margin-left: 8px; transition: .2s; }
.fitness-link:hover span { transform: translate(3px, -3px); }

.key {
  width: 44px;
  height: 44px;
  touch-action: manipulation;
}

.down,
.fortune button {
  min-height: 44px;
  touch-action: manipulation;
}

.counter {
  padding-bottom: 82px;
}

.counter small {
  display: block;
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}

.counter .ticker {
  min-height: 54px;
  display: flex;
  align-items: center;
}

@media (max-width: 900px) {
  .playground {
    grid-template-columns: 1fr;
  }

  .tile,
  .tile:nth-child(odd) {
    min-height: 410px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .tile:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  header {
    height: 72px;
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  .hero {
    min-height: calc(100svh - 72px);
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: max(58px, env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .down {
    bottom: max(24px, env(safe-area-inset-bottom));
  }

  footer {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 30vw;
  }

  .intro {
    font-size: 17px;
  }

  .float-word {
    font-size: 9px;
  }

  .word-a {
    right: 5%;
    top: 20%;
  }

  .word-b {
    left: 34%;
  }

  .tile {
    min-height: 390px;
    padding: 25px;
  }

  .orbit {
    width: 130px;
    height: 130px;
    right: 8%;
  }

  .counter strong {
    font-size: 44px;
  }

  .ending {
    padding-top: 90px;
    padding-bottom: 90px;
  }
}

@media (max-width: 370px) {
  .down span {
    display: none;
  }

  .hero h1 {
    font-size: 29vw;
  }

  .intro {
    font-size: 16px;
  }

  .tile {
    padding: 22px;
  }

  .hello h2 {
    font-size: 38px;
  }

  .fortune blockquote {
    font-size: 27px;
  }
}

@media (hover: none) {
  .key:hover,
  .down:hover b {
    transform: none;
  }
}
