/* style.css */

:root {
    --primary-color: #ffb6c1; /* Light Pink */
    --secondary-color: #ff9aa2; /* Coral Pink */
    --accent-color: #ff7b8c; /* Hot Pink */
    --text-color: #333333;
    --light-text-color: #666666;
    --background-light: #fdfdfd;
    --background-dark: #f0f0f0;
    --border-color: #e0e0e0;
    --deep-rose: #e62e5c; /* にぽちゃんカラー */
    --gradient-pink: linear-gradient(135deg, #ffc0cb, #ff7b8c);
    --header-height: 80px; 
    --nav-height: 75px;
    
    /* iPhoneのノッチ対策用変数 */
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

/* ============================ */
/* 🛡️ 機能制限 */
/* ============================ */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* バウンススクロール防止 */
    overscroll-behavior-y: none;
}
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto; 
    
    /* 🔥【重要】スマホでの長押し（コンテキストメニュー）を無効化 */
    -webkit-touch-callout: none;
}

/* ============================ */
/* 📱 疑似スマホフレーム & レイアウト */
/* ============================ */
html, body {
    height: 100%; /* 全画面確保 */
    overflow: hidden; /* 二重スクロール防止 */
}

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f2f5;
    color: var(--text-color);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app-container {
    /* PC表示のデフォルト（中央浮き） */
    width: 100%;
    max-width: 400px;
    height: 90vh; /* PCでは少し浮かせる */
    max-height: 800px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative; 
}

/* 📱 スマホ用レスポンシブ対応 */
@media (max-width: 480px) {
    body {
        background-color: white; /* 背景をアプリと一体化 */
    }
    #app-container {
        width: 100%;
        max-width: 100%;
        border-radius: 0; /* 角丸をなくす */
        box-shadow: none; /* 影を消す */
        
        /* 🔥 Safariのアドレスバー対策: dvhを使う */
        height: 100dvh; 
        max-height: none;

        /* 🔥 ノッチとホームバーの回避 (paddingで内側に押し込む) */
        padding-top: var(--safe-top); 
        padding-bottom: var(--safe-bottom);
        box-sizing: border-box; /* paddingを含めたサイズ計算にする */
    }
    
    /* ヘッダー位置の微調整：少し上に余裕を持たせる */
    header {
        margin-top: 5px; 
    }
}

/* 🎨 おしゃれなスクロールバー */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(230, 46, 92, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(230, 46, 92, 0.5); }


/* ============================ */
/* ローディング画面 */
/* ============================ */
#loading-overlay {
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background-color: #ffedf0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 1;
    transition: opacity 0.6s ease-out;
    border-radius: 30px; 
}
@media (max-width: 480px) {
    #loading-overlay { border-radius: 0; }
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-content { text-align: center; transform: translateY(-20px); }
.loading-icon {
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: pulse 1.5s infinite ease-in-out;
}
.loading-text {
    font-size: 18px; font-weight: 700; color: var(--deep-rose);
    margin-top: 20px; animation: fadeInOut 2s infinite ease-in-out;
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes fadeInOut { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }


/* ============================ */
/* ヘッダー */
/* ============================ */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; height: var(--header-height);
    background-color: white; border-bottom: 1px solid var(--border-color);
    box-sizing: border-box; flex-shrink: 0; z-index: 100; position: relative;
}

.header-left { display: flex; align-items: center; gap: 12px; flex: 1; }

.avatar-container {
    width: 50px; height: 50px; border-radius: 50%; overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); flex-shrink: 0; position: relative; border: 2px solid white; z-index: 5;
}
.avatar-container.clickable { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.avatar-container.clickable:hover { transform: scale(1.05); box-shadow: 0 4px 10px rgba(230, 46, 92, 0.3); }
.header-avatar { width: 100%; height: 100%; object-fit: cover; }
.click-hint-ring {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%; border: 2px solid var(--deep-rose); opacity: 0; animation: ripple 2s infinite;
}
@keyframes ripple { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 0; } }

.header-info-col { display: flex; flex-direction: column; justify-content: center; gap: 4px; flex: 1; }
.name-area-row { position: relative; height: 18px; }

.hint-bubble {
    background: var(--deep-rose); color: white; font-size: 10px; padding: 3px 8px; border-radius: 6px;
    position: absolute; top: -5px; left: 0; line-height: 1.2; white-space: nowrap;
    animation: popBubble 3s infinite ease-in-out; box-shadow: 0 2px 5px rgba(230, 46, 92, 0.3);
}
.hint-bubble::after {
    content: ''; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
    border-width: 4px 4px 4px 0; border-style: solid; border-color: transparent var(--deep-rose) transparent transparent;
}
@keyframes popBubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.status-row { display: flex; align-items: center; gap: 8px; }
.char-name { font-size: 14px; font-weight: 800; color: var(--text-color); line-height: 1; }

.status-col { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.level-badge { color: var(--deep-rose); font-size: 9px; font-weight: 700; line-height: 1; }
.level-badge span { font-size: 11px; }

.exp-track {
    width: 100px; height: 6px; background-color: var(--background-dark);
    border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.exp-fill {
    height: 100%; background: linear-gradient(90deg, #ff9a9e, #fecfef);
    width: 20%; border-radius: 3px; transition: width 0.3s ease;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--light-text-color);
}
.header-right-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-right .signal, .header-right .battery { font-size: 13px; }
#current-time { font-weight: 700; font-size: 13px; color: var(--text-color); }
.live-badge {
    background-color: #ff4141; color: white; font-size: 9px; padding: 2px 6px; border-radius: 4px;
    font-weight: 700; animation: blink 1.5s infinite;
}

/* ============================ */
/* サイドバー */
/* ============================ */
#sidebar-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.2); z-index: 1000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}
#sidebar-overlay.active { opacity: 1; visibility: visible; }

#app-sidebar {
    position: absolute; top: 0; left: 0; width: 280px; height: 100%;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1001; transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1); display: flex; flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.3);
}
#app-sidebar.active { transform: translateX(0); }

.sidebar-header { padding: 30px 20px 20px; display: flex; justify-content: space-between; align-items: center; background: transparent; }
.sidebar-title {
    font-size: 26px; font-weight: 900; background: var(--gradient-pink);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 1px;
}
.sidebar-close-btn {
    background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.8); color: var(--light-text-color);
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; justify-content: center; align-items: center; transition: all 0.2s; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sidebar-close-btn:hover { background: white; color: var(--deep-rose); transform: rotate(90deg); }

.sidebar-menu { list-style: none; padding: 10px 0; margin: 0; flex: 1; overflow-y: auto; }
.menu-label { padding: 15px 25px 5px; font-size: 10px; font-weight: 800; color: #999; text-transform: uppercase; letter-spacing: 1.5px; }
.sidebar-link {
    display: flex; align-items: center; padding: 14px 25px; text-decoration: none; color: var(--text-color);
    font-weight: 700; font-size: 15px; transition: all 0.2s; position: relative; border-radius: 0 25px 25px 0; margin-right: 10px;
}
.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(255, 182, 193, 0.3) 0%, rgba(255,255,255,0) 100%);
    color: var(--deep-rose); padding-left: 35px;
}
.sidebar-link::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    height: 60%; width: 4px; background: var(--deep-rose); opacity: 0; transition: opacity 0.2s; border-radius: 0 4px 4px 0;
}
.sidebar-link:hover::before { opacity: 1; }
.sidebar-link .icon-box {
    width: 24px; font-size: 18px; margin-right: 15px; text-align: center; color: #bbb;
    transition: color 0.2s; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}
.sidebar-link:hover .icon-box { color: var(--deep-rose); }
.sidebar-footer { padding: 20px; text-align: center; font-size: 11px; color: #bbb; background: rgba(255,255,255,0.3); }

.youtube-color { color: #ff0000 !important; }
.twitch-color { color: #9146ff !important; }
.bilibili-color { color: #00a1d6 !important; }
.booth-color { color: #fc4d50 !important; }
.fanbox-color { color: #f2c94c !important; }
.present-color { color: #ffb6c1 !important; }
.profile-color { color: #ffa07a !important; }
.game-color { color: #87ceeb !important; }
.movie-color { color: #9b59b6 !important; }
.dev-color { color: #2ecc71 !important; }

/* ============================ */
/* コンテンツエリア & ページ */
/* ============================ */
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.page {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--background-light); display: none; flex-direction: column;
    opacity: 0; transition: opacity 0.3s ease-out;
}
.page.active { display: flex; opacity: 1; }

/* iframe表示用クラス */
.full-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 埋め込みゲーム用のコンテナ */
.game-embed-container {
    flex: 1;
    width: 100%;
    background-color: #d4f0dd;
    position: relative;
    overflow: hidden;
}
.game-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


/* ============================ */
/* プロフィールページ (Bento Grid) */
/* ============================ */
.profile-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding-bottom: 50px;
}
.bento-card {
    background: white; border-radius: 20px; padding: 20px;
    box-shadow: 0 4px 15px rgba(230, 46, 92, 0.08);
    display: flex; flex-direction: column; transition: transform 0.2s;
}
.bento-card:hover { transform: translateY(-3px); }
.card-large { grid-column: span 2; }
.prof-avatar-area { text-align: center; background: linear-gradient(135deg, #ffc0cb 0%, #ff7b8c 100%); color: white; }
.prof-avatar { width: 100px; height: 100px; border-radius: 50%; border: 4px solid white; object-fit: cover; margin-bottom: 10px; background: white; }
.prof-name { font-size: 24px; font-weight: 900; margin: 0; }
.prof-role { font-size: 12px; opacity: 0.9; font-weight: 600; }
.info-label { font-size: 11px; font-weight: 700; color: #aaa; margin-bottom: 5px; text-transform: uppercase; }
.info-value { font-size: 15px; font-weight: 700; color: var(--text-color); }
.tags-container { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #f0f2f5; color: var(--light-text-color); padding: 6px 12px; border-radius: 15px; font-size: 12px; font-weight: 700; }
.tag.love { background: #ffe4e8; color: var(--deep-rose); }
.bio-text { font-size: 13px; line-height: 1.6; color: var(--light-text-color); }

/* ============================ */
/* ナビゲーション */
/* ============================ */
.nav-bar {
    display: flex; justify-content: space-around; align-items: center;
    background-color: white; border-top: 1px solid var(--border-color);
    height: var(--nav-height); box-sizing: border-box; flex-shrink: 0; z-index: 100; position: relative;
    /* 下部のホームバー対策。コンテナ側のpadding-bottomで押し上げられるため、ここでは特にpadding不要 */
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--light-text-color); font-size: 11px; font-weight: 700; gap: 3px;
    cursor: pointer; transition: color 0.2s ease; flex: 1;
}
.nav-item i { font-size: 22px; }
.nav-item.active { color: var(--deep-rose); }
.nav-item.center { position: relative; top: -15px; width: 70px; height: 70px; flex: none; }
.nav-item.center .center-btn {
    width: 60px; height: 60px; background: var(--gradient-pink); border-radius: 50%;
    display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 4px solid white; box-sizing: border-box;
}
.nav-item.center img { width: 45px; height: 45px; object-fit: contain; }
.nav-item.center .center-label { position: absolute; bottom: 0px; font-size: 11px; color: var(--light-text-color); }
.nav-item.center.active .center-label { color: var(--deep-rose); }

/* Home & Others */
#page-home { position: relative; background-color: var(--primary-color); overflow: hidden; }
.video-bg-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
#room-bg { width: 110%; height: 100%; margin-left: -5%; object-fit: cover; }
.home-char-container {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 80%; max-width: 400px; height: 80%; display: flex; justify-content: center; align-items: flex-end;
    padding-bottom: var(--nav-height); box-sizing: border-box;
}
#home-nipo {
    max-height: 100%; width: auto; object-fit: contain; position: absolute; bottom: 0; right: -100px;
    transform: translateY(30%); animation: slideInFromBottom 1.2s forwards, gentleBreath 4s ease-in-out infinite 1.2s; transition: none;
}
@keyframes slideInFromBottom { 0% {transform: translateY(30%);} 100% {transform: translateY(0);} }
@keyframes gentleBreath {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(0) scale(1.005); }
}
.speech-bubble {
    position: absolute; top: 20%; left: 20%; transform: translateX(-50%) scale(0);
    padding: 8px 15px; background-color: white; border-radius: 20px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px; font-weight: 700; color: var(--text-color);
    /* 改行を有効にする */
    white-space: pre-wrap;
    max-width: 200px; /* 横幅の最大値を設定 */
    text-align: center; /* 中央揃え */
    line-height: 1.4; /* 行間を設定 */
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; transform-origin: bottom center; z-index: 10;
}
.speech-bubble.show { transform: translateX(-50%) scale(1); opacity: 1; }


/* ============================ */
/* 左下 常設SNSドック (修正完了版) */
/* ============================ */
.social-dock {
    position: absolute;
    left: 20px;
    /* 位置: 左下 (ナビバーの上に配置) */
    top: auto;
    bottom: 15px;

    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 20;
    pointer-events: none;
}

.dock-item {
    pointer-events: auto;
    position: relative;
    font-size: 17px;

    /* ▼ 通常時: 半透明ホワイト + 微妙な色味 */
    color: #ffffff;
    background: rgba(255, 182, 193, 0.25);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 182, 193, 0.35);

    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(255, 182, 193, 0.2);

    /* 初期状態: 透明 */
    opacity: 0;
    transform: translateX(-50px) scale(0.5);

    /* アニメーション: 登場 + 常時ふわふわ */
    animation:
        popInWave 0.1s cubic-bezier(0.34, 0.56, 0.24, 0.4) forwards,
        subtleFloat 6s ease-in-out infinite;

    transition: background 0.3s ease, color 0.3s ease; /* 色変化だけtransitionで滑らかに */
}

/* --- 登場順序のズレ & ふわふわのズレ --- */
.dock-item:nth-child(1) { animation-delay: 0.1s, 0.7s; }
.dock-item:nth-child(2) { animation-delay: 0.2s, 0.8s; }
.dock-item:nth-child(3) { animation-delay: 0.3s, 0.9s; }
.dock-item:nth-child(4) { animation-delay: 0.4s, 1.0s; }
.dock-item:nth-child(5) { animation-delay: 0.5s, 1.1s; }


/* --- ホバー時の挙動 (修正: 落ち着いたアニメーション) --- */
.dock-item:hover {
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);

    /* ふわふわアニメーションを維持したまま、少しだけ拡大 */
    transform: translateX(0) scale(1.1);
    z-index: 100;
    opacity: 1;
}

/* ▼ ホバー時のパステルカラー (背景色) */
.dock-item.twitter-x:hover { background: #6e7681; } 
.dock-item.twitter-comm:hover { background: #a2d2ff; } 
.dock-item.youtube:hover { background: #ffadad; }
.dock-item.twitch:hover { background: #cdb4db; }
.dock-item.bilibili:hover { background: #a0c4ff; }


/* --- ツールチップ (吹き出し) --- */
.dock-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 120%;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    background: var(--text-color);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    pointer-events: none;
}

.dock-item::before {
    content: '';
    position: absolute;
    left: 110%;
    top: 50%;
    transform: translateY(-50%) scale(0);
    border-width: 5px;
    border-style: solid;
    border-color: transparent var(--text-color) transparent transparent;
    opacity: 0;
    transition: all 0.2s ease;
}

.dock-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
    left: 135%;
}
.dock-item:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    left: 115%;
}

/* え？ */
  .custom-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 192, 203, 0.15);
    backdrop-filter: blur(8px); /* すりガラス効果を強めて後ろがもっと透ける */
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
  }

  /* 可愛い箱のデザイン (２分の１サイズ) */
  .custom-popup-box {
    background-color: #fff;
    border: 3px solid #ffb7c5;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 183, 197, 0.4);
    min-width: 140px;
    max-width: 50%;
    font-family: "Yu Gothic", "Meiryo", sans-serif;
  }

  /* アイコン */
  .popup-icon {
    font-size: 30px;
    margin-bottom: 8px;
    display: block;
    animation: bounce 1s infinite;
  }

  /* メッセージ */
  .popup-message {
    color: #ff8ea0;
    font-weight: bold;
    font-size: 11px;
    line-height: 1.6; /* 行間を読みやすく */
    margin-bottom: 15px;
  }

  /* 懺悔ボタン */
  .popup-btn {
    background-color: #ffb7c5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    outline: none;
  }

  .popup-btn:hover {
    background-color: #ff9eb0;
    transform: translateY(-2px);
  }

  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
/* ============================ */

/* --- アニメーション定義 --- */

@keyframes popInWave {
    0% { opacity: 0; transform: translateX(-50px) scale(0.5); }
    80% { transform: translateX(5px) scale(1.1); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes subtleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* スマホ調整 */
@media (max-width: 480px) {
    .social-dock {
        left: 10px;
        bottom: 100px;
        gap: 10px;
    }
    .dock-item {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .dock-item::after, .dock-item::before {
        display: none;
    }
}

/* ============================ */
/* 外部リンク確認ポップアップ (若者向けおしゃれデザイン) */
/* ============================ */
.link-confirm-content {
    max-width: 340px;
    text-align: center;
    padding: 30px 25px;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border: 2px solid var(--primary-color);
    box-shadow: 0 15px 50px rgba(230, 46, 92, 0.3);
}

.modal-title-text {
    color: var(--deep-rose);
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 15px;
    letter-spacing: 3px; /* ୨୧を小さくしてスペースを開ける */
    text-shadow: 0 2px 4px rgba(230, 46, 92, 0.1);
}

.modal-detail-text {
    font-size: 12px;
    color: var(--light-text-color);
    line-height: 1.6;
    margin-bottom: 25px;
    word-break: break-all;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(230, 46, 92, 0.1);
}

/* ============================ */
/* 工事中ページ (スマホアプリ風) */
/* ============================ */
#page-construction {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%);
    overflow: hidden;
}

.construction-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.construction-icon-animation {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.construction-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--deep-rose);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.1);
}

.construction-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    opacity: 0.7;
}

.construction-message {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 25px;
    opacity: 0.8;
}

.construction-nipo-message {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulseConstruction {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .construction-icon-animation {
        font-size: 60px;
    }

    .construction-title {
        font-size: 26px;
    }

    .construction-subtitle {
        font-size: 14px;
    }

    .construction-message {
        font-size: 13px;
    }

    .construction-nipo-message {
        font-size: 14px;
        padding: 12px 25px;
    }
}

/* ============================ */
/* ギフトタブの切り替え用スタイル */
/* ============================ */
.gift-content {
    display: none !important; /* 基本は非表示にする */
    width: 100%;
    height: 100%;
}

.gift-content.active {
    display: block !important; /* activeクラスがついている時だけ表示 */
}

/* ============================ */
/* 名前入力モーダル (Lv3イベント) */
/* ============================ */
.name-input-content {
    max-width: 380px;
    text-align: center;
    padding: 35px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border: 2px solid var(--primary-color);
    box-shadow: 0 20px 60px rgba(230, 46, 92, 0.25);
}

.name-input-field {
    width: 100%;
    max-width: 300px;
    padding: 14px 18px;
    margin: 20px 0 25px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    background: white;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', 'M PLUS Rounded 1c', sans-serif;
}

.name-input-field::placeholder {
    color: rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.name-input-field:focus {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
    transform: scale(1.02);
}

@media (max-width: 480px) {
    .name-input-content {
        max-width: 90%;
        padding: 30px 20px;
    }

    .name-input-field {
        max-width: 100%;
        font-size: 14px;
    }
}

