.box-card-carousel { display: contents; }
:is(.box-card-scrollbar, .box-filters-arrow) { display: none; }
#home .box-card-track > .v7-format-card { background: #fff; }

@media (min-width:1024px) {
  .box-card-track > .v7-format-card { container: storage-format / inline-size; }
  :is(.site-volume-grid,.site-review-volume-grid) > .v7-format-card { min-height: 0; }

  @container storage-format (max-width:334px) {
    .v7-format-media { height: auto; aspect-ratio: 3 / 2; }
    .v7-format-bottom { flex-direction: column; align-items: stretch; }
    .v7-format-book { width: 100%; min-width: 0; }
  }
}

@media (max-width:1023px) {
  .box-card-track > .v7-format-card {
    box-shadow: inset 0 0 0 1px var(--responsive-edge, #dfe8ed);
  }

  #home .box-card-track .v7-format-book { border-radius: 10px; }
}

@media (max-width:767px) {
  .box-card-carousel { display: block; width: 100%; min-width: 0; }

  #home :is(#formats, #volume-pricing, main) .box-card-carousel > .box-card-track {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 2px 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .box-card-track::-webkit-scrollbar { display: none; }

  #home :is(#formats, #volume-pricing, main) .box-card-track > :not([hidden]) {
    flex: 0 0 min(88%, 360px);
    width: auto;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  #home :is(#formats, #volume-pricing, main) .box-card-track:not(:has(> :not([hidden]) ~ :not([hidden]))) > :not([hidden]) {
    flex-basis: 100%;
  }

  #home :is(#formats, #volume-pricing, main) .box-card-carousel > .box-card-track:has(+ .box-card-scrollbar:is(:focus, :active)) {
    scroll-snap-type: none;
  }

  .box-card-scrollbar:not([hidden]) {
    display: block;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
  }

  .box-card-scrollbar::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: #dfe8ed; }
  .box-card-scrollbar::-moz-range-track { height: 4px; border-radius: 999px; background: #dfe8ed; }

  .box-card-scrollbar::-webkit-slider-thumb {
    width: var(--box-scroll-thumb, 48px);
    height: 8px;
    margin-top: -2px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-orange, #ea580c);
    -webkit-appearance: none;
    appearance: none;
  }

  .box-card-scrollbar::-moz-range-thumb {
    width: var(--box-scroll-thumb, 48px);
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-orange, #ea580c);
  }

  #home #formats .v6-format-tabs { position: relative; }

  #home #formats .v6-format-tabs > .v6-615-3437 {
    scrollbar-width: none;
    padding-block: 2px;
  }

  #formats .v6-format-tabs > .v6-615-3437::-webkit-scrollbar { display: none; }

  #home #formats .v6-format-tabs[data-box-filters-direction="left"] {
    --box-filter-fade-direction: to left;
  }

  #home #formats .v6-format-tabs[data-box-filters-direction] > .v6-615-3437 {
    -webkit-mask-image: linear-gradient(var(--box-filter-fade-direction, to right), #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(var(--box-filter-fade-direction, to right), #000 calc(100% - 48px), transparent);
  }

  #home #formats .box-filters-arrow:not([hidden]) {
    position: absolute;
    z-index: 1;
    inset-inline-end: 2px;
    inset-block-start: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #14607f;
    box-shadow: 0 2px 8px rgb(20 96 127 / 18%);
    cursor: pointer;
  }

  #home #formats [data-box-filters-direction="left"] > .box-filters-arrow {
    inset-inline-end: auto;
    inset-inline-start: 2px;
  }

  .box-filters-arrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    transform: translateX(-2px) rotate(45deg);
  }

  [data-box-filters-direction="left"] > .box-filters-arrow::before {
    transform: translateX(2px) rotate(-135deg);
  }

  :is(.box-card-track, .box-card-scrollbar, .box-filters-arrow):focus-visible {
    outline: 1px solid #14607f;
    outline-offset: 2px;
  }
}
