* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f0eb;
    font-family: 'Yu Gothic', 'Hiragino Kaku Gothic Pro', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* ログイン画面 */
.login-box {
    background: white;
    padding: 32px 48px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

/* 白枠内ロゴ */
.box-logo {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.box-logo img {
    max-height: 220px;
    width: auto;
    max-width: 380px;
    object-fit: contain;
}

h1 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 32px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: #8b7355;
}

button {
    width: 100%;
    padding: 14px;
    background-color: #8b7355;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #7a6448;
}

.error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e74c3c;
    font-size: 13px;
    margin-bottom: 16px;
    background: #fdf0ef;
    padding: 10px;
    border-radius: 6px;
}

/* お問い合わせフッター */
.contact-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #888;
    text-align: center;
    line-height: 2;
}

/* ギャラリー画面 */
.gallery-box {
    background: white;
    padding: 32px 48px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin: 40px auto;
}

/* ギャラリー内ロゴ */
.gallery-logo {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.gallery-logo img {
    max-height: 220px;
    width: auto;
    max-width: 380px;
    object-fit: contain;
}

/* 情報バナー */
.info-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f6f2;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 8px;
    gap: 16px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
}

.info-value {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.info-divider {
    width: 1px;
    height: 36px;
    background: #ddd;
}

/* 写真グリッド */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 32px 0;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
    background: #f0f0f0;
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    display: block;
}

.photo-item img:hover {
    transform: scale(1.03);
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f5f0eb;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.page-btn:hover {
    background: #e8ddd0;
}

.page-btn.current {
    background: #8b7355;
    color: white;
    font-weight: bold;
}

/* ボタン */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background-color: #8b7355;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    transition: background-color 0.2s;
}

.btn-download:hover {
    background-color: #7a6448;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background-color: #eee;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-logout:hover {
    background-color: #ddd;
}

/* 拡大表示モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 28px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}

/* スマホ対応 */
@media (max-width: 600px) {
    body {
        padding: 20px 16px;
    }

    .login-box {
        padding: 24px 24px 28px;
    }

    .box-logo {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .box-logo img {
        max-height: 200px;
        max-width: 340px;
    }

    .gallery-logo {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .gallery-logo img {
        max-height: 200px;
        max-width: 340px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-box {
        padding: 24px 20px 24px;
        margin: 16px auto;
    }

    .info-banner {
        gap: 12px;
        padding: 12px;
    }

    .info-divider {
        display: none;
    }

    .info-value {
        font-size: 14px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* 分割ZIPダウンロードボタン */
.zip-parts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.zip-part-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #f9f6f2;
    border: 1px solid #e8ddd0;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.zip-part-btn:hover {
    background: #f0e8dc;
    border-color: #8b7355;
}

.zip-part-icon {
    font-size: 24px;
}

.zip-part-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.zip-part-title {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.zip-part-size {
    font-size: 12px;
    color: #888;
}

.zip-part-arrow {
    font-size: 18px;
    color: #8b7355;
    font-weight: bold;
}