/* =========================================================
   타로 배우기 · 그림 상징 사전  (/{lang}/tarot/learn…)
   tarot-guide.css 위에 얹어 씁니다.
   ========================================================= */

.tl-cat {
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -.01em;
    color: var(--text-soft);
}

/* ---------- 상징 칩 ---------- */
.tl-symbols {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
}
.tl-symbol {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}
.tl-symbol:hover { transform: translateY(-2px); border-color: var(--tarot-accent, #52b788); }
.tl-symbol-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .12));
    font-size: 17px;
}
.tl-symbol-copy { min-width: 0; display: flex; flex-direction: column; }
.tl-symbol-copy b { font-size: 13.5px; font-weight: 900; line-height: 1.3; word-break: keep-all; }
.tl-symbol-copy span { font-size: 11px; line-height: 1.4; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-symbol small { font-size: 10.5px; font-weight: 800; color: var(--text-soft); white-space: nowrap; }

/* ---------- 작은 카드 (그림 + 이름) ---------- */
.tl-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}
.tl-mini img {
    flex: 0 0 auto;
    width: 38px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .16);
}
.tl-mini span { font-size: 13px; font-weight: 800; line-height: 1.3; word-break: keep-all; }
.tl-mini em {
    display: block;
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
    color: var(--tarot-accent-strong, var(--primary));
}

/* ---------- 짝 카드 ---------- */
.tl-pairs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.tl-pair { padding: 12px 14px; }
.tl-pair-cards { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.tl-pair-plus,
.tl-pair-sum { font-size: 13px; font-weight: 900; color: var(--text-soft); }
.tl-pair-sum { margin-left: auto; color: var(--tarot-accent-strong, var(--primary)); }
.tl-pair p { margin: 8px 0 0; font-size: 13px; line-height: 1.65; word-break: keep-all; }
.tl-pair-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.tl-pair-solo { background: var(--surface-hover, rgba(0, 0, 0, .03)); }

/* ---------- 표 ---------- */
.tl-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}
.tl-scroll table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tl-scroll th,
.tl-scroll td { padding: 9px 10px; border-top: 1px solid var(--border); vertical-align: top; text-align: left; line-height: 1.5; }
.tl-scroll thead th { border-top: 0; font-size: 12px; font-weight: 900; }
.tl-scroll thead th b { display: block; color: var(--suit, var(--text)); }
.tl-scroll thead th span { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 600; color: var(--text-soft); }

.tl-minor { min-width: 640px; }
.tl-minor tbody th { width: 30%; }
.tl-minor tbody th b { display: block; font-size: 12.5px; font-weight: 900; }
.tl-minor tbody th span { display: block; font-size: 11.5px; color: var(--text-soft); word-break: keep-all; }
.tl-num {
    display: inline-grid !important;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-bottom: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .14));
    color: var(--tarot-accent-strong, var(--primary)) !important;
    font-size: 12px !important;
    font-weight: 900;
}

.tl-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text);
    text-decoration: none;
    text-align: center;
}
.tl-cell img { width: 44px; height: auto; border-radius: 5px; box-shadow: 0 3px 8px rgba(0, 0, 0, .15); transition: transform .15s ease; }
.tl-cell:hover img { transform: translateY(-2px); }
.tl-cell span { font-size: 11px; font-weight: 800; line-height: 1.3; word-break: keep-all; }
.tl-cell em { font-style: normal; font-size: 10.5px; line-height: 1.35; color: var(--text-soft); word-break: keep-all; }

.tl-ranks { min-width: 560px; }
.tl-ranks tbody th { white-space: nowrap; font-weight: 900; }
.tl-ranks td { word-break: keep-all; }
.tl-court { min-width: 560px; }
.tl-court tbody th { white-space: nowrap; font-weight: 900; vertical-align: middle; }
.tl-court td { width: 23%; }

/* ---------- 로마 숫자 ---------- */
.tl-roman-rules { margin-bottom: 12px; }
.tl-roman {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 6px;
}
.tl-roman-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 6px;
    align-items: baseline;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}
.tl-roman-item:hover { border-color: var(--tarot-accent, #52b788); }
.tl-roman-item b { font-family: Georgia, 'Times New Roman', serif; font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.tl-roman-item small { justify-self: end; font-size: 11px; font-weight: 800; color: var(--text-soft); }
.tl-roman-item span { grid-column: 1 / -1; margin-top: 2px; font-size: 11.5px; font-weight: 700; color: var(--text-soft); word-break: keep-all; }

/* ---------- 상징 한 장 ---------- */
.tl-sym-icon {
    display: inline-grid;
    place-items: center;
    width: 1.5em;
    height: 1.5em;
    margin-right: 8px;
    border-radius: 14px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .12));
    font-size: .8em;
    vertical-align: middle;
}
.tl-sym-short { margin: 6px 0 0; font-size: 15px; font-weight: 800; color: var(--tarot-accent-strong, var(--primary)); }
.tl-sym-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tl-sym-box { padding: 16px; }
.tl-sym-h { margin: 0 0 6px; font-size: 15px; font-weight: 900; }
.tl-sym-box p { margin: 0; font-size: 14px; line-height: 1.75; word-break: keep-all; }

.tl-sym-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.tl-sym-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    height: 100%;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}
.tl-sym-card:hover { transform: translateY(-2px); border-color: var(--tarot-accent, #52b788); }
.tl-sym-card img { flex: 0 0 auto; width: 64px; height: auto; border-radius: 7px; box-shadow: 0 5px 12px rgba(0, 0, 0, .18); }
.tl-sym-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-sym-card-copy b { font-size: 14.5px; font-weight: 900; }
.tl-sym-card-copy small { font-size: 11px; color: var(--text-soft); }
.tl-sym-card-copy span { margin-top: 4px; font-size: 13px; line-height: 1.6; word-break: keep-all; }

/* ---------- 카드 백과의 상징 칩 ---------- */
.tl-card-symbols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tl-card-symbols a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
}
.tl-card-symbols a:hover { border-color: var(--tarot-accent, #52b788); }

@media (max-width: 640px) {
    .tl-pairs,
    .tl-pair-extra,
    .tl-sym-text,
    .tl-sym-cards { grid-template-columns: 1fr; }
    .tl-symbols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .tl-symbol { grid-template-columns: auto 1fr; padding: 9px 10px; gap: 8px; }
    .tl-symbol small { display: none; }
    .tl-symbol-icon { width: 30px; height: 30px; font-size: 15px; }
}


/* ===== mobile-text v1 — 휴대폰에서 작은 글씨 키우기 (자동 생성: 14px 미만만, 원래 값 → 새 값) ===== */
@media (max-width: 640px) {
  .tl-symbol-copy b { font-size: 14px; } /* 13.5 */
  .tl-symbol-copy span { font-size: 12.5px; } /* 11 */
  .tl-symbol small { font-size: 12px; } /* 10.5 */
  .tl-mini span { font-size: 14px; } /* 13 */
  .tl-mini em { font-size: 12.5px; } /* 11 */
  .tl-pair-plus,
.tl-pair-sum { font-size: 14px; } /* 13 */
  .tl-pair p { font-size: 14px; } /* 13 */
  .tl-scroll table { font-size: 13.5px; } /* 12.5 */
  .tl-scroll thead th { font-size: 13px; } /* 12 */
  .tl-scroll thead th span { font-size: 12px; } /* 10.5 */
  .tl-minor tbody th b { font-size: 13.5px; } /* 12.5 */
  .tl-minor tbody th span { font-size: 13px; } /* 11.5 */
  .tl-num { font-size: 13px !important; } /* 12 */
  .tl-cell span { font-size: 12.5px; } /* 11 */
  .tl-cell em { font-size: 12px; } /* 10.5 */
  .tl-roman-item small { font-size: 12.5px; } /* 11 */
  .tl-roman-item span { font-size: 13px; } /* 11.5 */
  .tl-sym-card-copy small { font-size: 12.5px; } /* 11 */
  .tl-sym-card-copy span { font-size: 14px; } /* 13 */
  .tl-card-symbols a { font-size: 13.5px; } /* 12.5 */
}
