/* ===== Three Card Tarot — メインCSS ===== */

/* ===== カード行レイアウト ===== */
.threecard-row,
.onecard-row,
.two-mind-row,
.crosscard-row {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.threecard-row.initial,
.onecard-row.initial,
.two-mind-row.initial,
.crosscard-row.initial {
    height: 150px;
    margin-bottom: 2em;
}

.threecard-row.result,
.onecard-row.result,
.two-mind-row.result,
.crosscard-row.result {
    margin-bottom: 1em;
}

/* ===== カードスタイル ===== */
.threecard-card,
.onecard-card,
.two-mind-card {
    text-align: center;
    backface-visibility: hidden;
}

.threecard-card img,
.onecard-card img,
.two-mind-card img {
    display: block;
    margin: auto;
    width: 200px;
}

.threecard-card.upright img,
.onecard-card.upright img,
.two-mind-card.upright img {
    transform: rotate(0deg);
}

.threecard-card.reversed img,
.onecard-card.reversed img,
.two-mind-card.reversed img {
    transform: rotate(180deg);
}

.two-mind-card {
    margin: 0 1em;
}

/* ===== ツーマインド縦並び ===== */
.two-mind-row {
    flex-direction: column !important;
    align-items: center;
}

.twocard-image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2em;
}

/* ===== シンプルクロス（クロススプレッド）重なり ===== */
.simple-cross-bg {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2em auto;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.simple-cross-bg img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200px;
    height: 90px;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* ===== シャッフルアニメーション ===== */
.shuffle .tct-back {
    position: absolute;
    top: 0;
}

.shuffle .tct-back img {
    width: 100px;
}

.shuffle .tct-back:nth-child(1) {
    left: 40%;
    animation: moveLR 1.5s ease-in-out infinite;
    animation-delay: 0s;
}

.shuffle .tct-back:nth-child(2) {
    left: 45%;
    animation: moveLR 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

.shuffle .tct-back:nth-child(3) {
    left: 50%;
    animation: moveLR 1.5s ease-in-out infinite;
    animation-delay: 0.6s;
}

.shuffle .tct-back:nth-child(4) {
    left: 55%;
    animation: moveLR 1.5s ease-in-out infinite;
    animation-delay: 0.9s;
}

.shuffle .tct-back:nth-child(5) {
    left: 60%;
    animation: moveLR 1.5s ease-in-out infinite;
    animation-delay: 1.2s;
}

@keyframes moveLR {

    0%,
    100% {
        transform: translateX(-20px);
    }

    50% {
        transform: translateX(20px);
    }
}

/* ===== 解説・フォーム・リンク ===== */
.threecard-details,
.onecard-details,
.two-mind-details,
.crosscard-details {
    margin-top: 2em;
}

.card-detail-link {
    margin-top: 0.5em;
    font-size: 0.9em;
}

.card-detail-link a {
    color: #0073aa;
    text-decoration: underline;
}

.tarot-form {
    margin-top: 2em;
}

/* ===== フォーカード（4枚引き）スプレッド ===== */
.fourcard-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5em;
    margin-bottom: 1em;
}

.fourcard-card {
    text-align: center;
    width: 200px;
}

.fourcard-card img {
    width: 170px;
    height: auto;
    display: block;
    margin: auto;
    box-shadow: 0 2px 12px rgba(80, 30, 30, 0.15);
    border-radius: 14px;
    background: #fff;
}

.fourcard-card.upright img {
    transform: rotate(0deg);
}

.fourcard-card.reversed img {
    transform: rotate(180deg);
}

.fourcard-label {
    font-size: 1.12em;
    margin-bottom: 0.5em;
    color: #b04a1a;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.fourcard-title {
    font-size: 1.07em;
    font-weight: bold;
    margin: 0.3em 0 0.1em 0;
}

.fourcard-keyword {
    font-size: 1em;
    color: #2a6847;
    margin-bottom: 0.3em;
}

.fourcard-desc {
    font-size: 0.98em;
    margin-bottom: 0.7em;
    line-height: 1.5;
}

/* ===== 詳細ページへの誘導ボタン ===== */
.tct-detail-btn {
    display: inline-block;
    background: linear-gradient(135deg, #d4af37 0%, #ffdf73 50%, #d4af37 100%);
    color: #fff !important;
    font-weight: bold;
    font-size: 1.1em;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tct-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    color: #fff !important;
}

.tct-detail-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* ===== 結果画面 テーブルレイアウト ===== */
.tct-result-table {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fdfbf7;
    border: 1px solid #e5dcc3;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 2em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    align-items: center;
}

.tct-card-col {
    flex: 0 0 120px;
    text-align: center;
}

.tct-card-col img {
    max-width: 100px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tct-card-col.reversed img {
    transform: rotate(180deg);
}

.tct-text-col {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.tct-text-col h3 {
    margin-top: 0;
    color: #b04a1a;
    border-bottom: 2px solid #e5dcc3;
    padding-bottom: 8px;
    font-size: 1.3em;
}

.tct-text-col .tct-keyword {
    font-weight: bold;
    color: #2a6847;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.tct-text-col .tct-story {
    line-height: 1.6;
    color: #444;
}

@media (max-width: 600px) {
    .tct-result-table {
        flex-direction: column;
    }

    .tct-card-col {
        margin: 0 auto;
    }
}

/* ===== Facet テキスト ===== */
.tct-facet-text {
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 8px;
    font-size: 1.05em;
    line-height: 1.6;
}

.tct-facet-text.normal {
    background: #f3e5f5;
    border-left: 4px solid #ce93d8;
}

.tct-facet-text.spicy {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

/* ===== 判定バッジ ===== */
.tct-judge-badge {
    display: block;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    padding: 16px 24px;
    border-radius: 12px;
    margin: 1.5em auto;
    max-width: 420px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tct-judge-badge.yes {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #66bb6a;
}

.tct-judge-badge.no {
    background-color: #ffebee;
    color: #c62828;
    border: 2px solid #ef5350;
}

.tct-judge-badge.pending {
    background-color: #fff8e1;
    color: #f57f17;
    border: 2px solid #ffca28;
}

/* ===== Facet ラベル ===== */
.tct-facet-label {
    font-weight: bold;
    color: #6a1b9a;
    margin-right: 4px;
}

/* ===== まとめカード ===== */
.tct-summary-card {
    background: linear-gradient(135deg, #fdf6ff 0%, #f0e6ff 100%);
    border: 2px solid #ce93d8;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 1.5em 0;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.08);
}

.tct-summary-card h4 {
    margin: 0 0 12px 0;
    color: #6a1b9a;
    font-size: 1.2em;
    border-bottom: 1px solid #e1bee7;
    padding-bottom: 8px;
}

.tct-summary-row {
    padding: 6px 0;
    font-size: 1.05em;
    line-height: 1.6;
    color: #333;
}

.tct-summary-label {
    font-weight: bold;
    color: #6a1b9a;
}