/* BASIC css start */
/* ============================================================
   THELABCOMM — 모바일 CSS
   thelabcomm.mobile.css
============================================================ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

#tlcRoot {
  --navy:   #0C025B;
  --navy2:  #080142;
  --lt:     #f0eeff;
  --border: #e5e7eb;
  --text:   #111827;
  --sub:    #6b7280;
  --muted:  #9ca3af;
  --bg:     #ffffff;
  --soft:   #f9fafb;

  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  background: var(--soft);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}
#tlcRoot * { box-sizing: border-box; }
#tlcRoot a { text-decoration: none; color: inherit; }

/* ══════════════════════════════════════
   페이지 헤더
══════════════════════════════════════ */
.tlc-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.tlc-page-title { display: flex; flex-direction: column; gap: 1px; }
.tlc-title-main { font-size: 17px; font-weight: 900; color: var(--navy); letter-spacing: -.3px; }
.tlc-title-sub  { font-size: 11px; color: var(--muted); }
.tlc-write-btn {
  height: 34px; padding: 0 14px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  white-space: nowrap; flex-shrink: 0;
}
.tlc-write-btn:active { background: var(--navy2); }

/* ══════════════════════════════════════
   필터 바 (글 유형)
══════════════════════════════════════ */
.tlc-filter-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.tlc-filter-scroll {
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 10px 0;
}
.tlc-filter-scroll::-webkit-scrollbar { display: none; }

.tlc-filter-chip {
  flex-shrink: 0; height: 30px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 12.5px; font-weight: 600; color: var(--sub);
  background: var(--bg); cursor: pointer; font-family: inherit;
  white-space: nowrap; transition: all .12s;
}
.tlc-filter-chip.active,
.tlc-filter-chip:active {
  background: var(--navy); color: #fff;
  border-color: var(--navy); font-weight: 700;
}

/* ══════════════════════════════════════
   연구분야 필터
══════════════════════════════════════ */
.tlc-field-bar {
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  margin-bottom: 4px;
}
.tlc-field-scroll {
  display: flex; flex-wrap: nowrap; gap: 5px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 8px 0;
}
.tlc-field-scroll::-webkit-scrollbar { display: none; }

.tlc-field-chip {
  flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: var(--sub);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 3px 10px; cursor: pointer; transition: all .12s;
  white-space: nowrap;
}
.tlc-field-chip.active,
.tlc-field-chip:active {
  background: var(--lt); color: var(--navy); border-color: var(--navy);
}

/* ══════════════════════════════════════
   피드
══════════════════════════════════════ */
.tlc-feed {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--border);
}

/* 카드 */
.tlc-card {
  background: var(--bg); padding: 14px 16px;
  cursor: pointer; transition: background .1s;
}
.tlc-card:active { background: var(--lt); }
.tlc-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.tlc-card-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--lt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--navy);
  flex-shrink: 0;
}
.tlc-card-meta { flex: 1; min-width: 0; }
.tlc-card-writer { font-size: 13px; font-weight: 700; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlc-card-date   { font-size: 11px; color: var(--muted); }
.tlc-card-tag {
  font-size: 11px; font-weight: 700; color: var(--navy);
  background: var(--lt); padding: 2px 8px; border-radius: 8px;
  border: 1px solid rgba(12,2,91,.12); flex-shrink: 0;
  white-space: nowrap;
}
.tlc-card-img-wrap { border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.tlc-card-img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.tlc-card-content {
  font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tlc-card-stats { display: flex; gap: 12px; }
.tlc-card-stat  { font-size: 12px; color: var(--muted); }

/* 로딩 / 빈 상태 */
.tlc-loading, .tlc-empty {
  padding: 40px 16px; text-align: center;
  color: var(--muted); font-size: 14px;
  background: var(--bg);
}

/* ══════════════════════════════════════
   페이징
══════════════════════════════════════ */
.tlc-paging {
  display: flex; justify-content: center; gap: 4px;
  padding: 16px 0; background: var(--soft); flex-wrap: wrap;
}
.tlc-page-btn {
  min-width: 36px; height: 36px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--sub);
  background: var(--bg); cursor: pointer; font-family: inherit;
}
.tlc-page-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tlc-page-btn:active { opacity: .8; }

/* ══════════════════════════════════════
   모달 공통
══════════════════════════════════════ */
.tlc-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
}
.tlc-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
}
.tlc-modal-box {
  position: relative; background: var(--bg);
  border-radius: 16px 16px 0 0;
  width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 -4px 32px rgba(0,0,0,.2);
  padding: 0 0 40px;
}
.tlc-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.tlc-modal-head-title { font-size: 15px; font-weight: 800; color: var(--text); }
.tlc-modal-close {
  width: 30px; height: 30px;
  background: var(--soft); border: 1px solid var(--border);
  border-radius: 50%; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════
   글쓰기 폼 (모달)
══════════════════════════════════════ */
.tlc-form-box { padding-bottom: 24px; }

.tlc-form-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 16px 8px;
}
.tlc-tag-btn {
  font-size: 12px; font-weight: 600; color: var(--sub);
  background: var(--soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 11px; cursor: pointer;
  font-family: inherit; transition: all .12s;
}
.tlc-tag-btn:active, .tlc-tag-btn.selected {
  background: var(--navy); color: #fff; border-color: var(--navy);
}

.tlc-form-textarea {
  width: 100%; min-height: 120px; padding: 12px 16px;
  border: none; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-family: inherit; line-height: 1.7;
  resize: none; outline: none; background: var(--bg);
}

.tlc-img-attach {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
}
.tlc-img-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 12px;
  background: var(--soft); border: 1px solid var(--border);
  border-radius: 20px; font-size: 12px; color: var(--sub);
  cursor: pointer; font-family: inherit;
}
.tlc-img-btn:active { border-color: var(--navy); color: var(--navy); }
.tlc-img-name  { font-size: 11.5px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlc-img-remove {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fee2e2; border: none; color: #ef4444;
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tlc-img-preview { margin: 0 16px 8px; border-radius: 8px; overflow: hidden; }
.tlc-img-preview img { width: 100%; max-height: 200px; object-fit: cover; display: block; }

.tlc-form-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 16px 0;
}
.tlc-cancel-btn {
  height: 40px; padding: 0 18px; background: var(--bg); color: var(--sub);
  border: 1px solid var(--border); border-radius: 20px; cursor: pointer;
  font-size: 14px; font-family: inherit;
}
.tlc-submit-btn {
  height: 40px; padding: 0 24px; background: var(--navy); color: #fff;
  border: none; border-radius: 20px; cursor: pointer;
  font-size: 14px; font-weight: 700; font-family: inherit;
}
.tlc-submit-btn:active { background: var(--navy2); }

/* ══════════════════════════════════════
   포스트 상세 (모달)
══════════════════════════════════════ */
.tlc-modal-body { padding: 16px; }

.tlc-modal-writer { font-size: 14px; font-weight: 700; color: var(--text); }
.tlc-modal-date   { font-size: 11.5px; color: var(--muted); }
.tlc-modal-tag    { font-size: 11.5px; font-weight: 700; color: var(--navy); background: var(--lt); padding: 2px 8px; border-radius: 8px; }
.tlc-modal-img    { width: 100%; border-radius: 8px; margin-bottom: 12px; display: block; }
.tlc-modal-content {
  font-size: 14.5px; line-height: 1.85; color: var(--text);
  padding: 14px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 12px 0; white-space: pre-wrap;
}
.tlc-modal-stats  { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; align-items: center; }
.tlc-modal-like-btn {
  background: none; border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 12px; font-size: 13px; color: var(--sub); cursor: pointer;
  font-family: inherit;
}
.tlc-modal-like-btn:active { border-color: var(--navy); color: var(--navy); }

/* 댓글 */
.tlc-comments { margin-top: 16px; }
.tlc-comment-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.tlc-comment-item { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.tlc-comment-item:last-child { border-bottom: none; }
.tlc-comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--lt); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--navy); flex-shrink: 0;
}
.tlc-comment-writer { font-size: 12.5px; font-weight: 700; color: var(--text); }
.tlc-comment-date   { font-size: 11px; color: var(--muted); margin-left: 5px; }
.tlc-comment-body   { font-size: 13px; line-height: 1.6; color: var(--text); margin-top: 2px; }

.tlc-comment-form {
  display: flex; gap: 8px; margin-top: 12px; align-items: flex-end;
}
.tlc-comment-input {
  flex: 1; min-height: 52px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; font-family: inherit; resize: none; outline: none;
}
.tlc-comment-input:focus { border-color: var(--navy); }
.tlc-comment-submit {
  height: 52px; padding: 0 14px; background: var(--navy); color: #fff;
  border: none; border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.tlc-comment-submit:active { background: var(--navy2); }
/* BASIC css end */

