/* BASIC css start */
/* ═══════════════════════════════════════════════
   더랩 과학뉴스 — tlnews.mobile.css
   ═══════════════════════════════════════════════ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

#tln-root {
  --navy:    #0C025B;
  --navy2:   #080142;
  --border:  #e5e7eb;
  --border2: #d1d5db;
  --text:    #111827;
  --text2:   #374151;
  --muted:   #6b7280;
  --muted2:  #9ca3af;
  --bg:      #f7f8fc;
  --surface: #ffffff;
  --lt:      #f0eeff;

  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
#tln-root * { box-sizing: border-box; }
#tln-root a { text-decoration: none; color: inherit; }

/* ══════════════════════════════════════
   페이지 타이틀
══════════════════════════════════════ */
.tln-page-head {
  background: var(--surface);
  border-bottom: 2px solid var(--navy);
  padding: 14px 16px 12px;
}
.tln-page-head-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.tln-page-title {
  display: flex; align-items: center; gap: 8px;
}
.tln-title-main {
  font-size: 18px; font-weight: 900; color: var(--navy);
  letter-spacing: -0.03em;
}
.tln-live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; color: #16a34a;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 20px; padding: 2px 8px;
}
.tln-live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: #16a34a;
  animation: tln-pulse 2s ease-in-out infinite;
}
@keyframes tln-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.tln-page-date {
  font-size: 11px; color: var(--muted2);
  white-space: nowrap;
}

/* ══════════════════════════════════════
   툴바 — 2행
══════════════════════════════════════ */
.tln-toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* 1행: 카테고리 탭 */
.tln-toolbar-inner {
  padding: 0 16px;
  overflow-x: auto; scrollbar-width: none;
}
.tln-toolbar-inner::-webkit-scrollbar { display: none; }

.tln-cats {
  display: flex; flex-wrap: nowrap;
  min-width: max-content;
}
.tln-cat {
  padding: 10px 13px; font-size: 13px; font-weight: 600;
  color: var(--muted); border: none; background: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap; font-family: 'Pretendard', sans-serif;
  transition: color .15s, border-color .15s;
}
.tln-cat:hover { color: var(--navy); }
.tln-cat.active { color: var(--navy); border-bottom-color: var(--navy); }

/* 2행: 언어필터 + 검색 */
.tln-toolbar-sub {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}
.tln-lang {
  display: flex; border: 1px solid var(--border2);
  border-radius: 6px; overflow: hidden; flex-shrink: 0;
}
.tln-lang-btn {
  padding: 4px 10px; font-size: 12px; font-weight: 600;
  color: var(--muted); background: none; border: none; cursor: pointer;
  font-family: 'Pretendard', sans-serif; white-space: nowrap;
  transition: all .12s;
}
.tln-lang-btn:not(:last-child) { border-right: 1px solid var(--border2); }
.tln-lang-btn.active { background: var(--navy); color: #fff; }

.tln-search {
  flex: 1; height: 30px; padding: 0 10px;
  border: 1px solid var(--border2); border-radius: 6px;
  font-size: 13px; color: var(--text); outline: none;
  font-family: 'Pretendard', sans-serif;
  background: var(--surface);
}
.tln-search:focus { border-color: var(--navy); }

/* ══════════════════════════════════════
   본문
══════════════════════════════════════ */
.tln-body {
  padding: 16px 16px 80px;
}

/* 섹션 헤더 */
.tln-section-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
}
.tln-section-title {
  font-size: 14px; font-weight: 800; color: var(--navy);
}
.tln-section-count {
  font-size: 11px; color: var(--muted2);
}

/* ══════════════════════════════════════
   히어로 슬라이더
══════════════════════════════════════ */
.tln-hero-slider {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px;
}
.tln-hero-slider::-webkit-scrollbar { display: none; }

/* 히어로 카드 */
.tln-hero-card {
  flex-shrink: 0;
  width: calc(100vw - 48px); max-width: 340px;
  scroll-snap-align: start;
  border-radius: 10px; overflow: hidden;
  position: relative; min-height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #1a1a2e;
}
.tln-hero-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.tln-hero-card-dim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.tln-hero-card-body {
  position: relative; z-index: 1; padding: 16px;
}
.tln-hero-card-badges {
  display: flex; gap: 5px; margin-bottom: 7px;
}
.tln-hero-card-title {
  font-size: 15px; font-weight: 800; color: #fff; line-height: 1.35;
  letter-spacing: -0.02em; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tln-hero-card-foot {
  font-size: 11px; color: rgba(255,255,255,.5);
  display: flex; gap: 5px; align-items: center;
}
.tln-hero-card-src { font-weight: 700; }

/* ══════════════════════════════════════
   리스트
══════════════════════════════════════ */
.tln-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.tln-list-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.tln-list-item:last-child { border-bottom: none; }
.tln-list-item:active { background: var(--lt); }

.tln-list-thumb {
  width: 76px; height: 58px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0; background: var(--bg);
}
.tln-list-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tln-list-body { flex: 1; min-width: 0; }
.tln-list-badges { display: flex; gap: 4px; margin-bottom: 5px; }
.tln-list-title {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  line-height: 1.4; letter-spacing: -0.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px;
}
.tln-list-item:active .tln-list-title { color: var(--navy); }
.tln-list-sum {
  font-size: 11.5px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.tln-list-foot {
  display: flex; align-items: center; gap: 5px;
  margin-top: 5px; font-size: 11px; color: var(--muted2);
}
.tln-list-src { font-weight: 700; color: var(--muted); }

/* ══════════════════════════════════════
   배지
══════════════════════════════════════ */
.tln-badge {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.tln-badge-life    { background: #ede9fe; color: #5b21b6; }
.tln-badge-matter  { background: #fef9c3; color: #854d0e; }
.tln-badge-energy  { background: #dbeafe; color: #1e40af; }
.tln-badge-tech    { background: #fee2e2; color: #991b1b; }
.tln-badge-science { background: #ecfdf5; color: #065f46; }
.tln-badge-general { background: #ecfdf5; color: #065f46; }
.tln-badge-ko { background: #dbeafe; color: #1e40af; }
.tln-badge-en { background: #f3f4f6; color: #6b7280; }
.tln-badge-dk {
  padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,.18); color: rgba(255,255,255,.9);
}
.tln-badge-dk-lang {
  padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.6);
}

/* ══════════════════════════════════════
   더 보기 / 빈 상태 / 스켈레톤
══════════════════════════════════════ */
.tln-more-wrap { text-align: center; padding: 20px 0 0; }
.tln-more-btn {
  display: inline-flex; align-items: center;
  padding: 10px 36px; border: 1px solid var(--border2); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text2);
  background: var(--surface); cursor: pointer;
  font-family: 'Pretendard', sans-serif; transition: all .15s;
}
.tln-more-btn:active { border-color: var(--navy); color: var(--navy); background: var(--lt); }
.tln-more-btn:disabled { opacity: .4; cursor: not-allowed; }

.tln-empty {
  text-align: center; padding: 40px 20px;
  color: var(--muted2); font-size: 13px;
}

/* 스켈레톤 */
.tln-skel {
  background: linear-gradient(90deg, #f0f0f4 25%, #e8e8ee 50%, #f0f0f4 75%);
  background-size: 200% 100%;
  animation: tln-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes tln-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.tln-skel-hero {
  flex-shrink: 0;
  width: calc(100vw - 48px); max-width: 340px;
  height: 200px; border-radius: 10px;
}
.tln-skel-row {
  height: 78px; margin: 1px 0;
  border-radius: 0;
}
.tln-skel-row:first-child { border-radius: 10px 10px 0 0; }
.tln-skel-row:last-child  { border-radius: 0 0 10px 10px; }

.tln-fade { opacity: 0; transform: translateY(8px); animation: tln-fade .35s ease forwards; }
@keyframes tln-fade { to { opacity: 1; transform: translateY(0); } }
/* BASIC css end */

