/* Mobile layout. Loaded after the hashed Astro sheets so it can override them. */

@media (width <= 759px) {
  :root {
    --header-h: 5.5rem;
  }

  .hdr.hdr {
    height: auto;
  }

  .hdr__in.hdr__in {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.1rem;
    padding-block: 0.65rem 0.2rem;
  }

  .hdr__brand.hdr__brand {
    flex: 1 1 100%;
    min-width: 0;
  }

  .hdr__brand .t-label {
    white-space: nowrap;
    letter-spacing: 0.06em;
  }

  .hdr__nav.hdr__nav {
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
    gap: 0.1rem 1rem;
  }

  .hdr__link.hdr__link,
  .hdr__access.hdr__access {
    white-space: nowrap;
    padding-block: 0.55rem;
    font-size: 0.8125rem;
  }

  .cover.cover {
    min-height: 0;
    height: calc(100svh - var(--header-h));
  }

  .case__nav.case__nav {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .case__next.case__next {
    text-align: left;
    align-items: flex-start;
  }

  .gallery.gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.frame-gutter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(16rem, 100%);
  margin: 0 0 1.25rem auto;
}

.frame-gutter:not(.frame-gutter--float) {
  position: sticky;
  top: calc(var(--header-h) + 0.45rem);
  z-index: 40;
  width: fit-content;
  max-width: min(16rem, calc(100% - 1rem));
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.7rem 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px var(--line, #11111024);
}

.frame-gutter:not(.frame-gutter--float) input[type="range"] {
  width: 7.5rem;
}

.frame-gutter input[type="range"] {
  flex: 1;
  min-width: 0;
  margin: 0;
  accent-color: #bf4415;
}

.case__frames.case__frames,
.gallery.gallery {
  box-sizing: border-box;
  padding-inline: calc(var(--frame-gutter, 0) * 1%);
}

.lightbox.lightbox {
  padding-inline: calc(1.25rem + var(--frame-gutter, 0) * 1.15vw);
  padding-bottom: 4.25rem;
}

.lightbox .frame-gutter {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  width: min(14rem, 72vw);
  margin: 0;
  color: #f5f5f3;
  background: rgb(17 17 16 / 62%);
  border-radius: 999px;
  padding: 0.35rem 0.8rem 0.35rem 0.95rem;
}

.lightbox .frame-gutter .t-label {
  color: inherit;
}

html:has(dialog[open]) .frame-gutter:not(.frame-gutter--float) {
  visibility: hidden;
}

@media (width <= 380px) {
  .hdr__brand .t-label {
    letter-spacing: 0.04em;
    font-size: 0.625rem;
  }

  .gallery.gallery {
    grid-template-columns: 1fr;
  }
}
