/* =========================================================
   Lunar Soopoolleaf — 공유된 결과 페이지 (/{lang}/tarot/r/…)
   tarot-cards.css 의 .tc-* 단추 · 틀을 같이 씁니다.
   ========================================================= */

.tarot-share-page .tarot-main.tsh-main {
    gap: 24px;
}

.tsh-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.tsh-title {
    margin: 0;
    font-size: clamp(27px, 4.4vw, 38px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -1.5px;
}

.tsh-question {
    margin: 4px 0 0;
    max-width: 640px;
    font-size: 15.5px;
    line-height: 1.7;
    font-weight: 500;
}

.tsh-question-label {
    display: inline-block;
    margin-right: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .11));
    color: var(--tarot-accent-strong, var(--primary));
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    vertical-align: middle;
}


/* ---------- 카드 줄 ---------- */

.tsh-cards {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px 12px;
    justify-items: center;
}

/* 1~3장은 크게 */
.tsh-cards[style*="--tsh-count: 1"],
.tsh-cards[style*="--tsh-count: 2"],
.tsh-cards[style*="--tsh-count: 3"] {
    grid-template-columns: repeat(auto-fit, minmax(190px, 230px));
    justify-content: center;
}

.tsh-card {
    width: 100%;
    max-width: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.tsh-position {
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

.tsh-card-frame {
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 14px 30px rgba(46, 78, 63, .14);
    transition: transform .2s ease;
}

html[data-theme="dark"] .tsh-card-frame {
    box-shadow: 0 14px 30px rgba(0, 0, 0, .34);
}

.tsh-card-frame:hover {
    transform: translateY(-3px);
}

.tsh-card-frame.is-reversed img {
    transform: rotate(180deg);
}

.tsh-card-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 300 / 510;
    object-fit: cover;
}

.tsh-card-name {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 6px;
}

.tsh-card-name b {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.4px;
}

.tsh-reversed {
    color: var(--tree);
    font-size: 11px;
    font-weight: 800;
}

.tsh-keywords {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}


/* ---------- 행동 ---------- */

.tsh-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tsh-actions .tc-button.is-busy {
    opacity: .65;
    pointer-events: none;
}


@media (max-width: 760px) {

    .tsh-cards {
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
        gap: 14px 8px;
    }

    .tsh-cards[style*="--tsh-count: 1"],
    .tsh-cards[style*="--tsh-count: 2"],
    .tsh-cards[style*="--tsh-count: 3"] {
        grid-template-columns: repeat(auto-fit, minmax(104px, 150px));
    }

    .tsh-card-name b {
        font-size: 13.5px;
    }

    .tsh-actions .tc-button {
        flex: 1 1 calc(50% - 8px);
    }
}


/* ---------- 오늘의 카드 공유 페이지 ---------- */

.tsh-date {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
}

.tsh-meta {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.tsh-cards-daily .tsh-card-frame {
    width: min(220px, 56vw);
}

.tsh-summary {
    max-width: 620px;
    margin: 0 auto;
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
}


/* ---------- 토스트 (스프레드 CSS 를 안 읽는 페이지용) ---------- */

.spread-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 900000;
    max-width: calc(100vw - 28px);
    min-height: 34px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(20, 31, 25, .12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .16s ease, transform .18s ease, visibility .16s ease;
    pointer-events: none;
}

.spread-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}


/* ---------- 질문 주제 ---------- */

.tsh-topic-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 11px;
    font-weight: 800;
}

.tsh-topic-badge.is-good { color: var(--tarot-accent-strong, var(--primary)); border-color: var(--tarot-accent-border, rgba(82, 183, 136, .55)); }
.tsh-topic-badge.is-mid  { color: var(--text); }
.tsh-topic-badge.is-bad  { color: var(--tree, #a67c52); }

.tsh-topic-line {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text);
    word-break: keep-all;
}


/* ---------- 오늘의 메시지 (v4) ---------- */
.tsh-message {
    max-width: 560px;
    margin: 0 auto 14px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--soft, rgba(0, 0, 0, .04));
    color: var(--text);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    word-break: keep-all;
}

.tsh-message span {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-ink, inherit);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}


/* ===== mobile-text v1 — 휴대폰에서 작은 글씨 키우기 (자동 생성: 14px 미만만, 원래 값 → 새 값) ===== */
@media (max-width: 640px) {
  .tsh-question-label { font-size: 12.5px; } /* 11 */
  .tsh-position { font-size: 13px; } /* 11.5 */
  .tsh-card-name b { font-size: 14px; } /* 13.5 */
  .tsh-reversed { font-size: 12.5px; } /* 11 */
  .tsh-keywords { font-size: 13px; } /* 12 */
  .tsh-meta { font-size: 13px; } /* 11.5 */
  .spread-toast { font-size: 13px; } /* 12 */
  .tsh-topic-badge { font-size: 12.5px; } /* 11 */
  .tsh-topic-line { font-size: 13px; } /* 12 */
  .tsh-message span { font-size: 13px; } /* 12 */
}
