@charset "UTF-8";

/* =========================================
   1. カラーテーマ定義（ランダム適用用）
   ========================================= */
:root {
    /* デフォルト（夜空・ポータル用） */
    --bg-grad: linear-gradient(135deg, #1a1c29 0%, #2c253d 100%);
    --text-main: #f0f0f5;
    --text-sub: #b0b3c6;
    --line-color: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.1);
}

/* 🌸 春の桜テーマ */
.theme-sakura {
    --bg-grad: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    --text-main: #4a4a4a; 
    --text-sub: #6b6b6b;
    --line-color: rgba(255, 255, 255, 0.6); 
    --card-bg: rgba(255, 255, 255, 0.4);
}

/* 🌇 夕暮れテーマ */
.theme-sunset {
    --bg-grad: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --text-main: #5c3b2e; 
    --text-sub: #8c6352;
    --line-color: rgba(255, 255, 255, 0.6); 
    --card-bg: rgba(255, 255, 255, 0.4);
}

/* 🌤 青春の青空テーマ */
.theme-sky {
    --bg-grad: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    --text-main: #3b4d61; 
    --text-sub: #637991;
    --line-color: rgba(255, 255, 255, 0.6); 
    --card-bg: rgba(255, 255, 255, 0.4);
}

/* 🌿 新緑テーマ */
.theme-forest {
    --bg-grad: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    --text-main: #3a523d; 
    --text-sub: #5f7a63;
    --line-color: rgba(255, 255, 255, 0.6); 
    --card-bg: rgba(255, 255, 255, 0.4);
}

/* =========================================
   2. ベース設定（スマホ特化）
   ========================================= */
body, html {
    margin: 0; 
    padding: 0;
    font-family: 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif;
    color: var(--text-main);
    background: var(--bg-grad);
    background-attachment: fixed;
    overflow-x: hidden;
    transition: background 1s ease, color 1s ease; 
    -webkit-tap-highlight-color: transparent;
}

/* グラスモーフィズム（すりガラス）共通クラス */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* =========================================
   3. ヒーローセクション（全画面表示）
   ========================================= */
#detail-view {
    width: 100%;
    /* コンテンツ全体の余白調整 */
    padding: 0 20px 80px; 
    box-sizing: border-box;
}

.detail-hero {
    /* 画面の高さいっぱいに広げる */
    min-height: 100vh; 
    
    /* 上下左右の中央に文字を配置 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    position: relative;
    margin-bottom: 0; /* 下の要素との余白はスクロールで稼ぐ */
}

.detail-hero h1 { 
    font-size: 2.5rem; 
    font-weight: normal;
    margin: 0 0 20px 0; 
    letter-spacing: 0.2em;
    text-shadow: 0 4px 15px rgba(0,0,0,0.1);
    line-height: 1.4;
}

.detail-hero p { 
    font-size: 1.0rem; 
    color: var(--text-main); 
    opacity: 0.9;
    letter-spacing: 0.15em;
}

/* スクロールダウンの矢印アニメーション */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%); /* 左右中央揃えの補正 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: sans-serif;
    opacity: 0.7;
}

/* 下向きの矢印（CSSで作る） */
.scroll-arrow {
    width: 15px;
    height: 15px;
    border-bottom: 2px solid var(--text-main);
    border-right: 2px solid var(--text-main);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* =========================================
   4. セクションタイトル
   ========================================= */
.section-title {
    font-size: 1.5rem;
    text-align: center;
    margin: 80px 0 40px; /* 余白を多めにとってエモく */
    letter-spacing: 0.15em;
    border-bottom: 1px solid var(--line-color);
    padding-bottom: 15px;
}

/* =========================================
   5. 軌跡（タイムライン）※画像なし・テキストのみ
   ========================================= */
.timeline {
    position: relative;
    padding-left: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 100%;
    background: var(--line-color);
}
.timeline-item {
    position: relative;
    margin-bottom: 30px;
}
.timeline-dot {
    position: absolute;
    top: 24px; left: -25px;
    width: 12px; height: 12px;
    background: #fff;
    border: 2px solid var(--text-sub);
    border-radius: 50%;
    z-index: 2;
}
.timeline-content {
    padding: 20px;
}
.timeline-date { 
    font-size: 0.8rem; 
    color: var(--text-sub); 
    margin-bottom: 8px; 
    font-weight: bold;
}
.timeline-content h3 { 
    font-size: 1.2rem; 
    margin: 0 0 10px 0; 
}
.timeline-content p { 
    font-size: 0.95rem; 
    line-height: 1.8; 
    margin: 0; 
}

/* =========================================
   6. フォトギャラリー（1列・傾き・すりガラス）
   ========================================= */
.photo-gallery {
    display: flex;
    flex-direction: column; /* 1列にする */
    align-items: center;    /* 中央配置 */
    gap: 50px;              /* 写真の間隔 */
    margin-bottom: 60px;
    padding: 0 10px;
}

.gallery-item {
    width: 100%;
    max-width: 350px;
    
    /* すりガラス効果（メッセージカードと同じ） */
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* 均等な余白 */
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    
    transition: transform 0.3s ease;
}

/* 奇数：左傾き */
.gallery-item:nth-child(odd) {
    transform: rotate(-3deg) translateX(-10px);
}
/* 偶数：右傾き */
.gallery-item:nth-child(even) {
    transform: rotate(3deg) translateX(10px);
}
/* ホバー時 */
.gallery-item:hover {
    transform: rotate(0deg) scale(1.03);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    filter: sepia(0.05) contrast(1.05);
}

/* =========================================
   7. メッセージリスト
   ========================================= */
.message-list { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.message-item h4 { 
    margin: 0 0 10px 0; 
    font-size: 1rem; 
    color: var(--text-sub); 
    border-bottom: 1px dashed var(--line-color);
    padding-bottom: 5px;
    display: inline-block;
}
.message-item p { 
    margin: 0; 
    font-size: 0.95rem; 
    line-height: 1.8; 
}

/* =========================================
   8. アニメーション補助 & ポータル
   ========================================= */
/* JS読み込み前のチラつき防止 */
.fade-up-detail, .scroll-fade {
    opacity: 0;
}

/* ポータル画面用 */
.portal-container { padding: 40px 20px; max-width: 600px; margin: 0 auto; }
.senpai-list { display: flex; flex-direction: column; gap: 20px; }
.senpai-item { display: flex; align-items: center; gap: 15px; text-decoration: none; color: inherit; transition: transform 0.2s; }
.senpai-item:active { transform: scale(0.97); }
.senpai-icon { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.5); }
.url-badge { display: inline-block; background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; margin-top: 5px; }

/* --- （既存のコードの続きに追加） --- */

/* =========================================
   9. 合言葉ロック画面（エモいオーバーレイ）
   ========================================= */
#password-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(20, 20, 30, 0.85); /* 暗めの背景 */
    backdrop-filter: blur(15px);        /* すりガラスのような強いぼかし */
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s ease;
}

/* ロック画面のコンテンツ */
.lock-content {
    text-align: center;
    color: #fff;
    width: 80%;
    max-width: 300px;
}

.lock-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.lock-title {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    margin-bottom: 30px;
    font-weight: normal;
}

/* エモい入力フォーム */
.pass-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    padding: 10px;
    width: 100%;
    letter-spacing: 0.2em;
    font-family: 'Yu Mincho', serif;
    outline: none;
    transition: border-color 0.3s;
    border-radius: 0; /* iOSでの丸み除去 */
}

.pass-input:focus {
    border-bottom-color: #fff;
}

.pass-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
}

/* 解除ボタン */
.unlock-btn {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Yu Mincho', serif;
    letter-spacing: 0.1em;
    transition: all 0.3s;
}

.unlock-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* エラーメッセージ */
#error-msg {
    color: #ff9a9e;
    font-size: 0.9rem;
    margin-top: 20px;
    height: 1.5em; /* 領域確保 */
    opacity: 0;
    transition: opacity 0.3s;
}

/* ロック解除時のアニメーションクラス */
.unlocked {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}