@charset "UTF-8";

.fortune-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    line-height: 1.9;
}

.fortune-page p,
.fortune-page li,
.fortune-page td,
.fortune-page th,
.fortune-page label,
.fortune-page input,
.fortune-page select,
.fortune-page button {
    color: #222;
    font-weight: 400;
}

.fortune-hero {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.fortune-hero__text {
    flex: 1;
    min-width: 300px;
}

.fortune-hero__text h1 {
    font-size: 2.15rem;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #2c3e50;
}

.fortune-hero__text p {
    font-size: 1.06rem;
    margin-bottom: 16px;
}

.fortune-section {
    margin-top: 42px;
    padding: 28px;
    background: #fffef9;
    border: 2px solid #d8c979;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.fortune-section h2,
.fortune-links h2 {
    position: relative;
    margin: 0 0 20px 0;
    padding: 8px 0 10px 18px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #274c77;
    border-left: 8px solid #4f7fd6;
    line-height: 1.4;
}

.fortune-section h2::after,
.fortune-links h2::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    margin-top: 10px;
    background: linear-gradient(to right, #4f7fd6, #d8c979);
    border-radius: 999px;
}

.fortune-links {
    margin-top: 42px;
    padding: 28px;
    background: #f9fafb;
    border: 2px solid #b8c4d6;
    border-radius: 16px;
}

.fortune-links ul {
    margin-left: 22px;
}

.fortune-links li {
    margin-bottom: 10px;
}

.fortune-links a {
    text-decoration: none;
    color: #2f5fb3;
    font-weight: 600;
}

.fortune-links a:hover {
    text-decoration: underline;
}

.fortune-badges {
    margin-top: 18px;
}

.fortune-badge {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 8px 14px;
    background: #eef5ff;
    border: 1px solid #9fbce3;
    border-radius: 999px;
    font-size: 0.95rem;
    color: #2d4f7c;
    font-weight: 600;
}

.fortune-form {
    margin-top: 10px;
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #2c3e50;
}

.fortune-form input[type="text"],
.fortune-form select {
    width: 100%;
    max-width: 260px;
    padding: 10px 12px;
    border: 1.8px solid #b7c7da;
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    box-sizing: border-box;
}

.fortune-form input[type="text"]:focus,
.fortune-form select:focus {
    outline: none;
    border-color: #4f7fd6;
    box-shadow: 0 0 0 3px rgba(79, 127, 214, 0.12);
}

.birth-selects {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.birth-selects select {
    width: 120px;
    max-width: 120px;
}

.radio-group {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.radio-group label {
    margin-bottom: 0;
    font-weight: 600;
}

.form-actions {
    margin-top: 20px;
}

.cta-button {
    display: inline-block;
    padding: 14px 30px;
    background: #356ac3;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cta-button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.sub-cta {
    margin-top: 22px;
    text-align: center;
}

.fortune-error-box {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #fff5f5;
    border: 1px solid #efb4b4;
    border-radius: 12px;
    color: #9b2c2c;
    line-height: 1.8;
}

.health-result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 18px;
}

.health-card {
    background: #fff;
    border: 2px solid #d9cf92;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.health-card__head {
    padding: 16px 18px;
    background: linear-gradient(to right, #f7fbff, #fffdf4);
    border-bottom: 1px solid #e6ddad;
}

.health-card__head h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #274c77;
}

.health-card__body {
    padding: 18px;
}

.health-meta-item {
    margin-bottom: 16px;
}

.health-meta-item:last-child {
    margin-bottom: 0;
}

.health-meta-label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.health-meta-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.7;
}

.not-published {
    text-align: center;
    padding: 36px 20px;
}

.not-published strong {
    color: #2c496f;
}

@media (max-width: 768px) {
    .fortune-page {
        padding: 20px 14px 50px;
    }

    .fortune-hero__text h1 {
        font-size: 1.75rem;
    }

    .fortune-section,
    .fortune-links {
        padding: 20px;
    }

    .fortune-section h2,
    .fortune-links h2 {
        font-size: 1.25rem;
        padding-left: 14px;
        border-left-width: 6px;
    }

    .fortune-form input[type="text"],
    .fortune-form select {
        max-width: 100%;
        width: 100%;
    }

    .birth-selects {
        flex-direction: column;
        gap: 8px;
    }

    .birth-selects select {
        width: 100%;
        max-width: 100%;
    }

    .health-result-cards {
        grid-template-columns: 1fr;
    }
}
/* =============================================================
   健康鑑法 v2 専用追加スタイル
   旧 health.css は変更しない。Android版でWebViewを使う場合も
   共通クラスを再利用しやすいよう、追加部分は接頭辞 health- に統一。
   ============================================================= */
.health-ai-section {
    background: #f8fbff;
    border-color: #a9bfd9;
}
.health-ai-text {
    white-space: pre-wrap; /* AI文章の改行を保持しつつHTMLとして解釈しない */
    overflow-wrap: anywhere;
    font-size: 1.04rem;
    line-height: 2;
    color: #253648;
}
.health-overlap-note {
    padding: 12px 16px;
    background: #fff9e8;
    border-left: 4px solid #c49b40;
    border-radius: 6px;
}

/* ===== v2入力画面：検索語を含む主題と、その説明を区別する ===== */
.health-hero-subtitle {
    margin: -5px 0 24px;
    color: #35577b;
    font-size: 1.25rem;
    line-height: 1.65;
    font-weight: 600;
}

/* ===== AI鑑定中：今日の運勢と同様の全画面オーバーレイ ===== */
.health-ai-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: rgba(22, 34, 56, .58);
}
.health-ai-loading-overlay.is-visible { display: flex; }
.health-ai-loading-box {
    width: min(100%, 440px);
    box-sizing: border-box;
    border-radius: 18px;
    padding: 30px 24px;
    text-align: center;
    background: #fff;
    box-shadow: 0 14px 38px rgba(0,0,0,.22);
    color: #253648;
}
.health-ai-loading-title { font-size: 1.35rem; font-weight: 700; color: #274c77; }
.health-ai-loading-box p { margin: 12px 0 0; line-height: 1.8; }
.health-ai-loading-dots { display: flex; justify-content: center; gap: 10px; margin: 22px 0; }
.health-ai-loading-dots span {
    width: 12px; height: 12px; border-radius: 50%; background: #5476cf;
    animation: health-ai-pulse 1.2s ease-in-out infinite;
}
.health-ai-loading-dots span:nth-child(2) { animation-delay: .2s; }
.health-ai-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes health-ai-pulse {
    0%, 70%, 100% { opacity: .3; transform: scale(.75); }
    35% { opacity: 1; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
    .health-ai-loading-dots span { animation: none; opacity: .8; }
}

/* ===== 医療上の注意書き：本文と明確に区別する朱書き ===== */
.health-medical-notice {
    margin: 20px 0 0;
    padding: 14px 16px;
    border-left: 4px solid #b42318;
    background: #fff6f4;
    color: #a11f16 !important;
    font-weight: 700 !important;
    line-height: 1.85;
}
@media (max-width: 768px) {
    .health-hero-subtitle { font-size: 1.05rem; }
}
