.daiso-home-cards.alignfull {
    --daiso-card-ink: #123451;
    --daiso-card-accent: #00689e;
    background: linear-gradient(180deg, #e4edf4, #eef4f9 76%);
    color: var(--daiso-card-ink);
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(2rem, 5vw, 3.8rem);
}

/* SWELLがカード区画の下に付ける余白で、360°の手前に白帯が出る。 */
.post_content > .daiso-home-cards.alignfull {
    margin-bottom: 0;
}

.daiso-home-cards__inner.l-container {
    max-width: 1240px;
    padding-inline: clamp(18px, 3.4vw, 50px);
}

.daiso-home-shelf + .daiso-home-shelf {
    margin-top: clamp(2rem, 4vw, 3.3rem);
}

.daiso-home-shelf__header {
    align-items: end;
    display: flex;
    gap: .55rem 1.2rem;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.post_content .daiso-home-shelf__header h2 {
    background: none;
    border: 0;
    color: var(--daiso-card-ink) !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    letter-spacing: .04em;
    line-height: 1.35;
    margin: 0 !important;
    padding: 0 !important;
}

.post_content .daiso-home-shelf__header h2::before,
.post_content .daiso-home-shelf__header h2::after,
.post_content .daiso-home-card h3::before,
.post_content .daiso-home-card h3::after {
    content: none;
}

.post_content .daiso-home-shelf__header p {
    color: #3d5368;
    font-size: .9rem;
    margin: .35rem 0 0;
}

.daiso-home-shelf__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 .9rem;
    justify-content: flex-end;
}

.daiso-home-shelf__more,
.daiso-home-shelf__all {
    align-items: center;
    align-self: end;
    color: var(--daiso-card-accent);
    display: inline-flex;
    font-size: .88rem;
    font-weight: 700;
    gap: .45rem;
    min-height: 44px;
    white-space: nowrap;
}

.daiso-home-shelf__all {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.daiso-home-shelf__all[hidden] {
    display: none;
}

.daiso-home-shelf__rail {
    position: relative;
}

.post_content .daiso-home-shelf__track {
    --card-gap: 16px;
    display: grid;
    gap: var(--card-gap);
    grid-auto-columns: calc((100% - var(--card-gap) * 2) / 3);
    grid-auto-flow: column;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 3px 8px;
    scroll-padding-inline: 3px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.post_content .daiso-home-shelf__track.is-expanded {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
}

.post_content .daiso-home-shelf__track > li {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
}

.daiso-home-card {
    background: #fff;
    border: 1px solid #dbe4eb;
    border-radius: 10px;
    box-shadow: 0 2px 6px #12345112;
    color: var(--daiso-card-ink);
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
}

.daiso-home-card:hover,
.daiso-home-card:focus-visible {
    border-color: var(--daiso-card-accent);
    color: var(--daiso-card-accent);
    text-decoration: none;
}

.daiso-home-shelf a:focus-visible,
.daiso-home-shelf button:focus-visible {
    outline: 3px solid var(--daiso-card-accent);
    outline-offset: -3px;
}

.daiso-home-card__photo {
    aspect-ratio: 16 / 10;
    background: #dce7ee;
    overflow: hidden;
}

.post_content .daiso-home-card__photo img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.daiso-home-card__photo--empty {
    align-items: center;
    background: linear-gradient(145deg, #eaf2f8, #d6e6f1);
    color: #325b78;
    display: flex;
    font-size: 1.5rem;
    font-weight: 600;
    justify-content: center;
    letter-spacing: .16em;
}

.daiso-home-card__body {
    flex: 1;
    padding: .75rem 2.65rem .85rem .9rem;
    position: relative;
}

.post_content .daiso-home-card h3 {
    background: none;
    border: 0;
    color: inherit;
    font-size: clamp(.92rem, 1.4vw, 1.06rem);
    line-height: 1.5;
    margin: 0;
    overflow-wrap: anywhere;
    padding: 0;
}

.post_content .daiso-home-card__meta {
    align-items: center;
    color: #4a6074;
    display: flex;
    flex-wrap: wrap;
    font-size: .73rem;
    gap: .35rem .6rem;
    margin: 0 0 .38rem;
}

.daiso-home-card__meta span {
    background: #e9f2f8;
    border-radius: 4px;
    color: #174c70;
    font-weight: 700;
    padding: .08rem .42rem;
}

.daiso-home-card__arrow {
    color: var(--daiso-card-accent);
    position: absolute;
    right: .9rem;
    top: .75rem;
}

.daiso-home-shelf__button {
    align-items: center;
    background: #fff;
    border: 1px solid #c3d3df;
    border-radius: 50%;
    box-shadow: 0 2px 6px #12345120;
    color: var(--daiso-card-ink);
    cursor: pointer;
    display: grid;
    font-size: 1.75rem;
    height: 44px;
    line-height: 1;
    place-items: center;
    position: absolute;
    top: calc((100% - 36px) * .5);
    transform: translateY(-50%);
    width: 44px;
}

.daiso-home-shelf__button[hidden],
.daiso-home-shelf__autoplay[hidden] {
    display: none;
}

.daiso-home-shelf__autoplay {
    background: transparent;
    border: 0;
    color: var(--daiso-card-accent);
    cursor: pointer;
    display: block;
    font-size: .78rem;
    margin-left: auto;
    min-height: 36px;
    padding: 4px 9px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.daiso-home-shelf__button--prev { left: -20px; }
.daiso-home-shelf__button--next { right: -20px; }

@media (min-width: 960px) {
    .daiso-home-cards__inner.l-container {
        padding-right: max(clamp(18px, 3.4vw, 50px), calc(144px - max(0px, (100vw - 1240px) / 2)));
    }
}

@media (max-width: 959px) {
    .post_content .daiso-home-shelf__track {
        grid-auto-columns: calc((100% - var(--card-gap)) / 2);
    }

    .post_content .daiso-home-shelf__track.is-expanded {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daiso-home-shelf__button--prev { left: 7px; }
    .daiso-home-shelf__button--next { right: 7px; }
}

@media (max-width: 599px) {
    .daiso-home-shelf__header {
        align-items: center;
        display: grid;
        gap: 0 .7rem;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .daiso-home-shelf__header > div:first-child {
        display: contents;
    }

    .daiso-home-shelf__header p {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: .12rem;
    }

    .daiso-home-shelf__links {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        gap: 0 .55rem;
    }

    .daiso-home-shelf__more,
    .daiso-home-shelf__all {
        font-size: .78rem;
        gap: .23rem;
    }

    .post_content .daiso-home-shelf__track {
        --card-gap: 12px;
        grid-auto-columns: 83%;
    }

    .post_content .daiso-home-shelf__track.is-expanded {
        grid-template-columns: minmax(0, 1fr);
    }
}
