/* =========================================================
   가볍게 한 장 · 일상 타로  (/{lang}/tarot/life…)
   ========================================================= */

.tlife-main { max-width: 720px; }

.tlife-lead {
    margin: 6px auto 0;
    max-width: 520px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-soft);
    text-align: center;
    word-break: keep-all;
}

/* ---------- 네 주제 타일 ---------- */
.tlife-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 8px;
}
.tlife-topic {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding: 14px 13px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(20, 31, 25, .05);
    transition: transform .16s ease, border-color .16s ease;
}
.tlife-topic:hover { transform: translateY(-2px); border-color: var(--tarot-accent, #52b788); }
.tlife-topic.is-on { border-color: var(--tarot-accent, #52b788); box-shadow: 0 0 0 2px rgba(82, 183, 136, .18); }
.tlife-topic-icon {
    grid-row: 1 / 3;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
    background: rgba(82, 183, 136, .14);
}
.tlife-topic.is-outfit .tlife-topic-icon { background: rgba(138, 123, 184, .16); }
.tlife-topic.is-contact .tlife-topic-icon { background: rgba(201, 161, 74, .18); }
.tlife-topic.is-buy .tlife-topic-icon { background: rgba(192, 86, 75, .14); }
.tlife-topic b { font-size: 14.5px; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; word-break: keep-all; }
.tlife-topic span:not(.tlife-topic-icon) { font-size: 11.5px; line-height: 1.45; color: var(--text-soft); word-break: keep-all; }

@media (max-width: 420px) {
    .tlife-topics { gap: 7px; }
    .tlife-topic { padding: 11px 10px; column-gap: 8px; }
    .tlife-topic-icon { width: 34px; height: 34px; font-size: 18px; border-radius: 11px; }
    .tlife-topic b { font-size: 13px; }
    .tlife-topic span:not(.tlife-topic-icon) { font-size: 10.5px; }
}

/* ---------- 뽑기 ---------- */
.tlife-draw {
    margin: 18px 0 6px;
    padding: 20px 14px 26px;
    border-radius: 22px;
    background: linear-gradient(160deg, #182536, #241d36);
    color: #eef5f1;
    text-align: center;
    overflow: hidden;
}
.tlife-draw-title { display: block; font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.tlife-draw-hint { display: block; margin-top: 4px; font-size: 12px; color: rgba(238, 245, 241, .7); word-break: keep-all; }

.tlife-deck {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 22px auto 0;
    padding: 0 10px;
}
.tlife-back {
    --w: clamp(52px, 13vw, 84px);
    position: relative;
    width: var(--w);
    height: calc(var(--w) * 1.66);
    margin: 0 calc(var(--w) * -0.18);
    padding: 0;
    border: 1px solid rgba(230, 211, 153, .45);
    border-radius: 9px;
    background: linear-gradient(145deg,
        color-mix(in srgb, #1f2d44 86%, var(--tarot-accent, #52b788) 14%),
        color-mix(in srgb, #2c2241 84%, var(--tarot-accent, #52b788) 16%));
    box-shadow: 0 10px 22px rgba(0, 0, 0, .32);
    cursor: pointer;
    transform: rotate(calc((var(--i) - 3) * 5deg)) translateY(calc(max(var(--i) - 3, 3 - var(--i)) * 4px));
    transform-origin: 50% 120%;
    transition: transform .2s ease, box-shadow .2s ease, opacity .3s ease;
}
.tlife-back::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(230, 211, 153, .4);
    border-radius: 6px;
}
.tlife-back::after {
    content: "✦";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: calc(var(--w) * .3);
    color: rgba(230, 211, 153, .85);
}
.tlife-back:hover,
.tlife-back:focus-visible {
    z-index: 2;
    outline: none;
    transform: rotate(calc((var(--i) - 3) * 5deg)) translateY(-16px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .4), 0 0 0 2px rgba(230, 211, 153, .6);
}
.tlife-deck.is-picking .tlife-back:not(.is-picked) { opacity: .25; }
.tlife-back.is-picked {
    z-index: 3;
    transform: translateY(-28px) scale(1.12);
    box-shadow: 0 0 0 3px rgba(230, 211, 153, .85), 0 20px 40px rgba(0, 0, 0, .45);
}

/* ---------- 결과 ---------- */
.tlife-result {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr;
    gap: 18px;
    align-items: center;
    margin: 16px 0 6px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(20, 31, 25, .07);
}
.tlife-result-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
    animation: tlifeIn .5s ease both;
}
@keyframes tlifeIn {
    from { opacity: 0; transform: translateY(10px) rotateY(60deg); }
    to   { opacity: 1; transform: none; }
}
.tlife-result-copy { min-width: 0; }
.tlife-result-name { display: block; font-size: 13px; font-weight: 800; color: var(--text-soft); }
.tlife-result-name small { font-weight: 600; opacity: .8; }
.tlife-result-label {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    color: var(--tarot-accent-strong, #2f7a55);
}
.tlife-result-answer {
    display: block;
    margin-top: 2px;
    font-size: clamp(22px, 5.4vw, 30px);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -.03em;
    color: var(--text);
    word-break: keep-all;
}
.tlife-result.is-go .tlife-result-answer { color: #2f8a5b; }
.tlife-result.is-stop .tlife-result-answer { color: #b8493f; }
.tlife-result.is-go { border-color: rgba(63, 157, 107, .45); }
.tlife-result.is-stop { border-color: rgba(192, 86, 75, .4); }
.tlife-result-why { margin: 10px 0 0; font-size: 15px; line-height: 1.65; color: var(--text); word-break: keep-all; }

html[data-theme="dark"] .tlife-result.is-go .tlife-result-answer { color: #7fd4a8; }
html[data-theme="dark"] .tlife-result.is-stop .tlife-result-answer { color: #f0958b; }
html[data-theme="dark"] .tlife-result-label { color: var(--tarot-accent, #7fd4a8); }

@media (max-width: 480px) {
    .tlife-result { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 16px 14px; }
    .tlife-result-card { width: min(170px, 52vw); }
}

/* ---------- 글 · 표 ---------- */
.tlife-fun {
    margin: 12px 0 0;
    font-size: 11.5px;
    color: var(--text-soft);
    text-align: center;
    word-break: keep-all;
}
.tlife-seo {
    margin: 18px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-soft);
    word-break: keep-all;
}

.tlife-table {
    margin: 16px 0 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
}
.tlife-table summary {
    padding: 13px 15px;
    font-size: 13.5px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}
.tlife-table summary::-webkit-details-marker { display: none; }
.tlife-table summary::after { content: " ▾"; color: var(--text-soft); }
.tlife-table[open] summary::after { content: " ▴"; }
.tlife-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tlife-table th,
.tlife-table td { padding: 9px 12px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.5; }
.tlife-table thead th { font-size: 11px; color: var(--text-soft); font-weight: 800; }
.tlife-table tbody th { width: 34%; font-weight: 800; word-break: keep-all; }
.tlife-table tbody th a { color: var(--text); text-decoration: none; }
.tlife-table tbody th a:hover { text-decoration: underline; }
.tlife-table td b { display: block; font-weight: 900; }
.tlife-table td b.is-go { color: #2f8a5b; }
.tlife-table td b.is-stop { color: #b8493f; }
.tlife-table td span { color: var(--text-soft); word-break: keep-all; }
html[data-theme="dark"] .tlife-table td b.is-go { color: #7fd4a8; }
html[data-theme="dark"] .tlife-table td b.is-stop { color: #f0958b; }

/* ---------- 카드 백과 칸 (cards/show) ---------- */
.tlife-cardblock {
    margin: 20px 0 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}
.tlife-cardblock-title { margin: 0 0 10px; font-size: 15px; font-weight: 900; letter-spacing: -.02em; }
.tlife-cardblock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tlife-cardblock-item {
    display: block;
    padding: 10px 11px;
    border-radius: 13px;
    background: rgba(82, 183, 136, .08);
    color: var(--text);
    text-decoration: none;
}
.tlife-cardblock-item:hover { background: rgba(82, 183, 136, .15); }
.tlife-cardblock-item small { display: block; font-size: 11px; font-weight: 800; color: var(--text-soft); }
.tlife-cardblock-item b { display: block; margin-top: 2px; font-size: 14px; font-weight: 900; word-break: keep-all; }
.tlife-cardblock-item b.is-go { color: #2f8a5b; }
.tlife-cardblock-item b.is-stop { color: #b8493f; }
.tlife-cardblock-item span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: var(--text-soft); word-break: keep-all; }
html[data-theme="dark"] .tlife-cardblock-item b.is-go { color: #7fd4a8; }
html[data-theme="dark"] .tlife-cardblock-item b.is-stop { color: #f0958b; }
.tlife-cardblock-go { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 800; color: var(--tarot-accent-strong, #2f7a55); text-decoration: none; }
@media (max-width: 420px) {
    .tlife-cardblock-grid { grid-template-columns: 1fr; }
}

/* 오늘의 카드 아래 링크 */
.tarot-daily-life-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: inherit;
    opacity: .85;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.tarot-daily-life-link:hover { opacity: 1; }


/* ===== mobile-text v1 — 휴대폰에서 작은 글씨 키우기 (자동 생성: 14px 미만만, 원래 값 → 새 값) ===== */
@media (max-width: 640px) {
  .tlife-topic span:not(.tlife-topic-icon) { font-size: 13px; } /* 11.5 */
  .tlife-draw-hint { font-size: 13px; } /* 12 */
  .tlife-result-name { font-size: 14px; } /* 13 */
  .tlife-result-label { font-size: 12.5px; } /* 11 */
  .tlife-fun { font-size: 13px; } /* 11.5 */
  .tlife-seo { font-size: 14px; } /* 13 */
  .tlife-table summary { font-size: 14px; } /* 13.5 */
  .tlife-table table { font-size: 13.5px; } /* 12.5 */
  .tlife-table thead th { font-size: 12.5px; } /* 11 */
  .tlife-cardblock-item small { font-size: 12.5px; } /* 11 */
  .tlife-cardblock-item span { font-size: 13px; } /* 11.5 */
  .tlife-cardblock-go { font-size: 13.5px; } /* 12.5 */
  .tarot-daily-life-link { font-size: 13.5px; } /* 12.5 */
}
