/* ========================================
   album.css - アルバムページ共通スタイル
   fes_live.html / with_meets.html で使用
   ======================================== */

/* CSS カスタムプロパティ（各ページで上書き） */
:root {
    --album-hero-from:     #667eea;
    --album-hero-to:       #764ba2;
    --album-tab-color:     #c084d4;
    --album-title-color:   #5b3a8e;
    --album-spine-from:    #a07848;
    --album-spine-mid:     #c8a060;
    --album-spine-to:      #b08040;
    --album-spine-shadow1: #b8956a;
    --album-spine-shadow2: #a07848;
    --album-book-bg:       #f5ede0;
    --album-shadow-color:  rgba(80, 50, 20, 0.35);
    --album-card-shadow:   rgba(80, 50, 20, 0.18);
    --album-lb-close-hover: #f0e0ff;
    --album-img-bg:        #e8e0f0;
}

/* ページ全体 - クラフト紙風 */
body {
    background-color: #c8a97a;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(180, 140, 90, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(160, 120, 70, 0.3) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23c8a97a'/%3E%3Crect x='0' y='0' width='1' height='1' fill='rgba(100,70,30,0.06)'/%3E%3Crect x='2' y='2' width='1' height='1' fill='rgba(100,70,30,0.04)'/%3E%3C/svg%3E");
}

/* ヒーローバナー */
.page-hero {
    background: linear-gradient(135deg, var(--album-hero-from) 0%, var(--album-hero-to) 100%);
    color: white;
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1.5' fill='rgba(255,255,255,0.12)'/%3E%3C/svg%3E") repeat;
}

.page-hero-content {
    position: relative;
}

.page-hero h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-hero p {
    font-size: 1rem;
    opacity: 0.88;
}

/* アルバムエリア */
.album-page {
    padding: 56px 0 80px;
}

/* アルバム本体 */
.album-book {
    background: var(--album-book-bg);
    border-radius: 4px 12px 12px 4px;
    box-shadow:
        -6px 0 0 var(--album-spine-shadow1),
        -10px 0 0 var(--album-spine-shadow2),
        0 8px 32px var(--album-shadow-color),
        0 2px 8px rgba(80, 50, 20, 0.2);
    padding: 40px 40px 48px;
    position: relative;
}

/* 背表紙 */
.album-book::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(
        to right,
        var(--album-spine-from),
        var(--album-spine-mid),
        var(--album-spine-to)
    );
    border-radius: 4px 0 0 4px;
}

/* タイトル */
.album-header {
    text-align: center;
    margin-bottom: 32px;
}

.album-header h3 {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--album-title-color);
    border-bottom: 3px solid var(--album-tab-color);
    padding-bottom: 6px;
    letter-spacing: 0.05em;
}

/* タブ */
.tab-list {
    display: flex;
    justify-content: center;
    border-bottom: 3px solid var(--album-tab-color);
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 8px 8px 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--album-tab-color);
    cursor: pointer;
    position: relative;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.05em;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.75);
}

.tab-btn.active {
    color: #fff;
    background: var(--album-tab-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--album-tab-color);
}

/* タブパネル */
.tab-panel {
    display: none;
    animation: albumFadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes albumFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 2カラムグリッド */
.album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 36px;
}

/* ポラロイド風カード */
.photo-card {
    background: #fff;
    border-radius: 3px;
    padding: 14px 14px 32px;
    box-shadow: 0 6px 20px var(--album-card-shadow), 0 2px 6px rgba(80, 50, 20, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.photo-card:nth-child(1) { transform: rotate(-1.5deg); }
.photo-card:nth-child(2) { transform: rotate(1.2deg); }
.photo-card:nth-child(3) { transform: rotate(0.8deg); }
.photo-card:nth-child(4) { transform: rotate(-1deg); }
.photo-card:nth-child(5) { transform: rotate(-0.6deg); }
.photo-card:nth-child(6) { transform: rotate(1.4deg); }

.photo-card:hover {
    transform: rotate(0deg) scale(1.04) translateY(-6px);
    box-shadow: 0 20px 48px rgba(80, 50, 20, 0.28), 0 4px 12px rgba(80, 50, 20, 0.15);
    z-index: 10;
}

/* 写真 */
.photo-card .photo-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 1px;
    background: var(--album-img-bg);
}

/* マスキングテープ */
.photo-card::before {
    content: '';
    position: absolute;
    top: -13px;
    left: 50%;
    width: 60px;
    height: 24px;
    border-radius: 2px;
    opacity: 0.75;
}

.photo-card:nth-child(1)::before { background: #a8d8ea; transform: translateX(-50%) rotate(-3deg); }
.photo-card:nth-child(2)::before { background: #f7c5d0; transform: translateX(-50%) rotate(2deg); }
.photo-card:nth-child(3)::before { background: #b8e0b0; transform: translateX(-50%) rotate(-1deg); }
.photo-card:nth-child(4)::before { background: #fde68a; transform: translateX(-50%) rotate(3deg); }
.photo-card:nth-child(5)::before { background: #f7c5d0; transform: translateX(-50%) rotate(-2deg); }
.photo-card:nth-child(6)::before { background: #c5b8e8; transform: translateX(-50%) rotate(1deg); }

/* ローディング表示 */
.tab-loading {
    text-align: center;
    padding: 40px 0;
    color: #aaa;
    font-size: 0.95rem;
}

/* ライトボックス */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-inner img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: var(--album-lb-close-hover);
}

/* サブタブ */
.sub-tab-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 6px;
    margin-bottom: 28px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--album-tab-color);
}

.sub-tab-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 6px 6px 0 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--album-tab-color);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.04em;
}

.sub-tab-btn:hover {
    background: rgba(255, 255, 255, 0.75);
}

.sub-tab-btn.active {
    color: #fff;
    background: var(--album-tab-color);
}

.sub-tab-panel {
    display: none;
    animation: albumFadeIn 0.3s ease;
}

.sub-tab-panel.active {
    display: block;
}

/* レスポンシブ */
@media (max-width: 640px) {
    .page-hero h2 { font-size: 1.6rem; }

    .album-book {
        padding: 28px 20px 36px;
        border-radius: 2px 8px 8px 2px;
    }

    .album-book::before { width: 16px; }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 14px;
    }

    .photo-card:nth-child(1), .photo-card:nth-child(2),
    .photo-card:nth-child(3), .photo-card:nth-child(4),
    .photo-card:nth-child(5), .photo-card:nth-child(6) {
        transform: rotate(0deg);
    }

    .photo-card:hover {
        transform: scale(1.02) translateY(-3px);
    }

    .photo-card { padding: 12px 12px 28px; }
}

@media (min-width: 641px) and (max-width: 900px) {
    .album-grid { gap: 40px 28px; }
    .album-book { padding: 32px 28px 40px; }
}
