/**
 * 夢占い機能スタイル
 * - トップページ「夢占いで調べる」セクション
 * - 夢占い一覧ページ
 * - 夢占い詳細ページ
 */

/* ============================================================
   共通トークン
   ============================================================ */
.dream-page,
.dream-detail-page {
    padding: 2.5rem 0 4rem;
}

.dream-loading,
.dream-no-data {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 1rem;
}

.dream-error {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--gold);
}

/* ============================================================
   トップページ「夢占いで調べる」セクション
   ============================================================ */
.dream-top-section {
    position: relative;
    padding: 3rem 0 3.5rem;
    /* 月夜バナーに合わせたラベンダー×ピンクの神秘的な背景 */
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 251, 242, 0.4) 0%, rgba(255, 251, 242, 0) 42%),
        linear-gradient(135deg, #f5f0fa 0%, #f7edf5 45%, #f1eef9 100%);
    overflow: hidden;
}
/* 星のきらめき（ごく控えめ） */
.dream-top-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 30%, rgba(255, 255, 255, 0.55) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 22% 68%, rgba(255, 255, 255, 0.4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 68% 18%, rgba(255, 255, 255, 0.45) 50%, transparent 51%),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 45% 12%, rgba(255, 255, 255, 0.35) 50%, transparent 51%);
    pointer-events: none;
}
.dream-top-section .container {
    position: relative;
    z-index: 1;
    text-align: center;
}
.dream-top-section h2 {
    margin-bottom: 0.5rem;
    color: #6a5a8c;
}
.dream-top-section .dream-top-lead {
    color: #7d6f99;
}
.dream-top-lead {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* 左（検索＋人気ワード）／右（バナー）の2カラム */
.dream-top-layout {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}
.dream-top-main {
    flex: 1 1 0;
    min-width: 0;
}
.dream-top-layout .dream-banner-link {
    flex: 0 0 46%;
    max-width: 46%;
    margin: 0;
}

/* トップの検索フォーム */
.dream-top-search {
    display: flex;
    margin: 0 0 1.5rem;
    gap: 0.5rem;
}
.dream-top-search .dream-search-input {
    flex: 1;
}

/* 人気ワードタグ */
.dream-popular-wrap {
    margin: 0;
}
.dream-popular-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}
.dream-popular-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
}

/* 夢占いバナー */
.dream-banner-link {
    display: block;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(120, 100, 160, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dream-banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(120, 100, 160, 0.28);
}
.dream-banner-link img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================================
   検索ボックス（一覧ページ・トップ共通の入力/ボタン）
   ============================================================ */
.dream-search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}
.dream-search-input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    border: 1px solid var(--dusty-lavender);
    border-radius: 999px;
    background: var(--white);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dream-search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.dream-search-btn {
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    white-space: nowrap;
    color: var(--white);
    background: linear-gradient(135deg, #b7a3d6, #d5b8e0);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.dream-search-btn:hover {
    opacity: 0.9;
}

/* ============================================================
   一覧ページ
   ============================================================ */
.dream-page-header {
    text-align: center;
    margin-bottom: 2rem;
}
.dream-page-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}
.dream-page-lead {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

.dream-section-heading {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin: 0 0 1.25rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--gold);
}

/* 検索結果 */
.dream-search-result {
    margin-bottom: 3rem;
}
.dream-result-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.dream-result-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.dream-result-card:hover {
    border-color: var(--dusty-lavender);
    box-shadow: 0 4px 14px rgba(120, 100, 160, 0.15);
    transform: translateY(-2px);
}
.dream-result-keyword {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}
.dream-result-meaning {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* 五十音ナビ */
.dream-kana-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.dream-kana-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--dusty-lavender);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.dream-kana-btn:hover:not(.disabled) {
    background: var(--dusty-lavender);
}
.dream-kana-btn.disabled {
    color: var(--border-light);
    border-color: var(--border-light);
    cursor: default;
}

/* 五十音グループ */
.dream-kana-group {
    margin-bottom: 2rem;
    scroll-margin-top: 90px;
}
.dream-kana-heading {
    font-size: 1.1rem;
    color: var(--gold);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.dream-keyword-tags,
.dream-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* キーワードタグ（一覧・人気・関連 共通の見た目） */
.dream-keyword-tag,
.dream-popular-tags .dream-keyword-tag,
.dream-related-tag {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 1px solid var(--dusty-lavender);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.dream-keyword-tag:hover,
.dream-related-tag:hover {
    background: linear-gradient(135deg, #e8d5e5, #d5d5e8);
    color: var(--text-dark);
    transform: translateY(-1px);
}

/* ============================================================
   詳細ページ
   ============================================================ */
.dream-detail-article {
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 18px rgba(120, 100, 160, 0.1);
}
.dream-detail-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}
.dream-detail-reading {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}
.dream-detail-title {
    font-size: 2rem;
    color: var(--text-dark);
}
.dream-detail-block {
    margin-bottom: 2rem;
}
.dream-detail-block-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.85rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--gold);
}
.dream-detail-meaning,
.dream-detail-description {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-dark);
    /* 管理画面で入力した改行をそのまま表示（連続空白は詰める） */
    white-space: pre-line;
}
.dream-back-to-list {
    text-align: center;
    margin-top: 2.5rem;
}
.dream-back-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}
.dream-back-link:hover {
    color: var(--gold);
}

/* ============================================================
   レスポンシブ
   ============================================================ */
/* タブレット以下：2カラムを縦積みに */
@media (max-width: 820px) {
    .dream-top-layout {
        flex-direction: column;
        text-align: center;
    }
    .dream-top-layout .dream-banner-link {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
        margin-top: 1.5rem;
    }
    .dream-popular-tags {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .dream-search-form,
    .dream-top-search {
        flex-direction: column;
    }
    .dream-search-btn {
        width: 100%;
    }
    .dream-detail-article {
        padding: 1.5rem;
    }
    .dream-detail-title {
        font-size: 1.6rem;
    }
    .dream-kana-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
