body {
    font-family: "メイリオ", Meiryo, "游ゴシック", "Yu Gothic", "ヒラギノ角ゴシック", "Hiragino Sans", "ヒラギノ丸ゴシック ProN", "Hiragino Kaku Gothic ProN", "MS Pゴシック", "MS PGothic", Osaka, sans-serif !important;
}

.btn-primary {
    background-color: #ec2061 !important;
    border-color: #ec2061 !important;
    color: #fff !important;
    /* 必要に応じて文字色も指定 */
}

.btn-primary:hover {
    background-color: #ec2061af !important;
    border-color: #ec2061af !important;
}

#message {
    margin-top: 20px;
    padding: 10px;
}

#drop-zone {
    width: 85%;
    height: 150px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.7rem auto;

}

#progress-container {
    width: 80%;
    height: 20px;
    background: #eee;
    display: none;
}

#progress-bar {
    height: 100%;
    width: 0;
    background: #4caf50;
}

.alert {
    width: 50%;
    left: 25%;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* メインページのサムネ */
.thumbnail-title {
    color: #EA2D6E !important;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}

.thumbnail-item .btn-edit {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    z-index: 9;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;

}

/* 編集画面のサムネ表示・変更箇所 */
.thumbnail-wrapper {
    display: inline-block;
    cursor: pointer;
    border: 2px dashed #ccc;
    padding: 10px;
    border-radius: 8px;
    transition: border-color 0.2s;
    width: 250px;
    height: 250px;
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
}

.thumbnail-wrapper:hover {
    border-color: #888;
}

.thumbnail-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hint {
    color: #666;
    margin-top: 10px;
}

/* ------------------------ */

.img-wrapper:hover .btn-edit,
.img-wrapper:focus-within .btn-edit {
    opacity: 1;
    pointer-events: auto;
}

.thumbnail-item {
    position: relative;
    overflow: hidden;
    vertical-align: middle;
    object-fit: cover;
    object-position: top;
}

.thumbnail-item a {
    text-decoration: none !important;
}


/* 画像コンテナのアスペクト比固定 */
.thumbnail-item .img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5;
    /* 幅:高さ = 4:5 の比率 */
    overflow: hidden;
    border-radius: 0.25rem;
    background-color: #f0f0f0;
    position: relative;
}

.thumbnail-item .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 中央を保ったままトリミング */
    object-position: top;
    display: block;
    transition: transform 0.4s ease;
    /* ゆっくり拡大 */

}

.thumbnail-item .img-wrapper:hover img {
    transform: scale(1.05);
}

.icon-text-fix {
    display: flex;
    align-items: center;
}

.icon-fix {
    margin-right: 5px;
    width: 24px;
    height: 24px;
}