/* ==========================================================================
   変数定義 (カラーパレット) - LUNA HOROSCOPE
   夜空 × 月光ゴールド × 銀光 × 神秘的な紫
   ========================================================================== */
:root {
    /* === 夜空・背景レイヤー === */
    --bg-color: #0b1124;            /* 夜空の最も深い藍 */
    --bg-deep: #050813;             /* 最深部（影） */
    --bg-elevated: #1b1f3a;         /* 紫がかった藍（カード背景） */
    --bg-surface: rgba(27, 31, 58, 0.85);  /* 半透明サーフェス */

    /* === テキスト系（月光） === */
    --text-color: #e8e0ff;          /* 月光のような淡い白紫 */
    --text-soft: #b8c5e0;           /* 銀光（補助テキスト） */
    --text-muted: rgba(184, 197, 224, 0.55);

    /* === ゴールド・アクセント（月光） === */
    --primary-color: #c5a773;       /* 月光ゴールド（メイン） */
    --primary-light: #e0c89a;       /* 明るいゴールド */
    --primary-deep: #9a8358;        /* 深いゴールド */
    --primary-glow: rgba(197, 167, 115, 0.4);

    /* === 紫アクセント（神秘） === */
    --accent-violet: #7c6fb8;       /* 薄紫（夜の境界） */
    --accent-mystical: #5040a0;     /* 神秘的な紫 */
    --accent-glow: rgba(124, 111, 184, 0.3);

    /* === カード・要素背景 === */
    --card-bg: #1b1f3a;
    --card-border: rgba(197, 167, 115, 0.25);

    /* === 月光白 === */
    --moon-white: #f4e9d3;
    --moon-glow: rgba(244, 233, 211, 0.15);
}

/* (基本設定と背景は変更なし) */
body {
    font-family: 'Noto Serif JP', 'Cormorant Garamond', 'Hiragino Mincho ProN', 'Yu Mincho', 'Meiryo', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0; padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.7;
}
.site-root { flex: 1; display: flex; flex-direction: column; min-height: 100vh; position: relative; }
.site-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; width: 100%; box-sizing: border-box; padding-top: 70px; }
.video-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.video-background video { width: 100%; height: 100%; object-fit: cover; }
#realtime-moon-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 0; pointer-events: none; }
#realtime-moon-image { filter: drop-shadow(0 0 20px rgba(255, 255, 220, 0.6)); opacity: 0; transition: opacity 1.5s ease-in-out; }
#realtime-moon-image.visible { opacity: 1; }

/* (アプリケーションコンテナとヘッダーは変更なし) */
.app-container { width: 100%; max-width: 900px; text-align: center; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 20px; }
.app-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(13, 26, 38, 0.8); border-radius: 15px; box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); z-index: -1; }
header { width: 100%; }
header h1 { margin: 0 0 0px 0; padding: 0; line-height: 1; }
#title-logo { max-width: 80%; height: auto; }
#header-info { transition: opacity 0.5s, height 0.5s, margin 0.5s; overflow: hidden; }
#header-info.hidden-by-js { opacity: 0; height: 0; margin: 0; }
#catchphrase { font-size: 17.6px; color: var(--text-color); line-height: 1.6; max-width: 500px; margin: 0 auto 20px; padding: 15px; }
#current-date { font-size: 1.1em; color: var(--text-color); margin: 0 0 5px 0; font-weight: bold; }
#header-moon-description { font-size: 1em; color: var(--text-color); margin: 0; padding: 0 20px; min-height: 1.2em; transition: opacity 0.5s; }

/* (テーマ選択は変更なし) */
#theme-selection { width: 100%; margin-top: 20px; margin-bottom: 20px; }
#theme-selection h2 { font-size: 1.2em; color: var(--primary-color); margin-bottom: 15px; font-weight: 600; }
.theme-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.theme-btn { padding: 10px 24px; font-size: 1.1em; font-weight: bold; border: 2px solid var(--primary-color); background-color: transparent; color: var(--primary-color); border-radius: 50px; cursor: pointer; transition: all 0.3s ease; }
.theme-btn:hover { background-color: var(--primary-color); color: var(--bg-color); }
.theme-btn.active { background-color: var(--primary-color); color: var(--bg-color); box-shadow: 0 0 15px rgba(197, 167, 115, 0.5); }

/* (カード関連は変更なし) */
#card-container { margin-top: 20px; perspective: 1000px; position: relative; min-height: 250px; width: 100%; transition: height 0.5s ease-in-out; }
.card { width: 80px; aspect-ratio: 11 / 19; transform-style: preserve-3d; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: transform 0.6s, box-shadow 0.3s, top 0.5s ease-out, left 0.5s ease-out, opacity 0.5s; }
.app-container[data-state='initial'] .card,
.app-container[data-state='shuffling'] .card { cursor: default; }
.app-container[data-state='ready'] .card { cursor: pointer; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; border: 1px solid #6f614c; border-radius: 8px; background-color: var(--card-bg); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; background-size: cover; background-position: center; border-radius: 6px; }
.card-back { background-color: #0d1433; }
.card-front { transform: rotateY(180deg); }
.card.shuffled-spread:hover { transform: translateY(-10px) scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.4); z-index: 100; }
.card.shuffling { box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

/* ▼▼▼ コントロールボタンと案内文のスタイルを修正 ▼▼▼ */
#controls { margin-top: 20px; overflow: auto; padding-top: 5px; }
#controls button, #result-area button { font-size: 1.2em; font-weight: bold; color: var(--bg-color); text-shadow: 0 1px 1px rgba(255,255,255,0.3); padding: 12px 28px; border: none; border-radius: 50px; cursor: pointer; background: var(--primary-color); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; }
#controls button:hover, #result-area button:hover { background: #d4b88a; transform: translateY(-3px); box-shadow: 0 7px 20px rgba(197, 167, 115, 0.3); }
#controls button:active, #result-area button:active { transform: translateY(1px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); transition: all 0.1s ease; }

/* ★★★ 新しいボタン表示制御ルール ★★★ */
#stopButton { display: none; }
/* 'shuffling'状態の時だけ、シャッフルボタンを隠し、ストップボタンを表示する */
.app-container[data-state='shuffling'] #shuffleButton { display: none; }
.app-container[data-state='shuffling'] #stopButton { display: inline-block; }

#guide-message { font-size: 1.2em; font-weight: bold; color: var(--text-color); min-height: 1.5em; transition: opacity 0.5s, height 0.5s, margin 0.5s, padding 0.5s; }
#guide-message.hidden-by-js { opacity: 0; height: 0; margin: 0; padding: 0; border: none; overflow: hidden; }

/* (結果表示エリアは変更なし) */
#result-area { margin-top: 20px; padding: 20px; width: 100%; }
.result-content { display: flex; flex-direction: column; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; margin-bottom: 20px; }
.result-card img { width: 120px; height: 210px; border-radius: 8px; border: 3px solid var(--text-color); }
.result-details { text-align: center; max-width: 450px; }
.moon-info { display: flex; align-items: center; justify-content: center; gap: 15px; }
#moon-image { width: 50px; height: 50px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; object-fit: cover; }
.moon-info > div { display: flex; flex-direction: column; align-items: flex-start; }
#moon-description { font-size: 0.9em; color: var(--text-color); margin: 0; }
#result-text { text-align: left; background-color: rgba(0, 0, 0, 0.2); padding: 20px 25px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); margin-top: 20px; }
#result-text h3 { color: var(--primary-color); text-align: center; margin-top: 0; margin-bottom: 20px; font-size: 1.4em; line-height: 1.4; }
#result-text h4 { display: inline-block; width: 100%; margin-top: 25px; margin-bottom: 10px; border-bottom: 1px solid rgba(197, 167, 115, 0.3); padding-bottom: 8px; font-size: 1.15em; color: var(--text-color); }
#result-text p { line-height: 1.8; margin: 0 0 1em 0; white-space: pre-wrap; }
#result-text ul { list-style: none; padding-left: 0; margin-top: 0; }
#result-text li { margin-bottom: 10px; padding-left: 1.8em; text-indent: -1.8em; line-height: 1.6; }
#result-text li::before { content: '❤'; color: var(--primary-color); margin-right: 0.7em; font-size: 1.1em; }
.wellness-item { margin-bottom: 15px; padding-left: 10px; border-left: 3px solid rgba(197, 167, 115, 0.5); }
.wellness-item strong { font-size: 1.05em; color: var(--text-color); }
.wellness-item p { font-size: 0.9em; color: #b0b0b0; margin-top: 5px; }
#result-text .lucky-info { margin-top: 25px; padding-top: 15px; border-top: 1px dashed rgba(255, 255, 255, 0.2); }
#result-text .lucky-info p { margin: 0.5em 0; line-height: 1.6; }
.hidden { display: none !important; }

/* ----- サイトフッター ----- */
.site-footer {
    width: 100%;
    margin-top: auto;
    padding: 1.25rem 1rem 1.5rem;
    background: rgba(13, 26, 38, 0.42);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    z-index: 2;
}
.site-footer__inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.site-footer__nav-rows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}
.site-footer__row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1.1rem;
    font-size: 0.85rem;
}
.site-footer__nav a {
    color: rgba(200, 210, 220, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}
.site-footer__nav a:hover {
    color: rgba(210, 218, 228, 1);
}
.site-footer__copyright-line {
    margin: 0.35rem 0 0;
    padding: 0;
    font-size: 0.72rem;
    color: rgba(180, 190, 200, 0.35);
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

/* ----- 情報ページ（about / contact 等） ----- */
body.subpage-body {
    background: var(--bg-color);
}
.subpage-body .site-root {
    min-height: 100vh;
}
.subpage-body .site-main {
    justify-content: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.subpage-header {
    width: 100%;
    max-width: 720px;
    text-align: center;
    margin-bottom: 1.5rem;
}
.subpage-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color);
}
.subpage-header .subpage-back {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}
.subpage-header .subpage-back:hover {
    color: #d4b88a;
}
.subpage-content {
    width: 100%;
    max-width: 720px;
    text-align: left;
    line-height: 1.85;
    font-size: 0.95rem;
    color: var(--text-color);
}
.subpage-content h2 {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin: 1.75rem 0 0.65rem;
    font-weight: 600;
}
.subpage-content h2:first-child {
    margin-top: 0;
}
.subpage-content p {
    margin: 0 0 1em;
}
.subpage-content ul {
    margin: 0 0 1em;
    padding-left: 1.35em;
}
.subpage-content a {
    color: var(--primary-color);
}
.subpage-content .subpage-updated {
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.5);
    margin-top: 2rem;
}

/* ページ末尾の「トップへ戻る」ボタン */
.subpage-back-bottom {
    text-align: center;
    margin: 2.5rem 0 1rem;
}
.subpage-back-bottom .subpage-back {
    display: inline-block;
    padding: 10px 28px;
    background: rgba(197, 167, 115, 0.08);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s ease;
}
.subpage-back-bottom .subpage-back:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 16px rgba(197, 167, 115, 0.4);
    transform: translateY(-1px);
}

/* ----- コンタクトフォーム ----- */
.contact-form {
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.contact-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.contact-form__group label {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}
.contact-form__required {
    display: inline-block;
    font-size: 0.7rem;
    background: var(--primary-color);
    color: var(--bg-color);
    border-radius: 3px;
    padding: 0 0.35em;
    margin-left: 0.4em;
    vertical-align: middle;
    font-weight: 700;
}
.contact-form__group input,
.contact-form__group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 167, 115, 0.35);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 0.65em 0.9em;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: vertical;
}
.contact-form__group input::placeholder,
.contact-form__group textarea::placeholder {
    color: rgba(224, 224, 224, 0.3);
}
.contact-form__group input:focus,
.contact-form__group textarea:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}
.contact-form__submit {
    align-self: flex-start;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    padding: 0.7em 2em;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}
.contact-form__submit:hover {
    background: #d4b88a;
    transform: translateY(-2px);
}
.contact-form__submit:active {
    transform: translateY(0);
}

/* Language switcher */
.lang-switcher {
    text-align: right;
    padding: 6px 10px 0;
}
.lang-switcher a {
    font-size: 0.8em;
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.lang-switcher a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================================================
   LUNA HOROSCOPE スタイル（リブランド追加）
   ========================================================================== */

/* タイトル */
.luna-title {
    text-align: center;
    margin: 0 0 12px;
    line-height: 1.1;
}
.luna-title__main {
    display: block;
    font-family: 'Cinzel', 'Cormorant Garamond', serif;
    font-size: 2.8em;
    font-weight: 400;
    letter-spacing: 0.35em;
    color: var(--primary-color);
    text-shadow: 0 0 24px var(--primary-glow),
                 0 0 60px rgba(197, 167, 115, 0.18);
}
.luna-title__sub {
    display: block;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85em;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--text-soft);
    margin-top: 10px;
}
#catchphrase {
    font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
    font-size: 1.1em;
    font-weight: 300;
    color: var(--moon-white);
    font-style: italic;
    letter-spacing: 0.06em;
    margin: 18px auto 10px;
    padding: 0 16px;
    opacity: 0.92;
}

/* ステップコンテナ */
.luna-step {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}
.step-title {
    color: var(--primary-color);
    text-align: center;
    font-size: 1.25em;
    font-weight: 600;
    margin: 8px 0 20px;
    letter-spacing: 0.05em;
}
.step-guide {
    color: var(--text-color);
    text-align: center;
    opacity: 0.85;
    margin: 0 0 20px;
}

/* フォームラベル */
.form-label {
    display: block;
    color: var(--primary-color);
    font-size: 0.95em;
    font-weight: 600;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}
.form-label__hint {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.8em;
    color: rgba(224, 224, 224, 0.6);
    font-weight: normal;
}
.form-label__required {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #e8a48a;  /* やわらかな朱：必須を主張しすぎず気品ある赤系 */
    background: rgba(232, 164, 138, 0.10);
    border: 1px solid rgba(232, 164, 138, 0.35);
    border-radius: 12px;
    vertical-align: middle;
}

/* カテゴリ選択（6ボタン） */
.category-selection {
    margin-bottom: 24px;
    text-align: center;
}
.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
}
.category-btn {
    padding: 11px 8px;
    font-size: 0.95em;
    font-weight: 600;
    border: 1.5px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.category-btn:hover {
    background-color: rgba(197, 167, 115, 0.15);
    transform: translateY(-1px);
}
.category-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 16px rgba(197, 167, 115, 0.5);
}

/* 悩み入力 */
.worry-input-area {
    margin-bottom: 24px;
}
#worry-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 167, 115, 0.4);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 0.95em;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#worry-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}
#worry-input::placeholder {
    color: rgba(224, 224, 224, 0.4);
    font-size: 0.9em;
}

/* 悩み文字数カウンター */
.worry-counter {
    margin-top: 6px;
    text-align: right;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85em;
    letter-spacing: 0.08em;
    color: rgba(224, 224, 224, 0.4);
    transition: color 0.3s ease;
}
.worry-counter--warn {
    color: var(--primary-color);  /* 月光ゴールド：上限が近い */
}
.worry-counter--max {
    color: #d88a8a;  /* やわらかな赤：上限到達 */
    font-weight: 500;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}
.luna-button {
    padding: 13px 30px;
    font-size: 1.05em;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    letter-spacing: 0.05em;
}
.luna-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.luna-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.luna-button--primary {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 4px 14px rgba(197, 167, 115, 0.3);
}
.luna-button--primary:hover:not(:disabled) {
    background: #d4b88a;
    box-shadow: 0 6px 20px rgba(197, 167, 115, 0.5);
}
.luna-button--gold {
    background: linear-gradient(135deg, #c5a773 0%, #e0c89a 100%);
    color: var(--bg-color);
    box-shadow: 0 4px 14px rgba(197, 167, 115, 0.4);
}
.luna-button--gold:hover:not(:disabled) {
    background: linear-gradient(135deg, #d4b88a 0%, #ebd5af 100%);
    box-shadow: 0 6px 20px rgba(197, 167, 115, 0.6);
}

/* セクションラベル（タロット / ホロスコープ の区切り） */
.reading-section-label {
    display: flex;
    align-items: center;
    margin: 36px 0 14px;
}
.reading-section-label::before,
.reading-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right,
                                transparent,
                                rgba(197, 167, 115, 0.5),
                                transparent);
}
.reading-section-label__text {
    padding: 0 18px;
    font-family: 'Cinzel', 'Noto Serif JP', serif;
    font-size: 0.92em;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--primary-color);
    white-space: nowrap;
}

/* 3枚引きアップグレードCTA */
.upgrade-cta {
    margin-top: 30px;
    padding: 22px 20px;
    background: linear-gradient(135deg, rgba(197, 167, 115, 0.08), rgba(197, 167, 115, 0.02));
    border: 1px solid rgba(197, 167, 115, 0.3);
    border-radius: 14px;
    text-align: center;
}
.upgrade-cta__title {
    color: var(--primary-color);
    font-size: 1.05em;
    font-weight: 600;
    margin: 0 0 8px;
}
.upgrade-cta__desc {
    color: var(--text-color);
    font-size: 0.92em;
    opacity: 0.85;
    line-height: 1.7;
    margin: 0 0 16px;
}
.upgrade-cta__note {
    color: rgba(224, 224, 224, 0.55);
    font-size: 0.78em;
    margin: 10px 0 0;
}

/* Coming Soon バリアント（Ver.2 ホロスコープ等） */
.upgrade-cta--coming-soon {
    position: relative;
    margin-top: 18px;
    background: linear-gradient(135deg, rgba(124, 111, 184, 0.10), rgba(124, 111, 184, 0.02));
    border-color: rgba(124, 111, 184, 0.35);
    opacity: 0.82;
}
.upgrade-cta--coming-soon .upgrade-cta__title {
    color: var(--accent-violet);
}
.upgrade-cta--coming-soon .luna-button {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.4);
    pointer-events: none;
}
.coming-soon-badge {
    display: inline-block;
    padding: 3px 12px;
    margin: 0 0 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.7em;
    letter-spacing: 0.2em;
    color: var(--accent-violet);
    background: rgba(124, 111, 184, 0.12);
    border: 1px solid rgba(124, 111, 184, 0.4);
    border-radius: 20px;
    text-transform: uppercase;
}

/* ローディング */
.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 40px auto 20px;
    border: 3px solid rgba(197, 167, 115, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: luna-spin 1s linear infinite;
}
@keyframes luna-spin {
    to { transform: rotate(360deg); }
}
.loading-text {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.05em;
    letter-spacing: 0.08em;
}

/* 結果表示（リブランド版） */
.result-card-display {
    text-align: center;
    margin-bottom: 20px;
}
.result-card-display img {
    width: 140px;
    aspect-ratio: 11 / 19;  /* 実カードと同じ伝統的タロット比率 */
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5),
                0 0 24px rgba(197, 167, 115, 0.25);
    object-fit: cover;
}
.result-card-display p {
    margin: 12px 0 0;
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.08em;
}
#result-reading {
    margin-top: 24px;
    padding: 24px 22px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(197, 167, 115, 0.2);
    border-radius: 12px;
    line-height: 1.95;
    color: var(--text-color);
}
#result-reading .reading-title {
    color: var(--primary-color);
    text-align: center;
    margin: 0 0 18px;
    font-size: 1.3em;
    line-height: 1.5;
    font-weight: 600;
}
#result-reading .reading-body {
    font-size: 1em;
    line-height: 1.95;
    text-align: left;
}
.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

/* エラー */
.error-message {
    color: #ff9999;
    text-align: center;
    padding: 24px 16px;
    font-size: 1em;
    line-height: 1.7;
}

/* シャッフル画面：入力内容の確認表示 */
.reading-context {
    text-align: center;
    margin: 0 auto 24px;
    padding: 16px 22px;
    max-width: 540px;
    background: linear-gradient(135deg, rgba(197, 167, 115, 0.06), rgba(124, 111, 184, 0.04));
    border: 1px solid var(--card-border);
    border-radius: 12px;
}
.reading-context__category {
    display: inline-block;
    padding: 4px 16px;
    background: var(--primary-color);
    color: var(--bg-color);
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.reading-context__worry {
    color: var(--text-color);
    margin: 0;
    font-size: 1em;
    line-height: 1.85;
    font-family: 'Noto Serif JP', serif;
}

/* 生年月日入力エリア（折りたたみ） */
.birth-info-area {
    margin: 0 0 24px;
    padding: 14px 18px;
    background: rgba(197, 167, 115, 0.05);
    border: 1px dashed rgba(197, 167, 115, 0.3);
    border-radius: 12px;
}
.birth-info-area[open] {
    background: rgba(197, 167, 115, 0.08);
    border-style: solid;
}
.birth-info-summary {
    cursor: pointer;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    color: var(--primary-color);
    font-size: 0.95em;
    user-select: none;
}
.birth-info-summary::-webkit-details-marker { display: none; }
.birth-info-summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.2s;
}
.birth-info-area[open] .birth-info-summary::before {
    content: '▾ ';
}
.birth-info-body {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(197, 167, 115, 0.2);
}
.birth-row {
    margin-bottom: 14px;
}
.birth-label {
    display: block;
    color: var(--text-color);
    font-size: 0.9em;
    margin-bottom: 6px;
}
.birth-date-inputs,
.birth-time-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.birth-date-inputs input,
.birth-time-inputs input {
    width: 70px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 167, 115, 0.4);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.95em;
    text-align: center;
}
.birth-date-inputs input:focus,
.birth-time-inputs input:focus {
    outline: none;
    border-color: var(--primary-color);
}
.birth-date-inputs span,
.birth-time-inputs span {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.9em;
}
.birth-note {
    margin: 12px 0 0;
    font-size: 0.8em;
    color: rgba(224, 224, 224, 0.55);
    line-height: 1.6;
}

/* 生年月日のエラーメッセージ */
.birth-date-error {
    margin: 10px 0 0;
    padding: 8px 12px;
    font-size: 0.85em;
    color: #ffb4b4;
    background: rgba(180, 60, 60, 0.18);
    border-left: 3px solid rgba(255, 120, 120, 0.7);
    border-radius: 4px;
    line-height: 1.5;
}
.birth-date-error.hidden {
    display: none;
}

/* Cookie 通知バナー（初回訪問時のみ画面下部に表示） */
.cookie-notice {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(110%);
    width: 100%;
    max-width: 880px;
    padding: 0 12px 12px;
    box-sizing: border-box;
    z-index: 9999;
    transition: transform 0.45s cubic-bezier(.4, .2, .3, 1);
    pointer-events: none;
}
.cookie-notice--visible {
    transform: translateX(-50%) translateY(0);
}
.cookie-notice--closing {
    transform: translateX(-50%) translateY(110%);
    opacity: 0.6;
}
.cookie-notice__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(13, 26, 38, 0.96);
    border: 1px solid rgba(197, 167, 115, 0.4);
    border-radius: 14px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5),
                0 0 24px rgba(197, 167, 115, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}
.cookie-notice__text {
    margin: 0;
    flex: 1;
    color: var(--text-color);
    font-size: 0.82em;
    line-height: 1.7;
    letter-spacing: 0.02em;
}
.cookie-notice__link {
    margin-left: 4px;
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-notice__link:hover {
    color: #e2c995;
}
.cookie-notice__close {
    flex-shrink: 0;
    padding: 8px 20px;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.cookie-notice__close:hover {
    box-shadow: 0 0 14px rgba(197, 167, 115, 0.5);
    transform: translateY(-1px);
}
@media (max-width: 640px) {
    .cookie-notice__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }
    .cookie-notice__text {
        font-size: 0.78em;
    }
    .cookie-notice__close {
        width: 100%;
    }
}

/* プライバシー安心ガイド（生年月日入力欄下） */
.birth-privacy-note {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: rgba(124, 111, 184, 0.08);  /* 薄紫の安心トーン */
    border-left: 2px solid var(--accent-violet);
    border-radius: 6px;
    font-size: 0.8em;
    color: rgba(224, 224, 224, 0.78);
    line-height: 1.65;
    letter-spacing: 0.02em;
}

/* 月星座バッジ（結果画面） */
.moon-sign-badge {
    display: inline-block;
    margin: 0 0 16px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(197, 167, 115, 0.2), rgba(197, 167, 115, 0.08));
    border: 1px solid rgba(197, 167, 115, 0.5);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.moon-sign-badge__label {
    color: rgba(224, 224, 224, 0.7);
    font-weight: normal;
    margin-right: 8px;
}
.moon-sign-warning {
    font-size: 0.75em;
    color: rgba(224, 224, 224, 0.55);
    margin: 4px 0 0;
}

/* LUNAキャラクター画像スロット */
.luna-character-slot {
    text-align: center;
    margin: 18px auto 8px;
}

/* ヘッダー位置：大きく中央
   エッジを楕円マスクでフェードアウトして「夜空に溶け込む」演出
   → 四角い画像枠が目立たなくなる */
.luna-character-slot--header img {
    max-width: 320px;
    height: auto;
    /* 下端だけぼかす（上・左右はくっきり、下方向に徐々に透明へ） */
    mask-image: linear-gradient(to bottom,
                                #000 0%,
                                #000 62%,
                                rgba(0,0,0,0.88) 76%,
                                rgba(0,0,0,0.45) 90%,
                                transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom,
                                        #000 0%,
                                        #000 62%,
                                        rgba(0,0,0,0.88) 76%,
                                        rgba(0,0,0,0.45) 90%,
                                        transparent 100%);
    animation: luna-fadein 1.4s ease-out;
}

/* 中央配置：ローディング画面など */
.luna-character-slot--center img {
    max-width: 320px;
    height: auto;
    /* 下端だけぼかす（TOPのヘッダーと同じ表現） */
    mask-image: linear-gradient(to bottom,
                                #000 0%,
                                #000 62%,
                                rgba(0,0,0,0.88) 76%,
                                rgba(0,0,0,0.45) 90%,
                                transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom,
                                        #000 0%,
                                        #000 62%,
                                        rgba(0,0,0,0.88) 76%,
                                        rgba(0,0,0,0.45) 90%,
                                        transparent 100%);
    animation: luna-fadein 1s ease-out, luna-breathe 4s ease-in-out 1.2s infinite;
}

/* 小さく丸い：結果・エラー画面など */
.luna-character-slot--small img {
    max-width: 110px;
    width: 30%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border: 1.5px solid var(--primary-color);
    filter: drop-shadow(0 0 14px var(--primary-glow));
    animation: luna-fadein 0.8s ease-out;
}

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

/* 神秘的な呼吸（中央配置のキャラに使う） — 光彩なし、scaleの揺らぎだけ */
@keyframes luna-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.02); }
}

/* レスポンシブ調整 */
@media (max-width: 540px) {
    .luna-title__main { font-size: 2.1em; letter-spacing: 0.2em; }
    .luna-title__sub { font-size: 0.8em; }
    .category-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .step-title { font-size: 1.1em; }
    .luna-button { padding: 12px 24px; font-size: 0.98em; }
    .result-card-display img { width: 120px; aspect-ratio: 11 / 19; }
    .result-actions { flex-direction: column; }
    .result-actions .luna-button { width: 100%; }
    .luna-character-slot--header img { max-width: 400px; width: 90%; }
}