@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../assets/fonts/BricolageGrotesque-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

html {
  background: #121212;
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
}

[hidden] {
  display: none !important;
}

header {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.pill-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  min-height: 44px;
  padding: 0.4375rem 1.4375rem;
  border: 0;
  border-radius: 999px;
  background: #6f8191;
  color: #ededed;
  font: inherit;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 600;
  font-stretch: 75%;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pill-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.pill-button svg {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}

#mute-btn[aria-pressed='false'] .sound-off,
#mute-btn[aria-pressed='true'] .sound-on {
  display: none;
}

#viewer {
  display: grid;
  place-items: center;
  min-width: 0;
}

#container {
  width: min(100%, 50rem, calc(100svh - max(1rem, env(safe-area-inset-top)) - max(1rem, env(safe-area-inset-bottom)) - 88px - 1.5rem));
}

#image-container {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  text-align: center;
}

#current-image {
  display: block;
  box-shadow: 0 0 0.8rem rgb(255, 255, 255, 0.2);
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
}

footer {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

#share-btn.copy-failed {
  user-select: text;
  -webkit-user-select: text;
  overflow-wrap: anywhere;
}

@media (min-width: 40rem) {
  body {
    gap: 1rem;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }

  #container {
    width: min(100%, 50rem, calc(100svh - max(1.5rem, env(safe-area-inset-top)) - max(1.5rem, env(safe-area-inset-bottom)) - 88px - 2rem));
  }
}
