/* フロントエンド用のスタイル */
.mv-container-wrapper {
    margin: 20px 0;
}

.mv-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background-color: #222;
    overflow: hidden;
    user-select: none;
    /* スマホは3:4 */
    aspect-ratio: 3 / 4;
}

@media (min-width: 768px) {
    .mv-container {
        /* PCは3:2 (見開き) */
        aspect-ratio: 3 / 2;
    }
}

.mv-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.3s ease-out;
    flex-direction: row-reverse; /* 右から左へ */
}

.mv-page {
    flex-shrink: 0;
    height: 100%;
    width: 100%; /* スマホ */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    overflow: hidden;
    border-left: 1px solid #111;
}

@media (min-width: 768px) {
    .mv-page {
        width: 50%; /* PCは見開き */
    }
}

.mv-page img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    display: block;
}

/* コントローラー */
.mv-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 30px;
    color: white;
    align-items: center;
}

.mv-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.mv-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.mv-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mv-counter {
    font-size: 14px;
    font-family: sans-serif;
    min-width: 50px;
    text-align: center;
    font-weight: bold;
}

.mv-loading {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    z-index: 5;
}

/* ------------------------
   エディタ(管理画面)用のスタイル 
   ------------------------ */
.sms-editor-wrapper {
    padding: 20px;
    border: 1px dashed #ccc;
    background: #f9f9f9;
    text-align: center;
}

.sms-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.sms-preview-item {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #eee;
    overflow: hidden;
    border: 1px solid #ddd;
}

.sms-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sms-page-num {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
}