/* =========================================
   1. 基本設定（メインと共通）
   ========================================= */
:root {
    --bg-white: #f8fafc;
    --brand-pink: #f10ae6;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-white);
    font-family: sans-serif;
}

/* =========================================
   2. ヘッダー：インスタ風グラデーション（1行維持版）
   ========================================= */
.insta-profile-header {
    background: linear-gradient(135deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
    padding: 10px 15px; /* 左右に少し余裕を持たせる */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    box-sizing: border-box;
}

.back-arrow {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 2.5rem;
    text-decoration: none;
    padding: 10px;
    z-index: 10;
}

.title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 70%; /* 戻る矢印と重ならないように制限 */
    text-align: center;
}

.site-title {
    color: #fff;
    /* 🚀 画面幅に応じて 1.0rem 〜 1.4rem の間で変動 */
    font-size: clamp(1.0rem, 5vw, 1.4rem); 
    font-weight: 900;
    margin: 0;
    white-space: nowrap;  /* 絶対に折り返さない */
    overflow: hidden;     /* 万が一の突き抜け防止 */
    text-overflow: ellipsis; /* それでも入らない場合は最後を「...」にする */
    width: 100%;
}

.subtitle {
    /* 🚀 画面幅に応じて 0.65rem 〜 0.8rem の間で変動 */
    font-size: clamp(0.65rem, 3.5vw, 0.8rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    white-space: nowrap;  /* 絶対に折り返さない */
    width: 100%;
}

/* =========================================
   3. 孫専用：1列縦並びカード（リスト形式）
   ========================================= */
.category-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.card-v {
    background: #ffffff;
    border: 2px solid #858383;
    border-radius: 15px;
    min-height: 75px; /* 少し高さを抑えてシュッとさせました */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px; /* 左右の余白を少し詰め、文字幅を確保 */
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-v:active {
    transform: scale(0.98);
    background-color: #fdf2f8; 
    border-color: var(--brand-pink); 
}

/* 左側のメイン文字：1行で粘る設定 */
.card-v-title {
    color: var(--brand-pink);
    font-weight: 800;
    /* 🚀 フォントサイズを少し可変にし、はみ出しにくくしました */
    font-size: clamp(0.95rem, 4vw, 1.1rem); 
    
    flex: 2;                   /* 説明文より広めのスペースを確保 */
    white-space: nowrap;       /* 基本は「改行しない」で粘る */
    
    /* 🚀 もし1行に収まりきらない場合だけ、はみ出さずに「...」にするか改行させる */
    /* もし「...」ではなく「改行」が良ければ white-space: normal に戻してください */
    /* 今回はスッキリさせるため、1行を優先します */
    overflow: hidden;
    text-overflow: ellipsis; 
}

/* 右側の解説文字：1行固定で右寄せを完璧にする */
.card-v-description {
    color: #666;
    font-size: 0.75rem;
    text-align: right;    /* 文字を右端に */
    
    flex: 1;              /* 左側のタイトルが使い終わった残りの幅をすべて埋める */
    padding-left: 10px;
    
    /* 🚀 2行制限をやめて、1行で「...」にする設定 */
    white-space: nowrap;  /* 改行させない */
    overflow: hidden;     /* はみ出た分を隠す */
    text-overflow: ellipsis; /* はみ出た分を「...」にする */
}


/* =========================================
   全ページ共通：フッター統一デザイン
   ========================================= */
.mago-footer-nav {
    margin-top: 50px;
    padding: 60px 15px 40px; /* 上部余白を多めにとり、コンテンツと分離 */
    background-color: #fff;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* 📢 広告エリア：ad-gen.js が中身を流し込む場所 */
.footer-ad-space {
    width: 100%;
    max-width: 728px;
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 内部の広告ユニットデザイン */
.ad-container {
    width: 100%;
    text-align: center;
}

.ad-label {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-bottom: 5px;
    display: block;
    letter-spacing: 0.1em;
}

.ad-unit {
    width: 100%;
    min-height: 100px;
    background: #f8fafc; /* 背景を少しだけグレーにして「枠」を意識 */
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 🔗 法的リンク集（免責事項など） */
.footer-links {
    margin: 25px 0 15px;
    font-size: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.footer-links a {
    color: #64748b; /* 視認性の良いグレー */
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #f10ae6; /* ホバー時はブランドカラーのピンク */
}

.footer-separator {
    color: #e2e8f0;
    margin: 0; /* flexのgapを使うためセパレーター自体は非表示または幅0を推奨 */
}

/* © コピーライト */
.copyright {
    color: #cbd5e1;
    font-size: 0.7rem;
    margin-top: 15px;
    display: block;
    letter-spacing: 0.05em;
}