/* 外枠 */
.slider-wrapper {
    position: relative;
    /* デフォルト値。HTMLで data-max-width が指定されれば上書きされます */
    max-width: 512px; 
    margin: 0 auto;
}

/* ボタン */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: background 0.3s;
}
.slider-btn:hover { background: rgba(0, 0, 0, 0.8); }
.prev { left: 10px; }
.next { right: 10px; }

/* スライダー本体 */
.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    
    width: 100%; /* 親(wrapper)の幅に合わせる */
    /* ここに max-width は書かない（wrapperで制御するため） */
    
    aspect-ratio: 512 / 763; /* デフォルト比率 */
    border-radius: 12px;
    background: #eee;
    cursor: pointer;
}
.slider-container::-webkit-scrollbar { display: none; }

/* スライドアイテム */
.slide-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ステータスアイコン */
.status-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    pointer-events: none;
    z-index: 20;
    white-space: nowrap;
}
.fade-anim {
    animation: fadeInOut 1s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}
