@charset "UTF-8";

/* ── スライダー本体 ── */
.slider {
    position: relative;
    user-select: none;
}

/* 拡大表示エリア */
.slider-main {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4 / 3;
    background: #111;
    overflow: hidden;
    border-radius: 6px;
    margin: auto;
}
.slider-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.slider-main img.active {
    opacity: 1;
}

/* キャプション */
.slider-caption {
    text-align: center;
    font-size: 1.5rem;
    /*color: #555;*/
    min-height: 1.6em;
    margin: 0.4rem 0 0.6rem;
}

/* 矢印ボタン */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: none;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.18s;
    padding: 0;
}
.arrow:hover { background: rgba(0,0,0,0.7); }
.arrow:focus-visible { outline: 2px solid #0050ba; outline-offset: 2px; }
.arrow.prev { left: 0.5rem; }
.arrow.next { right: 0.5rem; }

/* インジケーター */
.dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 0.5rem;
}
.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid #0f4286;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s;
    flex-shrink: 0;
}
.dot.active {
    background: #0050ba;
}
.dot:focus-visible { outline: 2px solid #0050ba; outline-offset: 2px; }

/* サムネイル一覧 */
.thumbnails {
    display: grid;
    gap: 6px;
    margin-top: 0.8rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.thumb-btn {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4/3;
    transition: border-color 0.18s, opacity 0.18s;
    opacity: 0.65;
}
.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.thumb-btn.active {
    border-color: #0f4286;
    opacity: 1;
}
.thumb-btn:hover { opacity: 0.9; }
.thumb-btn:focus-visible { outline: 2px solid #0050ba; outline-offset: 2px; }

/* スワイプ用カーソル */
.slider-main { cursor: grab; }
.slider-main:active { cursor: grabbing; }

/* カウンター */
.counter {
    position: absolute;
    bottom: 0.5rem;
    right: 0.6rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1.2rem;
    padding: 2px 7px;
    border-radius: 10px;
    pointer-events: none;
}

@media (max-width: 500px) {
    .thumb-btn { flex: 1 1 calc(25% - 6px); }
    .arrow { width: 2rem; height: 2rem; font-size: 1.1rem; }
}