@media (max-width: 960px) {
  .region-body .kagma-gallery[data-gallery="ngallery_illustrations"] {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 8px max(7px, env(safe-area-inset-right)) 0 max(7px, env(safe-area-inset-left));
  }
  .kagma-gallery[data-gallery="ngallery_illustrations"] > .gallery-tile {
    position: relative;
    min-width: 0;
    visibility: visible !important;
    aspect-ratio: 1;
    background: #181817;
    border-radius: 0;
  }
  .kagma-gallery[data-gallery="ngallery_illustrations"] > .gallery-tile picture {
    position: absolute;
    inset: 0;
  }
  .kagma-gallery[data-gallery="ngallery_illustrations"] > .gallery-tile img {
    object-fit: cover !important;
    transform: none;
  }
  .kagma-gallery[data-gallery="ngallery_illustrations"] > .gallery-tile:focus-visible {
    outline: 2px solid white;
    outline-offset: -3px;
  }
}

html:has(.draw-album[open]) { overflow: hidden; }
.draw-album {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  isolation: isolate;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.draw-album::backdrop { background: transparent; }
.draw-album-bg, .draw-album-stage, .draw-album-rail { position: absolute; inset: 0; }
.draw-album-bg { background: #000; }
.draw-album-stage { overflow: hidden; touch-action: none; outline: none; }
.draw-album.morphing :is(.draw-album-stage, .draw-album-head, .draw-album-filmstrip) { opacity: 0; }
.draw-album-rail { display: flex; }
.draw-album-rail.settle { transition: transform 240ms cubic-bezier(.2,.72,.23,1); }
.draw-album-frame {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}
.draw-album-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}
.draw-album-retry {
  align-self: center;
  justify-self: center;
  padding: 12px 18px;
  border: 1px solid #ffffff45;
  border-radius: 24px;
  background: #1d1d1f;
  font: inherit;
  color: inherit;
}
.draw-album-frame[aria-busy=true]::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff38;
  border-top-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  animation: album-wait 800ms linear 240ms infinite, album-reveal 240ms step-end;
}
@keyframes album-wait { to { transform: rotate(1turn); } }
@keyframes album-reveal { from { opacity: 0; } to { opacity: 1; } }
.draw-album-head {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  left: max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 6px;
  pointer-events: none;
}
.draw-album-back, .draw-album-label {
  box-sizing: border-box;
  color: white;
  border: 1px solid #ffffff2e;
  background: rgb(26 26 26 / 78%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.draw-album-back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0 2px 0 0;
  pointer-events: auto;
  cursor: pointer;
}
.draw-album-back::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 0 2.5px 2.5px;
  transform: translateX(2px) rotate(45deg);
}
.draw-album-label {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 2px;
  min-height: 44px;
  align-content: center;
  padding: 5px 16px;
  border-radius: 24px;
  text-align: center;
  line-height: 1.15;
}
.draw-album-name { font-size: .9375rem; font-weight: 600; }
.draw-album-name:empty { display: none; }
.draw-album-count { font-size: .8rem; font-variant-numeric: tabular-nums; opacity: .72; }
.draw-album-name:empty + .draw-album-count { font-size: .875rem; opacity: .94; }
.draw-album-filmstrip {
  --step: clamp(27px, 7.2vw, 36px);
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  inset-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
  max-width: 34rem;
  margin-inline: auto;
  height: 54px;
  overflow: hidden;
}
.draw-album-strip {
  height: 100%;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  scroll-behavior: auto;
  scrollbar-width: none;
}
.draw-album-filmstrip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, black, transparent 5%, transparent 95%, black);
  pointer-events: none;
}
.draw-album-strip::-webkit-scrollbar { display: none; }
.draw-album-strip::before, .draw-album-strip::after { content: ""; flex: 0 0 calc((100% - var(--step)) / 2); }
.draw-album-strip button {
  display: grid;
  place-items: center;
  flex: 0 0 var(--step);
  width: var(--step);
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.draw-album-strip img {
  box-sizing: border-box;
  width: calc(100% - 3px);
  height: 31px;
  object-fit: cover;
  border-radius: 3px;
  pointer-events: none;
  outline: 0;
  border: 0;
  opacity: .9;
}
.draw-album-selection {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: var(--step);
  height: 35px;
  box-sizing: border-box;
  border: 1.5px solid #fff;
  border-radius: 5px;
  transform: translate(calc(-50% + var(--offset, 0px)), -50%);
}
.draw-album button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.draw-album .draw-album-strip button:is(:focus, :focus-visible, :active) { outline: none; box-shadow: none; }
.draw-album-filmstrip:has(button:focus-visible) .draw-album-selection { border-width: 2.5px; }
.draw-album-head, .draw-album-filmstrip { transition: opacity 160ms ease-out; }
.draw-album.hide-controls :is(.draw-album-head, .draw-album-filmstrip),
.draw-album.drag-down :is(.draw-album-head, .draw-album-filmstrip) { opacity: 0; pointer-events: none; }
.draw-album.hide-controls .draw-album-back, .draw-album.drag-down .draw-album-back { pointer-events: none; }
.draw-album.returning :is(.draw-album-stage, .draw-album-bg) {
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}
@media (max-height: 480px) {
  .draw-album-head { top: max(6px, env(safe-area-inset-top)); }
  .draw-album-filmstrip { bottom: max(2px, env(safe-area-inset-bottom)); height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .draw-album *, .draw-album::backdrop { transition: none !important; animation: none !important; }
}
