
#category_navi {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    margin-bottom: 1rem;
}
#category_navi > .bottom_line {
    position: relative;
    left: 0;
    bottom: 1px;
    width: 100%;
    height: 1px;
    background-color: #000;
    z-index: 3;
}
#category_navi > .categories {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    position: relative;
    gap: .5em;
    padding: 0 .5em;
    scroll-behavior: smooth;
    z-index: 1;
    flex-wrap: nowrap;

    overflow-x: auto;
    overflow-y: hidden;

    flex-wrap: nowrap;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;

    touch-action: pan-y;
    overscroll-behavior-x: contain;

    scrollbar-width: none;
    cursor: grab;
}
#category_navi > .categories::-webkit-scrollbar {
    display: none; 
}

#category_navi > .categories * {
    user-select: none;
    -webkit-user-select: none; 
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    scroll-snap-align: start;
}


#category_navi > .categories.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

#category_navi > .arrow {
  position: absolute;
  top: 50%;
  width: 1.6em;
  height: 1.6em;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform: translateY(-50%);
  transition: background 0.3s ease;
    background-color: rgba(0,0,0,0.1);
    border-radius: 50%;
}
#category_navi > .arrow span {
    font-size: 1.125rem;
    line-height: 1;
}
#category_navi > .arrow:hover {
  background-color: rgba(0,0,0,0.3);
}
#category_navi > .arrow.left {
  left: 0;
}
#category_navi > .arrow.right {
  right: 0;
}

#category_navi > .arrow.left span {
    transform: translateX(25%);
}
#category_navi > .arrow.right span {
    transform: translateX(12%);
}



.category_cards > .category_card {
    display: block;
    width: calc(16.667% - .5rem);
    min-width: 80px;
    max-width: 90px;
    height: auto;
    border: 1px solid var(--border-color-04);
    border-radius: 1rem;

    background: var(--bg-02);
    color: var(--text-unselected);

    padding: 1em;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
    position: relative;
    margin: 3px 0;
}
.category_cards > .category_card.active {
    background: #eef4fb;
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
    transform: translateY(-2px);
}
.category_cards > .category_card:hover {
    background-color: var(--bg-03);
    border-color: var(--border-color-03);
    transform: translateY(-2px);
}
.category_cards > .category_card > img {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    height: auto;
    margin-bottom: 0.5em;
    border-radius: 50%;
}
.category_cards > .category_card > .category_name {
    display: block;
    width: 100%;
    font-size: 0.875em;
    overflow: hidden;
    white-space: nowrap;
}

@media (max-width: 400px) {
    .category_cards > .category_card {
        border-radius: 7px;
    }
}