@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-section ul {
    margin: 14px 0 14px 22px;
}

.fortune-section li {
    margin-bottom: 8px;
}

/* =========================
   CTA
========================= */
.fortune-cta {
    margin: 28px 0 10px;
    padding: 24px;
    background: #f7fbff;
    border: 2px solid #9fbce3;
    border-radius: 16px;
    text-align: center;
}

.fortune-cta p {
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #243b5a;
}

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

.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);
}

/* =========================
   関連リンク
========================= */
.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-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 input[type="number"],
.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 input[type="number"]: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 input[type="number"] {
    width: 110px;
    max-width: 110px;
}

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

/* =========================
   Topicパネル
========================= */
.fortune-topic-panel {
    margin-top: 42px;
    padding: 24px;
    background: #f8fbff;
    border: 2px solid #b8cbe3;
    border-radius: 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.fortune-topic-panel__head {
    margin-bottom: 18px;
}

.fortune-topic-panel__head h2 {
    position: relative;
    margin: 0 0 12px 0;
    padding: 8px 0 10px 18px;
    font-size: 1.45rem;
    font-weight: 700;
    color: #274c77;
    border-left: 8px solid #4f7fd6;
    line-height: 1.4;
}

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

.fortune-topic-panel__head p {
    margin: 0;
    color: #35506f;
}

/* =========================
   Topicスクロール枠
========================= */
.fortune-topic-scroll {
    max-height: 950px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    border: 2px solid #d4dbe6;
    border-radius: 16px;
    background: #fff;
    scroll-behavior: smooth;
}

/* =========================
   Topic本体
========================= */
.fortune-topic-wrap {
    margin-top: 0;
    padding: 24px;
    background: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: none;
}

/* topic meta */
.topic-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.topic-meta .badge {
    display: inline-block;
    padding: 7px 14px;
    background: #eef5ff;
    border: 1px solid #9fbce3;
    border-radius: 999px;
    color: #2d4f7c;
    font-size: 0.95rem;
    font-weight: 700;
}

.topic-meta .date {
    color: #666;
    font-size: 0.95rem;
}

/* topic image */

/* 一白水星ブロックだけ、PWA風に画像を本文右へ */
.topic-star-block {
    overflow: hidden;
}

.topic-star-block .topic-img--first {
    float: right;
    width: 240px;
    max-width: 38%;
    margin: 0 0 16px 22px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* 先頭に置いていた topic-img の汎用定義は少し弱める */
.topic-img {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 18px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* topic h2 */
.fortune-topic-wrap h2[id] {
    clear: both;
    position: relative;
    margin: 42px 0 18px;
    padding: 12px 16px 12px 18px;
    background: linear-gradient(to right, #f5f9ff, #fffdf5);
    border: 2px solid #c8d8ef;
    border-left: 8px solid #4f7fd6;
    border-radius: 12px;
    font-size: 1.45rem;
    font-weight: 700;
    color: #23456b;
    line-height: 1.5;
    scroll-margin-top: 90px;
}

/* topic 本文 */
.fortune-topic-wrap p {
    margin: 0 0 16px 0;
    font-size: 1.02rem;
    line-height: 1.95;
}

.fortune-topic-wrap ul {
    margin: 16px 0 18px 24px;
}

.fortune-topic-wrap li {
    margin-bottom: 8px;
}

/* 区切り線 */
.topic-sep {
    border: none;
    border-top: 2px dashed #cfd9e7;
    margin: 34px 0;
}

/* =========================
   topic内テーブル
========================= */
.fortune-topic-wrap .topic-table,
.fortune-topic-wrap .table,
.fortune-topic-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 10px;
    background: #fff;
    border: 2px solid #c9d6e5;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.fortune-topic-wrap .table tbody,
.fortune-topic-wrap table tbody {
    display: table;
    width: 100%;
}

.fortune-topic-wrap .table tr,
.fortune-topic-wrap table tr {
    display: table-row;
}

.fortune-topic-wrap .topic-table th,
.fortune-topic-wrap .topic-table td,
.fortune-topic-wrap .table th,
.fortune-topic-wrap .table td,
.fortune-topic-wrap table th,
.fortune-topic-wrap table td {
    padding: 12px 14px;
    border: 1px solid #d6e0ea;
    vertical-align: top;
    line-height: 1.75;
    word-break: break-word;
}

.fortune-topic-wrap .table th,
.fortune-topic-wrap table th {
    background: #f4f8fc;
    color: #2c496f;
    font-weight: 700;
    text-align: left;
}

.fortune-topic-wrap .table td:first-child,
.fortune-topic-wrap table td:first-child {
    width: 140px;
    background: #fbfcfe;
    font-weight: 700;
    color: #35506f;
}

/* =========================
   星ナビゲーション（将来用）
========================= */
.star-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.star-nav a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #9fbce3;
    border-radius: 999px;
    background: #eef5ff;
    color: #2d4f7c;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.star-nav a:hover {
    background: #e2edff;
}

/* =========================
   未公開メッセージ
========================= */
.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,
    .fortune-topic-wrap,
    .fortune-cta,
    .fortune-topic-panel {
        padding: 20px;
    }

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

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

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

    .birth-selects input[type="number"] {
        width: 100%;
        max-width: 100%;
    }

    .fortune-topic-scroll {
        max-height: 75vh;
        padding-right: 4px;
    }

    .fortune-topic-wrap {
        padding: 16px;
    }

    .topic-img {
        float: none;
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 auto 18px;
    }

    .fortune-topic-wrap h2[id] {
        font-size: 1.2rem;
        padding: 10px 12px 10px 14px;
        border-left-width: 6px;
        scroll-margin-top: 75px;
    }

    .fortune-topic-wrap .table,
    .fortune-topic-wrap table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fortune-topic-wrap .table tbody,
    .fortune-topic-wrap table tbody {
        min-width: 560px;
    }

    .fortune-topic-wrap .table td:first-child,
    .fortune-topic-wrap table td:first-child {
        width: 110px;
    }

    .topic-star-block .topic-img--first {
        float: right;
        width: 180px;
        max-width: 42%;
        margin: 0 0 14px 16px;
    }

    .topic-img {
        margin-bottom: 22px;
    }
}