@charset "utf-8";
@import url("/main/tg_tokens.css?v=20261125");
/* ===================================================================
   탐구스쿨 v2 : 인기주제 · 흔치 않은 주제 · PPT · 인기도서 · 신규도서 공통 (tag_*.asp, ppt.asp)
   스크립트 : /search/tag.js (숫자 올라가기 · 막대 · 빠른 찾기 · 나타나기 효과)
   =================================================================== */

/* ---------- 히어로 ---------- */
.tc-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 30px; margin-top: 12px; padding: 30px 34px; border-radius: 26px; text-align: left; isolation: isolate; }
.tc-hero::before, .tc-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); animation: tcBlob 14s ease-in-out infinite; }
.tc-hero::before { width: 340px; height: 340px; right: -80px; top: -140px; opacity: .55; }
.tc-hero::after { width: 220px; height: 220px; left: 38%; bottom: -150px; opacity: .45; animation-delay: -7s; }
.tc-scie { background: linear-gradient(120deg, #E6F7F5 0%, #F4FBFB 55%, #E9F6F8 100%); border: 1px solid var(--tg-line); }
.tc-scie::before { background: radial-gradient(circle, rgba(var(--tg-main-rgb), .28), transparent 70%); }
.tc-scie::after { background: radial-gradient(circle, rgba(var(--tg-accent-rgb), .22), transparent 70%); }
.tc-book { background: linear-gradient(120deg, #FFF1EA 0%, #FFF9F6 55%, #FFEFE6 100%); border: 1px solid #FFE0D2; }
.tc-book::before { background: radial-gradient(circle, rgba(var(--tg-accent-rgb), .3), transparent 70%); }
.tc-book::after { background: radial-gradient(circle, rgba(var(--tg-main-rgb), .2), transparent 70%); }
@keyframes tcBlob { 0%, 100% { transform: translate(0, 0) scale(1) } 50% { transform: translate(-30px, 24px) scale(1.12) } }

.tc-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--tg-line2); font-size: 13px; font-weight: 700; color: var(--tg-main-d); }
.tc-book .tc-eyebrow { border-color: #FFD3C2; color: var(--tg-accent-d); }
.tc-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: tcPulse 1.6s ease-in-out infinite; }
@keyframes tcPulse { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.7) } }
.tc-hero h1 { margin: 0 0 10px; font-size: 32px; font-weight: 800; line-height: 1.25; letter-spacing: -1px; color: var(--tg-deep); }
.tc-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--tg-main), var(--tg-main-l)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tc-book h1 em { background-image: linear-gradient(90deg, var(--tg-accent-d), var(--tg-accent)); }
.tc-desc { max-width: 640px; margin: 0 0 18px; font-size: 16px; line-height: 1.7; color: var(--tg-sub); word-break: keep-all; }
.tc-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.tc-stat { padding: 10px 16px; border-radius: 16px; background: rgba(255,255,255,.85); border: 1px solid var(--tg-line); box-shadow: var(--tg-shadow); font-size: 14px; color: var(--tg-sub); }
.tc-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--tg-deep); font-variant-numeric: tabular-nums; }
.tc-art { width: 170px; height: auto; animation: tcFloat 5s ease-in-out infinite; filter: drop-shadow(0 18px 22px rgba(var(--tg-deep-rgb), .16)); }
@keyframes tcFloat { 0%, 100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-10px) rotate(3deg) } }

/* ---------- 빠른 찾기 (X 지우기) ---------- */
.tc-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 22px 0 6px; }
.tc-filter { position: relative; display: flex; align-items: center; flex: 0 1 380px; height: 48px; padding: 0 6px 0 16px; box-sizing: border-box; background: #fff; border: 2px solid var(--tg-line2); border-radius: 999px; transition: border-color .2s, box-shadow .2s; }
.tc-filter:focus-within { border-color: var(--tg-main); box-shadow: 0 0 0 5px rgba(var(--tg-main-rgb), .12); }
.tc-filter .tg-ico { font-size: 18px; color: var(--tg-muted); flex: none; }
.tc-filter input { flex: 1; min-width: 0; height: 100%; margin: 0 6px; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--tg-text); -webkit-appearance: none; appearance: none; }
.tc-filter input::-webkit-search-cancel-button { display: none; }
.tc-filter button { display: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #EEF3F4; color: #7B8A90; font-size: 15px; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.tc-filter button.on { display: inline-flex; }
.tc-filter button:hover { background: var(--tg-accent-tint); color: var(--tg-accent-d); transform: rotate(90deg); }
.tc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-links a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--tg-line2); background: #fff; color: var(--tg-sub); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.tc-links a:hover { transform: translateY(-2px); border-color: var(--tg-tint3); color: var(--tg-main-d); }
.tc-links a.on { background: var(--tg-main); border-color: var(--tg-main); color: #fff; }
.tc-empty { display: none; margin: 30px 0; text-align: center; font-size: 15px; color: var(--tg-muted); }
.tc-empty.on { display: block; }

/* ---------- 태그 카드 ---------- */
.tc-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 0; margin-top: 14px; }
.tc-grid .tg-sep { display: none; }
.tc-grid .tg-item { position: relative; display: flex; align-items: center; gap: 10px; width: auto; min-height: 58px; padding: 10px 12px 14px 12px; border-radius: 18px; border: 1px solid var(--tg-line); background: #fff; overflow: hidden; transition: opacity .5s var(--tg-ease), transform .5s var(--tg-ease), box-shadow .3s, border-color .25s; transition-delay: calc(min(var(--i, 1), 30) * 18ms); }
.tc-js .tc-grid .tg-item { opacity: 0; transform: translateY(14px); }
.tc-js .tc-grid .tg-item.in { opacity: 1; transform: none; }
.tc-grid .tg-item:hover { border-color: var(--tg-tint3); box-shadow: var(--tg-shadow-h); transform: translateY(-3px); transition-delay: 0s; }
.tc-grid .tg-item.hide { display: none; }
.tc-grid .tg-rank { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: var(--tg-tint-l); color: var(--tg-main-d); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tc-grid .tg-rank img { display: none; }
.tc-grid .tg-item.r10 .tg-rank { background: var(--tg-main); color: #fff; }
.tc-grid .tg-name { flex: 1; min-width: 0; }
.tc-grid .tg-name a { display: block; text-decoration: none; }
.tc-grid .tg-name h2, .tc-grid .tg-name h3, .tc-grid .tg-name h4 { margin: 0; font-size: 16px !important; font-weight: 700; color: var(--tg-deep) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.tc-grid .tg-name h3, .tc-grid .tg-name h4 { font-weight: 600; color: var(--tg-text) !important; }
.tc-grid .tg-item:hover .tg-name h2, .tc-grid .tg-item:hover .tg-name h3, .tc-grid .tg-item:hover .tg-name h4 { color: var(--tg-main-d) !important; }
.tc-grid .tg-plus { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: var(--tg-muted) !important; font-size: 13px; text-decoration: none; transition: background .2s, color .2s; }
.tc-grid .tg-plus:hover { background: var(--tg-tint); color: var(--tg-main-d) !important; }
.tc-bar { position: absolute; left: 12px; right: 12px; bottom: 7px; height: 4px; border-radius: 4px; background: var(--tg-tint-l); overflow: hidden; }
.tc-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--tg-main-l), var(--tg-main)); transition: width 1.1s var(--tg-ease); }
.tc-book-list .tc-bar i { background: linear-gradient(90deg, #FFB199, var(--tg-accent)); }
.tc-book-list .tg-item.r10 .tg-rank { background: var(--tg-accent); }
.tc-book-list .tg-rank { background: var(--tg-accent-tint); color: var(--tg-accent-d); }

/* 1~3위 : 크게 */
.tc-grid .tg-item.top { grid-column: span 2; min-height: 92px; padding: 16px 18px 20px; background: linear-gradient(135deg, #fff 0%, var(--tg-tint-l) 100%); border-color: var(--tg-tint2); }
.tc-book-list .tg-item.top { background: linear-gradient(135deg, #fff 0%, var(--tg-accent-tint) 100%); border-color: #FFD3C2; }
.tc-grid .tg-item.top .tg-rank { width: 46px; height: 46px; border-radius: 16px; font-size: 20px; box-shadow: 0 8px 16px rgba(var(--tg-main-rgb), .28); }
.tc-grid .tg-item.top .tg-name h2 { font-size: 21px !important; }
.tc-grid .tg-item.top .tg-rank::after { content: ""; position: absolute; }
.tc-grid .tg-item.top .tc-bar { left: 18px; right: 18px; bottom: 10px; height: 6px; }

/* 더보기(101~150위) 영역 */
.tc-grid #dv150 { grid-column: 1 / -1; }
.tc-grid > div[style*="clear:both"] { grid-column: 1 / -1; text-align: center; padding: 6px !important; width: auto !important; }

/* ---------- PPT 카드 나타나기 ---------- */
.pt-list .pt-item { transition: opacity .55s var(--tg-ease), transform .55s var(--tg-ease), box-shadow .3s, border-color .25s; transition-delay: calc(min(var(--i, 1), 12) * 40ms); }
.tc-js .pt-list .pt-item { opacity: 0; transform: translateY(16px) scale(.98); }
.tc-js .pt-list .pt-item.in { opacity: 1; transform: none; }
.pt-list .pt-item.in:hover { transform: translateY(-4px); transition-delay: 0s; }
.pt-list .pt-item.hide { display: none; }

/* ---------- 반응형 ---------- */
@media screen and (max-width: 860px) {
	.tc-hero { grid-template-columns: 1fr; padding: 24px 22px; }
	.tc-art { position: absolute; right: 14px; top: 14px; width: 96px; opacity: .9; }
	.tc-hero h1 { font-size: 26px; padding-right: 90px; }
	.tc-desc { font-size: 15px; }
	}
@media screen and (max-width: 560px) {
	.tc-hero { border-radius: 20px; padding: 20px 16px; }
	.tc-hero h1 { font-size: 22px; padding-right: 70px; }
	.tc-art { width: 70px; }
	.tc-stat { padding: 8px 12px; font-size: 13px; }
	.tc-stat b { font-size: 18px; }
	.tc-filter { flex-basis: 100%; }
	.tc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.tc-grid .tg-item.top { grid-column: span 2; }
	.tc-grid .tg-name h2, .tc-grid .tg-name h3, .tc-grid .tg-name h4 { font-size: 14px !important; }
	.tc-grid .tg-plus { display: none; }
	}
@media (prefers-reduced-motion: reduce) {
	.tc-hero::before, .tc-hero::after, .tc-art, .tc-eyebrow i { animation: none; }
	.tc-grid .tg-item, .pt-list .pt-item { opacity: 1; transform: none; transition: none; }
	}
