/* ============================================================
   main.css — FunFeed 통합 스타일시트
   구조: 1.변수/리셋 2.공통컴포넌트 3.레이아웃 4.포스트카드
         5.페이지별 6.알림 7.프로필 8.검색 9.로그인
         10.업로드 11.404 12.반응형
   ============================================================ */

/* ── 1. CSS 변수 & 리셋 ─────────────────────────────────── */
:root {
  --tf: 0.15s ease;
  --t:  0.25s ease;
  --ts: 0.4s ease;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-pill: 999px;
  --nav-h:  58px;
  --bot-h:  62px;
}

[data-theme="dark"] {
  --bg:       #0e0e0e;
  --bg-l:     #161616;
  --bg-card:  #1c1c1c;
  --bg-ch:    #222222;
  --bg-in:    #222222;
  --bg-tag:   #2a2a2a;
  --border:   #2e2e2e;
  --bh:       #444444;
  --tx:       #f2f2f2;
  --tx2:      #999999;
  --txm:      #555555;
  --acc:      #ff6314;
  --acc-d:    rgba(255,99,20,0.15);
  --acc-h:    #ff7a30;
  --blue:     #5b9cf6;
  --green:    #4caf7d;
  --purple:   #a78bfa;
  --sh-sm:    0 2px 8px rgba(0,0,0,0.4);
  --sh-md:    0 6px 24px rgba(0,0,0,0.55);
  --sh-lg:    0 12px 40px rgba(0,0,0,0.7);
  --glass:    rgba(14,14,14,0.92);
  --drawer:   #111111;
  --overlay:  rgba(0,0,0,0.7);
}

[data-theme="light"] {
  --bg:       #f0f0f0;
  --bg-l:     #e8e8e8;
  --bg-card:  #ffffff;
  --bg-ch:    #fafafa;
  --bg-in:    #f4f4f4;
  --bg-tag:   #eeeeee;
  --border:   #e0e0e0;
  --bh:       #bbbbbb;
  --tx:       #111111;
  --tx2:      #555555;
  --txm:      #aaaaaa;
  --acc:      #f05a0e;
  --acc-d:    rgba(240,90,14,0.1);
  --acc-h:    #d94e00;
  --blue:     #2563eb;
  --green:    #16a34a;
  --purple:   #7c3aed;
  --sh-sm:    0 1px 4px rgba(0,0,0,0.06);
  --sh-md:    0 4px 16px rgba(0,0,0,0.1);
  --sh-lg:    0 8px 32px rgba(0,0,0,0.14);
  --glass:    rgba(255,255,255,0.95);
  --drawer:   #ffffff;
  --overlay:  rgba(0,0,0,0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Barlow', system-ui, sans-serif;
  background: var(--bg); color: var(--tx);
  min-height: 100vh;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bh); border-radius: 3px; }

/* 테마 아이콘 */
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }
.icon-sun, .icon-moon { display: flex; align-items: center; }

/* ── 2. 공통 컴포넌트 ────────────────────────────────────── */

/* 로고 */
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 3px;
  color: var(--acc); user-select: none; white-space: nowrap;
}

/* 버튼 공통 */
.btn-primary {
  background: var(--acc); color: #fff;
  border: none; padding: 7px 15px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 700;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t), transform var(--tf);
  text-decoration: none;
}
.btn-primary:hover { background: var(--acc-h); transform: translateY(-1px); }

.btn-secondary {
  background: transparent; color: var(--tx);
  border: 1.5px solid var(--border);
  padding: 6px 15px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t), border-color var(--t);
  text-decoration: none;
}
.btn-secondary:hover { background: var(--bg-tag); border-color: var(--bh); }

.w-full { width: 100%; justify-content: center; }

/* 아이콘 버튼 */
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg-tag); border: 1px solid var(--border);
  border-radius: var(--r-pill); color: var(--tx2);
  transition: background var(--t), color var(--t), transform var(--tf);
}
.icon-btn:hover { background: var(--border); color: var(--tx); transform: scale(1.05); }
.icon-btn.active-nav { color: var(--acc); }

/* 팔로우 버튼 */
.btn-follow {
  background: var(--acc); color: #fff; border: none;
  padding: 5px 12px; border-radius: var(--r-sm);
  font-family: inherit; font-size: 12px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  transition: background var(--t), transform var(--tf);
}
.btn-follow:hover { background: var(--acc-h); transform: scale(1.04); }
.btn-follow.followed {
  background: var(--bg-tag); color: var(--tx2);
  border: 1.5px solid var(--border);
}
.btn-follow.followed:hover { border-color: var(--acc); color: var(--acc); }

/* 알림 배지 */
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--acc); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; pointer-events: none;
  border: 2px solid var(--bg);
}
.drawer-badge {
  background: var(--acc); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: var(--r-pill); margin-left: auto;
}

/* 토스트 */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--tx); border-radius: var(--r-md);
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  box-shadow: var(--sh-md); opacity: 0;
  transition: all var(--t); pointer-events: none;
  white-space: nowrap; z-index: 500;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 빈 상태 */
.empty-state {
  text-align: center; padding: 60px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin: 16px 0;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--tx); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--txm); margin-bottom: 20px; }

/* 피드 헤더 공통 */
.feed-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px; gap: 8px; flex-wrap: wrap;
}
.feed-mode-tabs {
  display: flex; gap: 4px; background: var(--bg-tag);
  border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px;
}
.feed-mode-tab {
  padding: 6px 16px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700;
  color: var(--txm); text-decoration: none; transition: all .2s; white-space: nowrap;
}
.feed-mode-tab:hover { color: var(--tx); }
.feed-mode-tab.active { background: var(--acc); color: #fff; }
.feed-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px; letter-spacing: 1.5px; color: var(--tx);
}
.feed-count-badge {
  background: var(--bg-tag); border: 1px solid var(--border);
  color: var(--txm); font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--r-pill);
}

/* ── 3. 네비게이션 ───────────────────────────────────────── */

/* 데스크탑 네브바 */
.navbar { display: none; }

@media (min-width: 769px) {
  .navbar {
    display: flex; position: sticky; top: 0; z-index: 200;
    align-items: center; justify-content: space-between;
    height: var(--nav-h); padding: 0 20px 0 16px;
    background: var(--glass); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-sm); gap: 12px;
    transition: background var(--t), border-color var(--t);
  }
}
.nav-left { display: flex; align-items: center; gap: 24px; flex: 1; min-width: 0; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-links  { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  white-space: nowrap; font-size: 13.5px; font-weight: 600;
  color: var(--tx2); padding: 6px 11px; border-radius: var(--r-sm);
  border: none; background: none;
  transition: background var(--t), color var(--t);
}
.nav-link:hover { background: var(--bg-tag); color: var(--tx); }
.nav-link.active { color: var(--acc); }

/* 검색바 */
.search-bar {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-in); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 6px 14px; color: var(--txm);
  transition: border-color var(--t);
}
.search-bar:focus-within { border-color: var(--acc); color: var(--tx); }
.search-bar input {
  background: none; border: none; outline: none;
  font-family: inherit; font-size: 13px; color: var(--tx); width: 150px;
}
.search-bar input::placeholder { color: var(--txm); }

/* 모바일 상단바 */
.mobile-topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); padding: 0 14px;
  background: var(--glass); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  transition: transform var(--t), background var(--t);
  gap: 8px;
}
.mobile-topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mobile-menu-btn {
  display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 38px; height: 38px;
  background: var(--bg-tag); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 0 9px;
}
.mobile-menu-btn span { display: block; height: 2px; background: var(--tx); border-radius: 2px; }

/* 모바일 검색바 */
.mobile-search-bar {
  display: none; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--bg-l);
  border-bottom: 1px solid var(--border); color: var(--txm);
}
.mobile-search-bar.visible { display: flex; }
.mobile-search-bar input {
  flex: 1; background: var(--bg-in); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 8px 14px;
  font-family: inherit; font-size: 14px; color: var(--tx); outline: none;
}
.mobile-search-bar input::placeholder { color: var(--txm); }
.search-close { background: none; border: none; color: var(--txm); font-size: 16px; padding: 4px; }

/* 드로어 */
.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--overlay); z-index: 300; opacity: 0; transition: opacity var(--t);
}
.drawer-overlay.visible { display: block; opacity: 1; }

.mobile-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 400;
  background: var(--drawer); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform var(--t);
  display: flex; flex-direction: column; box-shadow: var(--sh-lg);
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.drawer-close {
  background: var(--bg-tag); border: 1px solid var(--border); color: var(--tx2);
  border-radius: var(--r-sm); width: 34px; height: 34px; font-size: 16px;
}
.drawer-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.drawer-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600; color: var(--tx2);
  transition: background var(--t), color var(--t);
}
.drawer-link:hover, .drawer-link.active { background: var(--bg-tag); color: var(--tx); }
.drawer-link.active { color: var(--acc); }
.drawer-footer { padding: 16px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

/* 모바일 하단 네브바 */
.mobile-bottom-nav { display: none; }

.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--txm); font-size: 11px; font-weight: 600;
  transition: color var(--t); position: relative;
}
.bottom-nav-item span { line-height: 1; }
.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--acc); }
.bottom-nav-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 28px; height: 2.5px;
  background: var(--acc); border-radius: 2px;
}
.bottom-upload {
  background: var(--acc); color: #fff !important;
  border-radius: 50%; width: 48px; height: 48px;
  margin-top: -10px; box-shadow: 0 4px 14px rgba(255,99,20,0.4);
  flex: 0 0 auto;
}
.bottom-upload::after { display: none; }

/* nav-icon-link (알림·저장함) */
.nav-icon-link { position: relative; }

/* ── 4. 레이아웃 & 사이드바 ──────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0,700px) 270px;
  grid-template-areas: "left feed right";
  justify-content: center; gap: 0;
  max-width: 1260px; margin: 0 auto;
  padding: 20px 12px; align-items: start;
}
.sidebar-left  { grid-area: left; }
.feed          { grid-area: feed; }
.sidebar-right { grid-area: right; }

.sidebar {
  position: sticky; top: calc(var(--nav-h) + 12px);
  padding: 0 14px; max-height: calc(100vh - var(--nav-h) - 20px);
  overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-left  { padding-right: 8px; }
.sidebar-right { padding-left: 8px; }

.sidebar-section { margin-bottom: 28px; }
.sidebar-title {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--txm); margin-bottom: 8px;
}
.sidebar-list { display: flex; flex-direction: column; gap: 1px; }
.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; color: var(--tx2);
  transition: background var(--t), color var(--t);
}
.sidebar-item:hover { background: var(--bg-tag); color: var(--tx); }
.sidebar-item.active { color: var(--acc); background: var(--acc-d); }
.sidebar-item span { font-size: 15px; line-height: 1; }

/* ── 5. 포스트 카드 ──────────────────────────────────────── */

.feed { padding: 0 8px; }

/* 카테고리 스크롤 (모바일) */
.mobile-category-scroll {
  display: none; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 4px 0 12px; -webkit-overflow-scrolling: touch;
}
.mobile-category-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  white-space: nowrap; background: var(--bg-card);
  border: 1.5px solid var(--border); color: var(--tx2);
  border-radius: var(--r-pill); padding: 7px 14px;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
  transition: all var(--tf);
}
.cat-chip:hover { border-color: var(--acc); color: var(--acc); }
.cat-chip.active { background: var(--acc); border-color: var(--acc); color: #fff; }

/* 정렬 버튼 */
.feed-sort {
  display: flex; gap: 2px; background: var(--bg-l);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px;
}
.sort-btn {
  background: none; border: none; padding: 5px 13px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; color: var(--tx2);
  transition: background var(--t), color var(--t);
}
.sort-btn:hover, .sort-btn.active { background: var(--bg-card); color: var(--tx); }
.sort-btn.active { color: var(--acc); }

/* 포스트 카드 */
.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: 14px; overflow: hidden;
  box-shadow: var(--sh-sm); animation: fadeUp 0.45s ease both;
  transition: background var(--t), border-color var(--t), box-shadow var(--t), transform var(--tf);
}
.post-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); border-color: var(--bh); }
.post-card:nth-child(1){animation-delay:.05s}
.post-card:nth-child(2){animation-delay:.1s}
.post-card:nth-child(3){animation-delay:.15s}
.post-card:nth-child(4){animation-delay:.2s}
.post-card:nth-child(5){animation-delay:.25s}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

.post-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
}
.post-meta-left, .post-meta-right { display: flex; align-items: center; gap: 8px; }
.back-btn {
  font-size: 13px; font-weight: 600; color: var(--tx2);
  padding: 4px 8px; border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.back-btn:hover { color: var(--acc); background: var(--acc-d); }

.post-tag {
  font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  background: var(--acc-d); color: var(--acc);
  padding: 3px 9px; border-radius: var(--r-sm);
}
.tag-animals    { background: rgba(76,175,125,0.12);  color: var(--green);  }
.tag-wholesome  { background: rgba(251,191,36,0.12);  color: #f59e0b; }
.tag-sports     { background: rgba(91,156,246,0.12);  color: var(--blue);   }
.tag-programming{ background: rgba(167,139,250,0.12); color: var(--purple); }

.post-author{ font-size:12px; color:var(--txm); font-weight:600; }
.post-time  { font-size:12px; color:var(--txm); }
.post-more-btn {
  background: none; border: none; color: var(--txm);
  font-size: 18px; padding: 2px 4px; border-radius: 4px; line-height: 1;
  transition: background var(--t), color var(--t);
}
.post-more-btn:hover { background: var(--bg-tag); color: var(--tx); }

.post-link { display: block; }
.post-title {
  font-size: 17px; font-weight: 700; line-height: 1.45;
  color: var(--tx); padding: 0 14px 12px;
}
.post-media { width: 100%; background: var(--bg-l); overflow: hidden; }
.post-media img {
  width: 100%; max-height: 580px; object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-media img { transform: scale(1.015); }

/* 액션 바 */
.post-actions {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 10px; border-top: 1px solid var(--border);
}
.vote-group {
  display: flex; align-items: center;
  background: var(--bg-tag); border-radius: var(--r-pill);
  overflow: hidden; flex-shrink: 0; border: 1px solid var(--border);
}
.vote-btn {
  display: flex; align-items: center; gap: 5px; background: none; border: none;
  color: var(--tx2); font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 12px; transition: color var(--t), background var(--t);
}
.vote-btn:hover { color: var(--tx); background: var(--border); }
.upvote:hover,.upvote.voted { color: var(--acc); }
.downvote:hover,.downvote.voted { color: var(--blue); }
.vote-divider { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }

@keyframes voteBounce {
  0%,100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-4px) scale(1.2); }
  70% { transform: translateY(2px) scale(0.95); }
}
.upvote.voted svg { animation: voteBounce 0.4s ease; }

.action-btn {
  display: flex; align-items: center; gap: 5px; background: none; border: none;
  color: var(--tx2); font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 7px 10px; border-radius: var(--r-pill);
  transition: color var(--t), background var(--t);
}
.action-btn:hover { background: var(--bg-tag); color: var(--tx); }
.comment-btn:hover { color: var(--green); }
.share-btn:hover   { color: var(--purple); }
.save-btn { margin-left: auto; }
.save-btn:hover, .save-btn.saved { color: var(--acc); }
.save-btn.saved svg { fill: var(--acc); stroke: var(--acc); }

/* 댓글 미리보기 */
.comment-preview-section {
  border-top: 1px solid var(--border); padding: 12px 14px;
  background: var(--bg-l);
}
.comment-preview-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.comment-preview-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--tx2);
}
.comment-view-all {
  font-size: 12px; font-weight: 700; color: var(--acc);
  transition: text-decoration var(--t); cursor: pointer;
}
.comment-view-all:hover { text-decoration: underline; }
.comment-preview-list { display: flex; flex-direction: column; gap: 7px; }
.comment-preview-item { display: flex; align-items: flex-start; gap: 8px; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.comment-preview-body { display: flex; gap: 5px; font-size: 13px; line-height: 1.4; flex-wrap: wrap; }
.comment-author { font-weight: 700; color: var(--tx); flex-shrink: 0; }
.comment-text { color: var(--tx2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 더보기 */
.load-more { text-align: center; padding: 10px 0 28px; }
.btn-load-more {
  background: var(--bg-card); border: 1.5px solid var(--border); color: var(--tx);
  font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 12px 48px; border-radius: var(--r-md);
  transition: all var(--t);
}
.btn-load-more:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-2px); }
.btn-load-more:disabled { opacity: 0.5; pointer-events: none; }

/* ── 6. 우측 사이드바 요소 ───────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--bg-tag); border: 1px solid var(--border); color: var(--tx2);
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill);
  transition: all var(--tf);
}
.tag:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-d); transform: scale(1.04); }

.creator-list { display: flex; flex-direction: column; gap: 12px; }
.creator-item { display: flex; align-items: center; gap: 10px; }
.creator-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; object-fit: cover; }
.creator-info { flex: 1; min-width: 0; }
.creator-name { font-size: 13px; font-weight: 700; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creator-stats { font-size: 11px; color: var(--txm); }
.notice-text { font-size: 11px; color: var(--txm); line-height: 1.8; }
.notice-text a { color: var(--acc); }

/* ── 7. 게시글 상세 ──────────────────────────────────────── */
.post-detail-feed { max-width: 740px; }
.post-detail-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 16px;
}
.post-detail-title {
  font-size: 22px; font-weight: 800; line-height: 1.4; color: var(--tx);
  padding: 12px 18px;
}
.post-detail-media img { width: 100%; object-fit: cover; max-height: 600px; }
.post-author-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-top: 1px solid var(--border);
}
.post-author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-author-info { flex: 1; }
.post-author-name { font-size: 14px; font-weight: 700; color: var(--tx); }
.post-author-time { font-size: 12px; color: var(--txm); display: block; }
.post-detail-actions { padding: 10px 14px; }

/* 댓글 섹션 */
.comment-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.comment-section-header { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.comment-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; color: var(--tx);
}
.comment-input-wrap {
  display: flex; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.comment-input-inner { flex: 1; }
.comment-textarea {
  width: 100%; background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px;
  font-family: inherit; font-size: 14px; color: var(--tx); outline: none;
  resize: none; min-height: 42px; transition: border-color var(--t);
}
.comment-textarea:focus { border-color: var(--acc); }
/* 멘션 자동완성 */
.mention-dropdown {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-md);
  z-index: 9999; overflow: hidden; max-height: 230px; overflow-y: auto;
}
.mention-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  cursor: pointer; transition: background .15s;
}
.mention-item:hover, .mention-active { background: var(--bg-tag); }
.mention-name { font-size: 13px; font-weight: 600; color: var(--tx); }
.mention-link { color: var(--acc); font-weight: 600; text-decoration: none; }
.mention-link:hover { text-decoration: underline; }
.comment-submit-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.comment-char-count { font-size: 12px; color: var(--txm); margin-right: auto; }
.btn-cancel-comment {
  background: none; border: 1.5px solid var(--border); color: var(--tx2);
  padding: 6px 14px; border-radius: var(--r-sm); font-family: inherit; font-size: 13px; font-weight: 700;
  transition: all var(--t);
}
.btn-cancel-comment:hover { border-color: var(--bh); color: var(--tx); }
.btn-submit-comment {
  background: var(--acc); color: #fff; border: none;
  padding: 7px 18px; border-radius: var(--r-sm); font-family: inherit; font-size: 13px; font-weight: 700;
  transition: background var(--t);
}
.btn-submit-comment:hover { background: var(--acc-h); }
.btn-submit-comment:disabled { opacity: 0.4; pointer-events: none; }

.comment-list { padding: 8px 18px 18px; }
.comment-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-body { flex: 1; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.comment-author { font-size: 13px; font-weight: 700; color: var(--tx); }
.comment-time   { font-size: 12px; color: var(--txm); }
.comment-text   { font-size: 14px; color: var(--tx2); line-height: 1.55; }
.comment-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.comment-like-btn, .comment-reply-btn, .comment-report-btn {
  background: none; border: none; color: var(--txm);
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 4px 8px; border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 4px;
  transition: color var(--t), background var(--t);
}
.comment-like-btn:hover   { color: var(--acc); background: var(--acc-d); }
.comment-reply-btn:hover  { color: var(--tx); background: var(--bg-tag); }
.comment-report-btn:hover { color: var(--acc); background: var(--acc-d); }
.comment-like-btn.liked   { color: var(--acc); }
.like-count { font-size: 12px; }

/* ── 8. 알림 페이지 ──────────────────────────────────────── */
.notif-feed { max-width: 680px; }
.unread-count-label { font-size: 13px; color: var(--txm); font-weight: 600; }
.all-read { color: var(--green); }
.btn-mark-all {
  background: var(--bg-tag); border: 1.5px solid var(--border); color: var(--tx2);
  padding: 7px 14px; border-radius: var(--r-sm); font-family: inherit;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  transition: all var(--tf);
}
.btn-mark-all:hover { border-color: var(--acc); color: var(--acc); }

.notif-filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.notif-filter {
  background: var(--bg-tag); border: 1.5px solid var(--border); color: var(--tx2);
  padding: 6px 14px; border-radius: var(--r-pill);
  font-family: inherit; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; transition: all var(--tf);
}
.notif-filter:hover { border-color: var(--acc); color: var(--acc); }
.notif-filter.active { background: var(--acc-d); border-color: var(--acc); color: var(--acc); }
.nf-count {
  background: var(--bg); color: var(--txm);
  font-size: 11px; padding: 1px 5px; border-radius: var(--r-pill);
}
.notif-date-group { margin-bottom: 4px; }
.notif-date-label {
  font-size: 12px; font-weight: 800; color: var(--txm);
  padding: 12px 0 8px; letter-spacing: 0.5px; text-transform: uppercase;
}
.notif-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: var(--r-md); cursor: pointer;
  transition: background var(--t); position: relative;
  animation: fadeUp 0.3s ease both;
}
.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { background: var(--acc-d); }
.notif-item.unread:hover { background: rgba(255,99,20,0.2); }
.notif-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.notif-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 14px; color: var(--tx); line-height: 1.5; }
.notif-time { font-size: 12px; color: var(--txm); margin-top: 3px; display: block; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); flex-shrink: 0; }
.notif-goto {
  color: var(--txm); font-size: 16px; font-weight: 700;
  padding: 6px 8px; border-radius: var(--r-sm); transition: color var(--t), background var(--t);
}
.notif-goto:hover { color: var(--acc); background: var(--bg-tag); }
.notif-empty { text-align: center; padding: 60px 20px; color: var(--tx2); }

/* ── 9. 프로필 페이지 ────────────────────────────────────── */
.profile-feed { padding: 0 !important; overflow: hidden; }
.profile-cover { width: 100%; height: 200px; position: relative; overflow: hidden; background: var(--bg-l); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-edit-btn {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.6); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); border-radius: var(--r-sm);
  padding: 6px 12px; font-family: inherit; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  backdrop-filter: blur(4px); transition: background var(--t);
}

.profile-header-bar {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 0 24px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg-card); flex-wrap: wrap;
}
.profile-avatar-wrap { position: relative; margin-top: -44px; flex-shrink: 0; }
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; border: 4px solid var(--bg-card); object-fit: cover; background: var(--bg-l); }
.avatar-edit-btn {
  position: absolute; bottom: 0; right: 0; width: 28px; height: 28px;
  border-radius: 50%; background: var(--acc); border: 2px solid var(--bg-card);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.profile-header-info { flex: 1; min-width: 0; padding-top: 12px; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.profile-name { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 1px; }
.edit-name-btn {
  background: none; border: 1px solid var(--border); color: var(--txm);
  padding: 3px 8px; border-radius: var(--r-sm); font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px; transition: all var(--tf);
}
.edit-name-btn:hover { border-color: var(--acc); color: var(--acc); }
.profile-bio  { font-size: 14px; color: var(--tx2); line-height: 1.5; margin-bottom: 6px; }
.profile-joined { font-size: 12px; color: var(--txm); margin-top: 6px; }
.profile-header-actions { display: flex; gap: 8px; align-items: center; padding-top: 12px; flex-wrap: wrap; }

.profile-stats-bar { display: flex; background: var(--bg-card); border-bottom: 1px solid var(--border); overflow-x: auto; }
.pstat-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 8px; border-right: 1px solid var(--border); min-width: 80px;
  transition: background var(--t);
}
.pstat-item:last-child { border-right: none; }
.pstat-item:hover { background: var(--bg-l); }
.pstat-link { text-decoration: none; cursor: pointer; }
.pstat-link:hover .pstat-num { color: var(--acc); }
.pstat-link:hover .pstat-label { color: var(--acc); }
.pstat-num { font-size: 20px; font-weight: 800; color: var(--tx); }
.pstat-label { font-size: 11px; color: var(--txm); font-weight: 600; margin-top: 2px; }

.profile-tabs { display: flex; background: var(--bg-card); border-bottom: 1px solid var(--border); overflow-x: auto; }
.profile-tab {
  flex-shrink: 0; background: none; border: none; border-bottom: 3px solid transparent;
  padding: 14px 20px; margin-bottom: -1px; font-family: inherit; font-size: 14px; font-weight: 700;
  color: var(--txm); display: flex; align-items: center; gap: 6px;
  transition: color var(--t), border-color var(--t); text-decoration: none;
}
.profile-tab:hover { color: var(--tx); }
.profile-tab.active { color: var(--acc); border-bottom-color: var(--acc); }
.tab-count {
  background: var(--bg-tag); color: var(--txm);
  font-size: 11px; padding: 2px 6px; border-radius: var(--r-pill);
}
.profile-tab.active .tab-count { background: var(--acc-d); color: var(--acc); }

.profile-tab-content { padding: 20px; background: var(--bg); min-height: 300px; }

.mini-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mini-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; display: block; color: inherit;
  transition: transform var(--t), box-shadow var(--t);
}
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.mini-card-img { aspect-ratio: 16/10; overflow: hidden; }
.mini-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.mini-card:hover .mini-card-img img { transform: scale(1.04); }
.mini-card-info { padding: 10px 12px; }
.mini-card-title { font-size: 13px; font-weight: 600; color: var(--tx); margin: 6px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-card-stats { display: flex; gap: 12px; font-size: 12px; color: var(--txm); font-weight: 600; }

/* 설정 패널 */
.settings-panel { max-width: 500px; }
.settings-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; }
.settings-section-title { font-size: 14px; font-weight: 800; color: var(--tx2); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row-info { display: flex; flex-direction: column; gap: 2px; }
.settings-row-info span { font-size: 14px; font-weight: 600; color: var(--tx); }
.settings-row-info small { font-size: 12px; color: var(--txm); }
.theme-toggle-switch { display: flex; gap: 4px; }
.theme-opt {
  background: var(--bg-in); border: 1.5px solid var(--border); color: var(--txm);
  padding: 6px 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700;
  font-family: inherit; transition: all var(--tf);
}
.theme-opt.active { background: var(--acc-d); border-color: var(--acc); color: var(--acc); }
.settings-select {
  background: var(--bg-in); border: 1.5px solid var(--border); color: var(--tx);
  padding: 6px 10px; border-radius: var(--r-sm); font-size: 13px; font-family: inherit;
}
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: background var(--t); }
.toggle-slider::before { content:''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--t); }
.toggle-switch input:checked + .toggle-slider { background: var(--acc); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.settings-danger { border-color: rgba(255,99,20,0.3); }
.settings-danger-btn {
  width: 100%; background: none; border: 1.5px solid var(--border); color: var(--tx2);
  padding: 10px; border-radius: var(--r-md); font-family: inherit; font-size: 13px; font-weight: 700;
  margin-bottom: 8px; transition: all var(--tf); cursor: pointer;
}
.settings-danger-btn:last-child { margin-bottom: 0; }
.settings-danger-btn:hover { border-color: var(--acc); color: var(--acc); }
.blocked-user-list { display: flex; flex-direction: column; gap: 8px; }

.blocked-user-list { display: flex; flex-direction: column; gap: 8px; }
.blocked-user-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); gap: 12px;
  transition: opacity .3s, transform .3s;
}
.blocked-user-link { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 1; min-width: 0; }
.blocked-user-name { font-size: 14px; font-weight: 600; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-unblock {
  padding: 5px 12px; border-radius: 14px; font-size: 12px; font-weight: 600;
  background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.3);
  cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background .2s;
}
.btn-unblock:hover { background: rgba(239,68,68,0.2); }

/* ── 10. 검색 페이지 ─────────────────────────────────────── */
.search-feed { max-width: 740px; }
.search-home { padding: 16px 0; }
.search-hero { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px 28px; margin-bottom: 24px; }
.search-hero-title { font-family: 'Bebas Neue', sans-serif; font-size: 38px; letter-spacing: 2px; margin-bottom: 20px; }
.search-input-big {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-in); border: 2px solid var(--border);
  border-radius: var(--r-lg); padding: 12px 16px;
  transition: border-color var(--t); margin-bottom: 20px;
}
.search-input-big:focus-within { border-color: var(--acc); }
.search-input-big.compact { padding: 9px 14px; border-radius: var(--r-md); margin-bottom: 0; border-width: 1.5px; }
.search-input-big input { flex: 1; background: none; border: none; outline: none; font-family: inherit; font-size: 16px; color: var(--tx); }
.search-input-big.compact input { font-size: 14px; }
.search-input-big input::placeholder { color: var(--txm); }
.trending-label { font-size: 13px; font-weight: 700; color: var(--txm); margin-bottom: 10px; display: block; }
.trending-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.trend-chip {
  background: var(--bg-tag); border: 1px solid var(--border); color: var(--tx2);
  padding: 6px 14px; border-radius: var(--r-pill); font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all var(--tf);
}
.trend-chip:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-d); }

.cat-browse-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.section-mini-title { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 1px; margin-bottom: 16px; color: var(--tx2); }
.cat-browse-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-browse-item {
  background: var(--cat-bg, var(--bg-l)); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px 12px; cursor: pointer;
  font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; transition: transform var(--t), box-shadow var(--t);
}
.cat-browse-item:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--acc); }
.cat-browse-emoji { font-size: 28px; }
.cat-browse-name  { font-size: 13px; font-weight: 700; color: var(--tx); }

.search-results-header { margin-bottom: 0; }
.search-input-row { padding: 12px 0; }
.result-count { font-size: 14px; color: var(--tx2); display: block; padding: 0 0 10px; }
.result-count strong { color: var(--tx); }
.count-num { color: var(--acc); font-weight: 800; }

.search-empty { text-align: center; padding: 60px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--tx2); }
.empty-icon-big { font-size: 60px; margin-bottom: 16px; }
.search-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.search-empty p  { font-size: 14px; color: var(--txm); margin-bottom: 16px; }

/* ── 11. 로그인 페이지 ───────────────────────────────────── */
.login-page { display: grid; grid-template-columns: 1fr 500px; min-height: 100vh; }
.login-brand {
  background: linear-gradient(135deg,#0e0e0e 0%,#1a1010 50%,#1c1010 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="light"] .login-brand { background: linear-gradient(135deg,#1a1a1a 0%,#2d1b0e 50%,#1a0e0e 100%); }
.login-brand::before {
  content:''; position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,99,20,0.15) 0%,transparent 70%);
  top: -100px; left: -100px;
}
.login-brand::after {
  content:''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,99,20,0.08) 0%,transparent 70%);
  bottom: -80px; right: -80px;
}
.brand-inner { position: relative; z-index: 1; padding: 48px; max-width: 440px; }
.brand-logo { font-size: 52px; letter-spacing: 6px; display: block; margin-bottom: 20px; }
.brand-tagline { font-size: 28px; font-weight: 800; color: #fff; line-height: 1.4; margin-bottom: 36px; }
.brand-stats { display: flex; gap: 28px; margin-bottom: 40px; }
.brand-stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--acc); }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; }
.brand-preview { position: relative; height: 160px; }
.preview-card-mini { position: absolute; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.5); width: 200px; }
.preview-card-mini img { width: 100%; height: 120px; object-fit: cover; display: block; }
.preview-card-mini:first-child { left:0; top:0; transform: rotate(-3deg); }
.preview-card-mini.offset { left:140px; top:20px; transform: rotate(3deg); z-index:1; }

.login-form-panel { background: var(--bg-card); display: flex; align-items: center; justify-content: center; padding: 40px 32px; border-left: 1px solid var(--border); }
.login-form-wrap { width: 100%; max-width: 360px; }

.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.auth-tab { flex: 1; background: none; border: none; padding: 12px; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--txm); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color var(--t), border-color var(--t); }
.auth-tab.active { color: var(--acc); border-bottom-color: var(--acc); }

.social-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-in); color: var(--tx); font-family: inherit; text-decoration: none;
  font-size: 14px; font-weight: 600; transition: all var(--tf); cursor: pointer;
}
.social-btn:hover { border-color: var(--bh); background: var(--bg-tag); transform: translateY(-1px); }
.social-btn:active { transform: translateY(0); }

/* Google */
.social-btn.google { border-color: #dadce0; }
[data-theme="dark"] .social-btn.google { border-color: #5f6368; }
.social-btn.google:hover { border-color: #1a73e8; box-shadow: 0 1px 6px rgba(26,115,232,.25); }

/* Apple */
.social-btn.apple { background: #000; border-color: #000; color: #fff; }
[data-theme="light"] .social-btn.apple { background: #000; color: #fff; }
.social-btn.apple:hover { background: #1d1d1f; border-color: #1d1d1f; box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* 설정 미완료 상태 */
.social-btn.social-btn-demo { opacity: .7; cursor: not-allowed; }
.social-btn.social-btn-demo:hover { transform: none; box-shadow: none; }
.badge-setup {
  margin-left: auto; font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; background: rgba(255,150,0,.18); color: #f90;
  border: 1px solid rgba(255,150,0,.35);
}

/* 에러 배너 */
.auth-error-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 18px;
  background: rgba(255,59,48,.12); color: #ff453a;
  border: 1px solid rgba(255,59,48,.3); font-size: 13px; font-weight: 500;
}

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before,.divider::after { content:''; flex:1; height:1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--txm); font-weight: 600; }

.auth-form.hidden { display: none; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--tx2); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.auth-input {
  width: 100%; background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px; font-family: inherit;
  font-size: 14px; color: var(--tx); outline: none; transition: border-color var(--t);
}
.auth-input::placeholder { color: var(--txm); }
.auth-input:focus { border-color: var(--acc); }

.password-wrap { position: relative; }
.password-wrap .auth-input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--txm); display: flex; align-items: center; }
.forgot-link { font-size: 12px; font-weight: 600; color: var(--acc); }
.forgot-link:hover { text-decoration: underline; }
.input-check-wrap { display: flex; gap: 8px; }
.btn-check-dup {
  flex-shrink: 0; background: var(--bg-tag); border: 1.5px solid var(--border); color: var(--tx2);
  padding: 0 12px; border-radius: var(--r-md); font-family: inherit; font-size: 12px; font-weight: 700;
  white-space: nowrap; transition: all var(--tf);
}
.btn-check-dup:hover { border-color: var(--acc); color: var(--acc); }
.field-hint { font-size: 12px; margin-top: 4px; }
.pw-strength { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pw-strength-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.pw-strength-fill { height: 100%; width: 0; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.pw-strength-label { font-size: 11px; color: var(--txm); font-weight: 600; width: 60px; text-align: right; }
.form-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.check-input { width: 16px; height: 16px; accent-color: var(--acc); margin-top: 1px; flex-shrink: 0; }
.check-label { font-size: 13px; color: var(--tx2); }
.auth-submit {
  width: 100%; background: var(--acc); color: #fff; border: none; padding: 13px;
  border-radius: var(--r-md); font-family: inherit; font-size: 15px; font-weight: 800;
  transition: background var(--t), transform var(--tf), box-shadow var(--tf);
}
.auth-submit:hover { background: var(--acc-h); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,99,20,0.4); }
.auth-submit:disabled { opacity: .6; transform: none; cursor: not-allowed; }
.login-footer-note { margin-top: 24px; font-size: 12px; color: var(--txm); text-align: center; }
.login-footer-note a { color: var(--txm); }
.login-footer-note a:hover { color: var(--acc); }
/* OAuth 설정 안내 링크 */
.oauth-setup-hint {
  margin-top: 16px; padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(255,150,0,.08); border: 1px dashed rgba(255,150,0,.3);
  font-size: 12px; color: rgba(255,150,0,.8); text-align: center;
}
.oauth-setup-hint a { color: #f90; font-weight: 700; }
.oauth-setup-hint a:hover { text-decoration: underline; }
.login-switch-note { margin-top: 16px; font-size: 13px; color: var(--txm); text-align: center; }
.link-btn { background: none; border: none; color: var(--acc); font-family: inherit; font-size: inherit; font-weight: 700; cursor: pointer; padding: 0; }

/* ── 12. 업로드 페이지 ───────────────────────────────────── */
.upload-main { max-width: 680px; margin: 0 auto; padding: 20px 16px calc(var(--bot-h) + 20px); }
.upload-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.upload-header { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.back-link { font-size: 13px; font-weight: 700; color: var(--tx2); transition: color var(--t); }
.back-link:hover { color: var(--acc); }
.upload-title { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 1px; }
.upload-form { padding: 22px; display: flex; flex-direction: column; gap: 22px; }
.upload-section { display: flex; flex-direction: column; gap: 8px; }
.upload-label { font-size: 13px; font-weight: 700; color: var(--tx2); }
.required { color: var(--acc); }
.upload-input {
  background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px; font-family: inherit;
  font-size: 14px; color: var(--tx); outline: none; transition: border-color var(--t);
}
.upload-input:focus { border-color: var(--acc); }
.upload-input::placeholder { color: var(--txm); }

.upload-media-zone {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  min-height: 200px; transition: border-color var(--t); overflow: hidden;
}
.upload-media-zone.dragover { border-color: var(--acc); background: var(--acc-d); }
.upload-drop-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 12px; }
.upload-drop-icon { color: var(--txm); }
.upload-drop-text { font-size: 15px; font-weight: 600; color: var(--tx2); text-align: center; }
.upload-file-label { color: var(--acc); cursor: pointer; }
.upload-file-label:hover { text-decoration: underline; }
.upload-drop-hint { font-size: 13px; color: var(--txm); }
.upload-preview { position: relative; }
.upload-preview img { width: 100%; max-height: 400px; object-fit: cover; display: block; }
.remove-preview {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.btn-url-preview {
  background: var(--bg-tag); border: 1.5px solid var(--border); color: var(--tx2);
  padding: 8px 16px; border-radius: var(--r-sm); font-family: inherit;
  font-size: 13px; font-weight: 700; transition: all var(--tf); align-self: flex-start;
}
.btn-url-preview:hover { border-color: var(--acc); color: var(--acc); }
.title-char-count { font-size: 12px; color: var(--txm); text-align: right; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); font-family: inherit; font-size: 12px; font-weight: 700; color: var(--tx2);
  transition: all var(--tf); cursor: pointer;
}
.cat-option:hover { border-color: var(--acc); color: var(--acc); }
.cat-option.selected { border-color: var(--acc); background: var(--acc-d); color: var(--acc); }
.cat-option-emoji { font-size: 20px; }

.tag-input-wrap { background: var(--bg-in); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 8px; min-height: 44px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; transition: border-color var(--t); }
.tag-input-wrap:focus-within { border-color: var(--acc); }
.tag-item { background: var(--acc-d); color: var(--acc); border-radius: var(--r-pill); padding: 4px 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tag-remove { background: none; border: none; color: var(--acc); font-size: 14px; padding: 0; line-height: 1; }
.tag-input { border: none; background: none; outline: none; font-family: inherit; font-size: 14px; color: var(--tx); min-width: 120px; flex: 1; }
.upload-submit-row { display: flex; gap: 12px; justify-content: flex-end; padding-top: 4px; border-top: 1px solid var(--border); }
.btn-draft {
  background: var(--bg-tag); border: 1.5px solid var(--border); color: var(--tx2);
  padding: 11px 24px; border-radius: var(--r-md); font-family: inherit; font-size: 14px; font-weight: 700;
  transition: all var(--t);
}
.btn-draft:hover { border-color: var(--acc); color: var(--acc); }
.btn-submit-post {
  background: var(--acc); color: #fff; border: none;
  padding: 11px 32px; border-radius: var(--r-md); font-family: inherit; font-size: 14px; font-weight: 800;
  transition: background var(--t), transform var(--tf);
}
.btn-submit-post:hover { background: var(--acc-h); transform: translateY(-2px); }
.btn-submit-post:disabled { opacity: 0.4; pointer-events: none; }

/* ── 13. 404 페이지 ──────────────────────────────────────── */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 20px; }
.error-inner { text-align: center; max-width: 540px; }
.error-img-wrap { position: relative; display: inline-block; margin-bottom: 28px; }
.error-img { width: 260px; border-radius: var(--r-lg); box-shadow: var(--sh-lg); display: block; }
.error-badge {
  position: absolute; top: -14px; right: -14px;
  background: var(--acc); color: #fff; font-family: 'Bebas Neue', sans-serif;
  font-size: 32px; letter-spacing: 2px; padding: 6px 14px; border-radius: var(--r-md); box-shadow: var(--sh-md);
}
.error-title { font-family: 'Bebas Neue', sans-serif; font-size: 48px; letter-spacing: 2px; color: var(--tx); line-height: 1.2; margin-bottom: 14px; }
.error-desc { font-size: 15px; color: var(--tx2); line-height: 1.7; margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.error-back-btn {
  background: var(--bg-card); border: 1.5px solid var(--border); color: var(--tx2);
  padding: 11px 24px; border-radius: var(--r-md); font-family: inherit; font-size: 14px; font-weight: 700;
}
.error-back-btn:hover { border-color: var(--bh); color: var(--tx); }
.error-suggest-label { font-size: 13px; font-weight: 700; color: var(--txm); margin-bottom: 12px; text-align: center; }
.error-suggest-posts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.suggest-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: inherit; display: block; transition: transform var(--t); }
.suggest-card:hover { transform: translateY(-3px); }
.suggest-card img { width: 100%; height: 90px; object-fit: cover; display: block; }
.suggest-card-info { padding: 8px; }
.suggest-card-info p { font-size: 12px; font-weight: 600; color: var(--tx2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── 14. 반응형 ──────────────────────────────────────────── */

/* 태블릿 */
@media (max-width: 1100px) and (min-width: 769px) {
  .layout { grid-template-columns: 200px minmax(0,1fr); grid-template-areas: "left feed"; padding: 16px 12px; }
  .sidebar-right { display: none; }
  .feed { padding: 0 6px; }
}

/* 모바일 */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  .navbar { display: none !important; }
  .mobile-topbar { padding: 0 10px; gap: 8px; min-width: 0; }
  .mobile-topbar .logo { font-size: 24px; flex-shrink: 0; }
  .mobile-category-scroll { display: flex; width: 100%; max-width: 100vw; padding: 4px 10px 12px; margin: 0; }
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: var(--bot-h);
    background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); z-index: 200; transition: background var(--t);
  }
  .layout { grid-template-columns: 1fr; grid-template-areas: "feed"; padding: 10px 0 0; max-width: 100%; width: 100%; overflow-x: hidden; }
  .sidebar-left, .sidebar-right { display: none; }
  .feed { padding: 0 10px; width: 100%; min-width: 0; box-sizing: border-box; }
  .feed-header { padding: 0 0 4px; }
  .feed-title { font-size: 24px; }
  .post-card { width: 100%; min-width: 0; box-sizing: border-box; }
  .post-title { font-size: 15.5px; }
  .post-actions { padding: 6px 8px; gap: 2px; flex-wrap: nowrap; overflow: hidden; }
  .action-btn span, .share-btn span, .comment-btn span { display: none; }
  .action-btn { padding: 7px 9px; }
  .vote-group { flex-shrink: 0; }
  .vote-btn { padding: 6px 10px; }
  .vote-count { font-size: 12px; }
  .post-media img { width: 100%; max-width: 100%; height: auto; max-height: 420px; }
  .post-author { display: none; }
  .load-more { padding-bottom: calc(var(--bot-h) + 20px); }
  .toast { bottom: calc(var(--bot-h) + 14px); }

  /* 프로필 */
  .profile-header-bar { padding: 0 14px 16px; gap: 14px; }
  .profile-avatar { width: 72px; height: 72px; }
  .profile-avatar-wrap { margin-top: -36px; }
  .profile-name { font-size: 22px; }
  .pstat-item { padding: 12px 4px; min-width: 60px; }
  .pstat-num { font-size: 16px; }
  .profile-tab-content { padding: 14px; }
  .mini-card-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .settings-panel { max-width: 100%; }

  /* 검색 */
  .cat-browse-grid { grid-template-columns: repeat(2,1fr); }
  .search-hero { padding: 24px 16px; }
  .search-hero-title { font-size: 28px; }

  /* 로그인 */
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-panel { padding: 48px 24px; min-height: 100vh; border-left: none; }

  /* 업로드 */
  .category-grid { grid-template-columns: repeat(2,1fr); }
  .upload-submit-row { flex-direction: column; }
  .btn-draft, .btn-submit-post { width: 100%; }

  /* 404 */
  .error-title { font-size: 36px; }
  .error-suggest-posts { grid-template-columns: 1fr; }
}

/* ============================================================

/* ============================================================
   i18n — 언어 선택 버튼 & 드롭다운
   ============================================================ */

/* ── 네브바 언어 토글 버튼 ───────────────────────────────── */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  height: 34px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: var(--surf2);
  color: var(--tx);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  transition: var(--t);
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle-btn:hover {
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 12%, transparent);
  color: var(--acc);
}
.lang-toggle-flag { font-size: 15px; line-height: 1; }
.lang-toggle-code { font-size: 11px; font-weight: 800; letter-spacing: .5px; }

/* 모바일에서는 코드 숨김 */
@media (max-width: 768px) {
  .lang-toggle-code { display: none; }
  .lang-toggle-btn  { padding: 5px 8px; }
}

/* ── 오버레이 (드롭다운 바깥 클릭 시 닫기) ──────────────── */
.lang-overlay {
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: transparent;
  display: none;
}
.lang-overlay.visible { display: block; }

/* ── 드롭다운 패널 ───────────────────────────────────────── */
.lang-dropdown {
  display: none;
  position: absolute;     /* JS가 top/left 설정 */
  z-index: 1100;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.15);
  min-width: 240px;
  overflow: hidden;
  transform: translateY(-6px) scale(.97);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.lang-dropdown.open {
  display: block;
  transform: translateY(0) scale(1);
  opacity: 1;
  animation: langDropIn .2s ease forwards;
}
@keyframes langDropIn {
  from { transform: translateY(-8px) scale(.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* ── 드롭다운 헤더 ───────────────────────────────────────── */
.lang-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--tx2);
}
.lang-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--surf2);
  color: var(--tx2);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  flex-shrink: 0;
}
.lang-close-btn:hover { background: var(--border); color: var(--tx); }

/* ── 언어 목록 ───────────────────────────────────────────── */
.lang-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px 12px;
}

/* ── 언어 버튼 각각 ──────────────────────────────────────── */
.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 6px 8px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surf2);
  color: var(--tx2);
  cursor: pointer;
  transition: var(--t);
  min-width: 0;
}
.lang-btn:hover {
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 10%, transparent);
  color: var(--tx);
  transform: translateY(-1px);
}
.lang-btn.active {
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 18%, transparent);
  color: var(--acc);
  font-weight: 700;
}
.lang-btn-flag { font-size: 20px; line-height: 1; }
.lang-btn-code { font-size: 10px; font-weight: 800; letter-spacing: .4px; }

/* 모바일에서 바텀시트로 전환 */
@media (max-width: 768px) {
  .lang-overlay.visible {
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
  }
  .lang-dropdown {
    position: fixed !important;
    bottom: 0;
    top: auto !important;
    left: 0 !important;
    width: 100%;
    min-width: 100%;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    transform: translateY(100%);
    opacity: 1;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    animation: none;
    transition: transform .32s cubic-bezier(.32,1,.58,1);
  }
  .lang-dropdown.open {
    transform: translateY(0);
    animation: none;
  }
  .lang-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 16px 16px;
  }
  .lang-btn {
    padding: 12px 8px;
  }
  .lang-btn-flag { font-size: 24px; }
  .lang-btn-code { font-size: 11px; }
}

/* ── 모바일 드로어 구분선 ────────────────────────────────── */
.drawer-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 16px;
}

/* ============================================================
   Creator / Tag / Creators 페이지 스타일
   ============================================================ */

/* ── creator.php ──────────────────────────────────────────── */
.creator-page { padding: 0 8px; }
.creator-cover {
  width: 100%; height: 200px; border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 0; position: relative; background: var(--bg-card);
}
.creator-cover img { width:100%; height:100%; object-fit:cover; }
.creator-cover-gradient {
  width:100%; height:100%;
  background: linear-gradient(135deg, #1a0e08 0%, #0e1a1a 50%, #0a0e1a 100%);
}
.creator-profile-bar {
  display: flex; align-items: flex-start; gap: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 24px; margin-top: -40px;
  position: relative; z-index: 1;
}
.creator-avatar-wrap { position: relative; flex-shrink: 0; }
.creator-big-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid var(--bg-card); object-fit: cover;
}
.verified-badge-large {
  position: absolute; bottom: 2px; right: 2px;
  background: var(--acc); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; border: 2px solid var(--bg-card);
}
.creator-profile-info { flex: 1; min-width: 0; }
.creator-name-row { margin-bottom: 10px; }
.creator-username { font-size: 22px; font-weight: 800; color: var(--tx); line-height: 1.2; }
.creator-bio { font-size: 13px; color: var(--txm); margin-top: 4px; line-height: 1.5; }
.creator-stat-row { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.creator-stat-item { display: flex; flex-direction: column; gap: 2px; }
.cstat-link { text-decoration: none; display: flex; flex-direction: column; gap: 2px; transition: opacity .15s; }
.cstat-link:hover .cstat-num { color: var(--acc); }
.cstat-link:hover .cstat-label { color: var(--acc); opacity: .8; }
.cstat-num  { font-size: 18px; font-weight: 800; color: var(--tx); line-height: 1; }
.cstat-label{ font-size: 11px; color: var(--txm); font-weight: 600; }
.creator-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.btn-follow-large {
  padding: 10px 24px; background: var(--acc); color: #fff; border: none;
  border-radius: var(--r-md); font-family: inherit; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all var(--tf); white-space: nowrap;
}
.btn-follow-large:hover { background: var(--acc-h); transform: translateY(-1px); }
.btn-follow-large.following { background: var(--bg-tag); color: var(--tx2); border: 1.5px solid var(--border); }
.btn-block-user {
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--tx2); border: 1.5px solid var(--border);
  transition: all .2s; white-space: nowrap;
}
.btn-block-user:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.08); }
.btn-block-user.blocked { background: rgba(239,68,68,0.12); color: #ef4444; border-color: #ef4444; }
.creator-joined { font-size: 11px; color: var(--txm); }
/* 카테고리/태그 메타 */
.creator-meta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px; margin: 12px 0;
}
.creator-meta-block { flex: 1; min-width: 200px; }
.creator-meta-label { font-size: 11px; font-weight: 800; color: var(--txm); text-transform: uppercase; letter-spacing:.5px; margin-bottom: 8px; }
.creator-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip-sm {
  display: flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  background: var(--bg-tag); color: var(--tx2); text-decoration: none;
  transition: all var(--tf);
}
.cat-chip-sm:hover { background: var(--acc-d); color: var(--acc); }
.cat-chip-sm.tag-chip { font-family: monospace; }
.chip-cnt {
  background: var(--border); border-radius: 10px; padding: 1px 5px;
  font-size: 10px; font-weight: 700;
}

/* ── tag.php ──────────────────────────────────────────────── */
.tag-page { padding: 0 8px; }
.tag-hero {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  margin-bottom: 12px;
}
.tag-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,99,20,.12) 0%, transparent 60%);
}
.tag-hero-content {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 20px;
  padding: 28px 28px;
}
.tag-hero-icon {
  font-size: 40px; font-weight: 800; color: var(--acc); font-family: 'Bebas Neue', sans-serif;
  line-height: 1; flex-shrink: 0;
}
.tag-hero-title { font-size: 28px; font-weight: 800; color: var(--tx); }
.tag-hero-count { font-size: 13px; color: var(--txm); margin-top: 2px; }
.tag-related-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 12px 0; margin-bottom: 4px;
}
.tag-related-label { font-size: 12px; font-weight: 700; color: var(--txm); flex-shrink: 0; }
.tag-related-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip-related {
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: var(--bg-tag); color: var(--tx2); text-decoration: none;
  transition: all var(--tf); font-family: monospace;
}
.tag-chip-related:hover { background: var(--acc-d); color: var(--acc); }
.tag-chip-related sup { font-size: 9px; opacity: .7; }
.tag-creators-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.tag-creator-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-creator-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: var(--bg-tag); color: var(--tx2); text-decoration: none;
  transition: all var(--tf);
}
.tag-creator-chip img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.tag-creator-chip:hover { background: var(--acc-d); color: var(--acc); }
.verified-mini { color: var(--acc); font-size: 10px; }

/* ── creators.php ─────────────────────────────────────────── */
.creators-page { padding: 0 8px; }
.creator-search-form {
  display: flex; gap: 8px; margin-bottom: 20px;
}
.creator-search-input {
  flex: 1; background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px; font-family: inherit;
  font-size: 14px; color: var(--tx); outline: none; transition: border-color var(--t);
}
.creator-search-input:focus { border-color: var(--acc); }
.creator-search-btn {
  background: var(--acc); color: #fff; border: none; border-radius: var(--r-md);
  padding: 10px 20px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.creators-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.creator-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 16px; display: flex; flex-direction: column; align-items: center;
  text-align: center; position: relative; transition: transform var(--tf), box-shadow var(--tf);
}
.creator-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.creator-rank { position: absolute; top: 12px; left: 12px; font-size: 20px; }
.creator-card-link { text-decoration: none; color: inherit; width: 100%; }
.creator-card-avatar-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.creator-card-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border);
}
.verified-badge-card {
  position: absolute; bottom: 0; right: 0; background: var(--acc); color: #fff;
  border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 800; border: 2px solid var(--bg-card);
}
.creator-card-name { font-size: 14px; font-weight: 800; color: var(--tx); margin-bottom: 4px; }
.creator-card-bio { font-size: 12px; color: var(--txm); line-height: 1.4; margin-bottom: 12px; min-height: 34px; }
.creator-card-stats { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; width: 100%; }
.cc-stat { display: flex; flex-direction: column; gap: 2px; }
.cc-num   { font-size: 15px; font-weight: 800; color: var(--tx); }
.cc-label { font-size: 10px; color: var(--txm); font-weight: 600; }
.btn-follow-card {
  width: 100%; padding: 8px; background: var(--acc); color: #fff; border: none;
  border-radius: var(--r-md); font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all var(--tf);
}
.btn-follow-card:hover { background: var(--acc-h); }

/* ── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .creator-profile-bar { flex-direction: column; }
  .creator-actions { align-items: flex-start; }
  .creator-stat-row { gap: 12px 20px; }
  .cstat-num { font-size: 16px; }
  .creators-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

/* ============================================================
   Auth-aware Nav / Category Hero / 언어 국기 전용
   ============================================================ */

/* ── 비로그인 잠금 아이콘 ────────────────────────────────── */
.nav-icon-locked { position: relative; opacity: .5; }
.nav-icon-locked:hover { opacity: .75; }
.nav-locked-icon {
  position: absolute; bottom: -2px; right: -2px;
  font-size: 9px; line-height: 1;
  background: var(--bg-card); border-radius: 50%;
  padding: 1px;
}

/* ── 아바타 드롭다운 ─────────────────────────────────────── */
.nav-avatar-wrap { position: relative; }
.nav-avatar-btn {
  background: none; border: 2px solid var(--border); border-radius: 50%;
  padding: 0; cursor: pointer; width: 34px; height: 34px; overflow: hidden;
  transition: border-color var(--tf);
}
.nav-avatar-btn:hover { border-color: var(--acc); }
.nav-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-avatar-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px; background: var(--bg-card);
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 200;
  display: none; flex-direction: column; overflow: hidden;
  transform-origin: top right;
}
.nav-avatar-menu.open { display: flex; animation: menuIn .15s ease; }
@keyframes menuIn {
  from { opacity:0; transform: scale(.95) translateY(-4px); }
  to   { opacity:1; transform: scale(1)   translateY(0); }
}
.nav-avatar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.nav-avatar-menu-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.nav-avatar-menu-name { font-size: 14px; font-weight: 800; color: var(--tx); }
.nav-avatar-item {
  display: block; width: 100%; padding: 10px 16px; text-align: left;
  text-decoration: none; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--tx2); background: none; border: none; cursor: pointer;
  transition: background var(--tf), color var(--tf);
}
.nav-avatar-item:hover { background: var(--bg-tag); color: var(--tx); }
.nav-avatar-logout { color: #ff453a; }
.nav-avatar-logout:hover { background: rgba(255,69,58,.1); color: #ff453a; }
.nav-avatar-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── 드로어 비활성 항목 ──────────────────────────────────── */
.drawer-link-dim { opacity: .4; cursor: default; pointer-events: none; }
.drawer-lock { font-size: 11px; }

/* ── 카테고리별 컬러 테마 ────────────────────────────────── */
[data-category="gaming"] {
  --cat-accent: #6366f1; --cat-accent-d: rgba(99,102,241,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(99,102,241,.18) 0%, transparent 60%);
}
[data-category="animals"] {
  --cat-accent: #10b981; --cat-accent-d: rgba(16,185,129,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(16,185,129,.18) 0%, transparent 60%);
}
[data-category="sports"] {
  --cat-accent: #f59e0b; --cat-accent-d: rgba(245,158,11,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(245,158,11,.18) 0%, transparent 60%);
}
[data-category="anime"] {
  --cat-accent: #ec4899; --cat-accent-d: rgba(236,72,153,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(236,72,153,.18) 0%, transparent 60%);
}
[data-category="wholesome"] {
  --cat-accent: #f59e0b; --cat-accent-d: rgba(251,191,36,.14);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(251,191,36,.20) 0%, transparent 60%);
}
[data-category="comedy"] {
  --cat-accent: #f97316; --cat-accent-d: rgba(249,115,22,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(249,115,22,.18) 0%, transparent 60%);
}
[data-category="programming"] {
  --cat-accent: #06b6d4; --cat-accent-d: rgba(6,182,212,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(6,182,212,.18) 0%, transparent 60%);
}
[data-category="dark"] {
  --cat-accent: #8b5cf6; --cat-accent-d: rgba(139,92,246,.12);
  --cat-gradient: radial-gradient(ellipse at 80% 30%, rgba(139,92,246,.18) 0%, transparent 60%);
}

/* 카테고리 테마 적용 */
[data-category] .cat-hero-banner { border-color: var(--cat-accent, var(--border)); }
[data-category] .cat-hero-banner::before { background: var(--cat-gradient, none); }
[data-category] .cat-hero-name { color: var(--cat-accent, var(--tx)); }
[data-category] .sort-btn.active {
  background: var(--cat-accent, var(--acc));
  border-color: var(--cat-accent, var(--acc));
  color: #fff;
}
[data-category] .post-card:hover { border-color: var(--cat-accent-d, var(--border)); }

/* ── 카테고리 히어로 배너 ────────────────────────────────── */
.cat-hero-banner {
  border-radius: var(--r-lg); padding: 24px 24px; margin-bottom: 14px;
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.cat-hero-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,99,20,.06) 0%, transparent 65%);
}
.cat-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 18px;
}
.cat-hero-emoji { font-size: 42px; line-height: 1; flex-shrink: 0; }
.cat-hero-name  {
  font-family: 'Bebas Neue', sans-serif; font-size: 34px; letter-spacing: 2px;
  color: var(--tx); line-height: 1;
}
.cat-hero-count { font-size: 13px; color: var(--txm); margin-top: 4px; }

/* ── 언어 드롭다운: 코드 텍스트 숨김 (국기만) ───────────── */
.lang-btn-code,
.lang-toggle-code { display: none !important; }
.lang-btn {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 10px;
  font-size: 28px; padding: 0;
}
.lang-btn:hover  { background: var(--bg-tag); }
.lang-btn.active { background: var(--acc-d); outline: 2px solid var(--acc); }
/* 드롭다운 헤더 간략화 */
.lang-dropdown-header span { font-size: 13px; }

/* ── 언어 드롭다운 그리드 레이아웃 ─────────────────────── */
.lang-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px !important;
}

/* ============================================================
   추가 스타일 — 스켈레톤, 키보드 단축키, 읽은 게시글,
   테마 전환, 관련 게시글, 무한스크롤 스피너, comment 애니메이션
   ============================================================ */

/* ── 테마 전환 부드럽게 ─────────────────────────────────── */
*, *::before, *::after {
  transition: background-color .15s ease, border-color .15s ease, color .1s ease;
}
/* 단, 애니메이션은 제외 */
.post-card, .navbar, .btn-primary, .btn-secondary { transition: none; }
.post-card { transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease; }
.btn-primary, .btn-secondary { transition: background .15s, border-color .15s, color .15s, transform .1s; }

/* ── 이미지 스켈레톤 shimmer ────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.img-loading {
  background: linear-gradient(90deg, var(--bg-tag) 25%, var(--border) 50%, var(--bg-tag) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.img-loading img { opacity: 0; }
.post-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-tag);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.post-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s; }
.post-img--video { position: relative; }
.video-play-badge {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 14px; line-height: 1; padding: 5px 10px;
  border-radius: 20px; pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ── 읽은 게시글 ────────────────────────────────────────── */
.post-card.read { opacity: .72; }
.post-card.read .post-title { color: var(--txm); }
.post-card.read::after {
  content: '✓';
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.5); color: var(--txm);
  border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.post-card { position: relative; }

/* ── 키보드 포커스 ──────────────────────────────────────── */
.post-card.kb-focus {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--acc-d);
}

/* ── 키보드 단축키 도움말 모달 ──────────────────────────── */
.kb-help-modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s ease;
}
.kb-help-inner {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 28px; min-width: 280px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.kb-help-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.kb-help-header h3 { font-size: 16px; font-weight: 800; }
.kb-close {
  background: none; border: none; font-size: 18px; color: var(--txm);
  cursor: pointer; padding: 4px; border-radius: var(--r-sm);
}
.kb-close:hover { color: var(--tx); background: var(--bg-tag); }
.kb-help-list { display: flex; flex-direction: column; gap: 10px; }
.kb-row { display: flex; align-items: center; gap: 14px; }
.kb-row kbd {
  background: var(--bg-tag); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 13px;
  font-family: monospace; font-weight: 700; min-width: 40px;
  text-align: center; color: var(--tx);
}
.kb-row span { font-size: 13px; color: var(--tx2); }

/* ── 무한 스크롤 스피너 ──────────────────────────────────── */
.feed-spinner {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 32px 0; min-height: 80px;
}
.spinner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--acc); opacity: .4;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.spinner-dot:nth-child(2) { animation-delay: .2s; }
.spinner-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(.8); opacity: .4; }
  40%           { transform: scale(1.2); opacity: 1; }
}

/* ── 관련 게시글 섹션 ───────────────────────────────────── */
.related-posts-section {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 32px 20px;
}
.related-posts-inner { max-width: 860px; margin: 0 auto; }
.related-title {
  font-size: 16px; font-weight: 800; color: var(--tx);
  margin-bottom: 16px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.related-card {
  background: var(--bg-in); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; text-decoration: none;
  display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s;
}
.related-card:hover { transform: translateY(-2px); border-color: var(--acc); }
.related-img { aspect-ratio: 16/9; overflow: hidden; }
.related-img img { width: 100%; height: 100%; object-fit: cover; }
.related-info { padding: 10px 12px; }
.related-card-title {
  font-size: 13px; font-weight: 700; color: var(--tx);
  line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-stats { display: flex; gap: 12px; font-size: 12px; color: var(--txm); }
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ── 새 댓글 애니메이션 ────────────────────────────────── */
.comment-new { opacity: 0; transform: translateY(-8px); transition: all .25s ease; }
.comment-new.visible { opacity: 1; transform: none; }

/* ── 검색 필터바 ─────────────────────────────────────────── */
.search-filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 0 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.search-filter-btn {
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--border); background: none;
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--tx2); cursor: pointer; transition: all .15s;
}
.search-filter-btn:hover { border-color: var(--acc); color: var(--acc); }
.search-filter-btn.active { background: var(--acc); border-color: var(--acc); color: #fff; }

/* ── feed-count ──────────────────────────────────────────── */
.feed-count {
  font-size: 13px; color: var(--txm); font-weight: 600;
}

/* ── profile getThemeClass fallback ─────────────────────── */
.theme-opt { padding: 6px 14px; border-radius: var(--r-md); font-size: 13px; font-weight: 700; border: 1.5px solid var(--border); background: none; cursor: pointer; color: var(--tx2); transition: all .15s; }
.theme-opt:hover, .theme-opt.active { background: var(--acc-d); border-color: var(--acc); color: var(--acc); }

/* ── 검색 자동완성 드롭다운 ─────────────────────────────── */
.search-suggest-box {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 300;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  margin-top: 4px; display: none;
}
.suggest-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; font-size: 11px; font-weight: 700;
  color: var(--txm); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.suggest-clear {
  background: none; border: none; font-size: 11px; color: var(--acc);
  cursor: pointer; font-family: inherit; padding: 0;
}
.suggest-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; background: none; border: none; border-bottom: 1px solid var(--border);
  text-align: left; font-family: inherit; font-size: 14px; color: var(--tx);
  cursor: pointer; transition: background .1s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: var(--bg-tag); }
.suggest-icon { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }

/* ── 사이드바 잠금 표시 ──────────────────────────────────── */
.sidebar-locked { opacity: .55; }
.sidebar-locked:hover { opacity: .8; }
.sidebar-lock-icon { margin-left: auto; font-size: 12px; }
.sidebar-login-cta {
  background: var(--acc-d) !important; color: var(--acc) !important;
  border: 1.5px solid var(--acc) !important; border-radius: var(--r-md) !important;
  margin-top: 6px; font-weight: 800;
}
.sidebar-login-cta:hover { background: var(--acc) !important; color: #fff !important; }

/* ── 포스트 hover 시 댓글 프리뷰 강조 ──────────────────── */
.post-card:hover .comment-preview-section {
  border-color: var(--bh);
}

/* ── 게시글 카드 입장 애니메이션 ────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-card {
  animation: cardIn .25s ease both;
}

/* ── 피드 스피너 위치 수정 ───────────────────────────────── */
#feedSentinel { height: 1px; }

/* ── 업로드 폼 CSRF hidden ───────────────────────────────── */
.upload-form input[name="csrf_token"] { display: none; }

/* ── 카드 전체 클릭 가능 커서 ────────────────────────────── */
.post-card[data-href] { cursor: pointer; }
.post-card[data-href] .post-actions button,
.post-card[data-href] .post-actions a,
.post-card[data-href] .post-header a,
.post-card[data-href] .post-header button,
.post-card[data-href] .post-tags a { cursor: pointer; position: relative; z-index: 2; }

/* ── 업로드 에러 배너 ────────────────────────────────────── */
.upload-error-banner {
  background: rgba(255,60,60,.12); border: 1.5px solid rgba(255,60,60,.4);
  color: #ff6b6b; border-radius: var(--r-md); padding: 12px 16px;
  margin-bottom: 16px; font-size: 14px; font-weight: 600;
}

/* ── 회원가입/로그인 에러 배너 개선 ─────────────────────── */
.auth-error-banner {
  background: rgba(255,60,60,.12); border: 1.5px solid rgba(255,60,60,.35);
  color: #ff6b6b; border-radius: var(--r-md); padding: 12px 16px;
  margin-bottom: 16px; font-size: 14px; font-weight: 600; line-height: 1.5;
}

/* ── 알림 읽음 처리 트랜지션 ─────────────────────────────── */
.notif-item { transition: opacity .2s, background .15s; }
.notif-item.unread { background: var(--acc-d); }
.notif-item.unread:hover { background: var(--bg-tag); }

/* ── 검색창 relative position 보장 ────────────────────────── */
.search-hero-form,
.search-inline-form,
.search-bar { position: relative; }

/* ── 게시글 카드 읽음 badge z-index ────────────────────────── */
.post-card.read::after { z-index: 3; }

/* ── 로딩 상태 버튼 ──────────────────────────────────────── */
.btn-loading {
  opacity: .7; cursor: not-allowed; pointer-events: none;
}
.btn-loading::after {
  content: ' ⏳';
}

/* ── 팔로우 성공 애니메이션 ──────────────────────────────── */
@keyframes followPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.btn-follow.following { animation: followPop .25s ease; }

/* ── 피드 스피너 margin ───────────────────────────────────── */
.feed-spinner { margin: 24px 0 40px; }

/* ── 구독 카테고리 표시 (사이드바) ───────────────────────── */
.sidebar-item.subscribed .sidebar-badge {
  background: var(--acc); color: #fff;
}

/* ============================================================
   ⋯ 게시글 더보기 드롭다운
   ============================================================ */
.post-more-dropdown {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); min-width: 160px;
  animation: fadeIn .12s ease;
}
.pmd-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 16px; background: none; border: none;
  font-family: inherit; font-size: 13px; color: var(--tx); font-weight: 600;
  text-align: left; cursor: pointer; transition: background .1s;
}
.pmd-item:hover { background: var(--bg-tag); }
.pmd-item.pmd-danger { color: #ff6b6b; }
.pmd-item.pmd-danger:hover { background: rgba(255,60,60,.1); }
.pmd-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── 신고 모달 ────────────────────────────────────────────── */
.report-modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s ease;
}
.report-modal {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--r-xl); padding: 24px; min-width: 280px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.report-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.report-modal-header h3 { font-size: 16px; font-weight: 800; }
.report-close {
  background: none; border: none; font-size: 18px; color: var(--txm);
  cursor: pointer; padding: 4px; border-radius: var(--r-sm);
}
.report-reasons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.report-reason-btn {
  padding: 10px 14px; background: var(--bg-in);
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--tx);
  cursor: pointer; text-align: left; transition: all .15s;
}
.report-reason-btn:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-d); }
.report-cancel-btn {
  width: 100%; padding: 10px; background: none;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  font-family: inherit; font-size: 13px; color: var(--txm); cursor: pointer;
  transition: background .15s;
}
.report-cancel-btn:hover { background: var(--bg-tag); }

/* ── 댓글 정렬 탭 ────────────────────────────────────────── */
.comment-sort-tabs { display: flex; gap: 6px; }
.cmt-sort {
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1.5px solid var(--border); background: none;
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--txm); cursor: pointer; transition: all .15s;
}
.cmt-sort:hover { border-color: var(--acc); color: var(--acc); }
.cmt-sort.active { background: var(--acc); border-color: var(--acc); color: #fff; }

/* ── 댓글 삭제 버튼 ──────────────────────────────────────── */
.comment-delete-btn {
  background: none; border: none; font-size: 12px; color: var(--txm);
  cursor: pointer; padding: 2px 6px; border-radius: var(--r-sm);
  font-family: inherit; transition: color .15s, background .15s;
}
.comment-delete-btn:hover { color: #ff6b6b; background: rgba(255,60,60,.1); }

/* ── 바이오 인라인 편집 ──────────────────────────────────── */
.bio-edit-input {
  width: 100%; background: var(--bg-in); border: 1.5px solid var(--acc);
  border-radius: var(--r-md); padding: 8px 12px; color: var(--tx);
  font-family: inherit; font-size: 14px; resize: none;
  outline: none; box-sizing: border-box;
}
.bio-edit-actions {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.bio-char-count { font-size: 11px; color: var(--txm); margin-right: auto; }
.bio-save-btn, .bio-cancel-btn {
  padding: 5px 14px; border-radius: var(--r-md); font-family: inherit;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.bio-save-btn {
  background: var(--acc); border: none; color: #fff;
}
.bio-save-btn:hover { background: var(--acc-h); }
.bio-cancel-btn {
  background: none; border: 1.5px solid var(--border); color: var(--txm);
}
.bio-cancel-btn:hover { background: var(--bg-tag); color: var(--tx); }
.profile-bio[title] { text-decoration: underline dotted var(--txm); }

/* ── 게시글 정렬 헤더 섹션 정렬 ─────────────────────────── */
.comment-section-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}

/* ── 설정 폼 인풋 ────────────────────────────────────────── */
.settings-input {
  margin-bottom: 10px; font-size: 14px; width: 100%; box-sizing: border-box;
}
.settings-pw-form { display: flex; flex-direction: column; gap: 0; }
.settings-pw-form .btn-primary { align-self: flex-start; margin-top: 4px; }

/* ── 바이오 편집 힌트 (호버) ─────────────────────────────── */
.profile-bio { border-radius: var(--r-sm); padding: 2px 4px; transition: background .15s; }
.profile-bio:hover { background: var(--bg-tag); }

/* ============================================================
   댓글 답글 폼
   ============================================================ */
.reply-form-wrap {
  margin: 8px 0 4px 48px;  /* 아바타 너비만큼 들여쓰기 */
  border-left: 2px solid var(--border);
  padding-left: 12px;
}
.reply-form-inner { display: flex; gap: 10px; align-items: flex-start; }
.reply-input-area { flex: 1; }
.reply-textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--tx); font-family: inherit;
  font-size: 13px; resize: none; outline: none; box-sizing: border-box;
  transition: border-color .15s;
}
.reply-textarea:focus { border-color: var(--acc); }
.reply-char-count { font-size: 11px; color: var(--txm); margin-right: auto; }

/* ── 답글 댓글 들여쓰기 스타일 ─────────────────────────── */
.comment-reply {
  margin-left: 48px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  position: relative;
}
.comment-reply::before {
  content: '';
  position: absolute; left: -2px; top: 0;
  width: 2px; height: 100%;
  background: var(--acc); opacity: .3;
}

/* ── toast 안 HTML 버튼 ─────────────────────────────────── */
.toast button { color: var(--acc); background: none; border: none; cursor: pointer; font-weight: 700; padding: 0 4px; }

/* ── 게시글 ⋯ 메뉴 모바일 최적화 ──────────────────────── */
@media (max-width: 600px) {
  .post-more-dropdown {
    left: 12px !important; right: 12px !important;
    position: fixed !important; top: auto !important;
    bottom: calc(var(--bot-h) + 12px) !important;
  }
  .pmd-item { padding: 14px 18px; font-size: 15px; }
}

/* ── 프로필 커버 편집 버튼 ────────────────────────────── */
.cover-edit-btn {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.6); border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--r-md); color: #fff; padding: 6px 12px;
  font-size: 12px; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.cover-edit-btn:hover { background: rgba(0,0,0,.8); transform: scale(1.05); }

/* ── 팔로워/팔로잉 목록 페이지 ──────────────────────────── */
.follow-list-header { padding: 20px 0 16px; border-bottom: 1px solid var(--bdr); margin-bottom: 8px; }
.user-list { display: flex; flex-direction: column; }
.user-list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--bdr);
}
.user-list-avatar-link img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; transition: opacity .15s;
}
.user-list-avatar-link:hover img { opacity: .8; }
.user-list-info { flex: 1; min-width: 0; }
.user-list-name {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 15px; color: var(--tx);
  text-decoration: none; margin-bottom: 2px;
}
.user-list-name:hover { color: var(--acc); }
.user-list-bio {
  font-size: 13px; color: var(--txm); margin: 2px 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-list-meta { font-size: 12px; color: var(--txm); }

/* ══════════════════════════════════════════════════════════
   신규 기능 스타일 (팔로잉피드·컬렉션·조회수·댓글좋아요)
   ══════════════════════════════════════════════════════════ */

/* ── 컬렉션 탭 ──────────────────────────────────────────── */
.collection-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.collection-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--tx2);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: all .2s; position: relative;
}
.collection-tab:hover { border-color: var(--acc); color: var(--acc); }
.collection-tab.active { background: var(--acc); border-color: var(--acc); color: #fff; }
.col-count {
  background: rgba(255,255,255,.15); border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-weight: 700;
}
.collection-tab.active .col-count { background: rgba(255,255,255,.25); }
.col-edit-btn, .col-del-btn {
  background: none; border: none; cursor: pointer;
  font-size: 12px; padding: 1px 3px; opacity: .6;
  color: inherit; line-height: 1; border-radius: 4px;
  transition: opacity .15s, background .15s;
}
.col-edit-btn:hover, .col-del-btn:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* 새 컬렉션 버튼 */
.btn-new-collection {
  padding: 6px 16px; border-radius: var(--r-pill);
  border: 1.5px dashed var(--border); color: var(--txm);
  background: none; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-new-collection:hover { border-color: var(--acc); color: var(--acc); }

/* ── 컬렉션 모달 ────────────────────────────────────────── */
.col-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.col-modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px; width: 340px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: slideUp .2s ease;
}
.col-modal h3 { margin: 0 0 18px; font-size: 17px; }
.col-modal-row { display: flex; gap: 10px; margin-bottom: 18px; }
.col-emoji-input {
  width: 52px; text-align: center; font-size: 22px;
  background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 8px; flex-shrink: 0;
}
.col-name-input {
  flex: 1; background: var(--bg-in); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px;
  font-family: inherit; font-size: 14px; color: var(--tx); outline: none;
  transition: border-color var(--t);
}
.col-name-input:focus { border-color: var(--acc); }
.col-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── 조회수 배지 ────────────────────────────────────────── */
.view-count-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--bg-tag); border: 1px solid var(--border);
  color: var(--txm); font-size: 13px; font-weight: 600;
  transition: color .3s;
}
.view-count-badge svg { opacity: .7; }
@keyframes viewPulse { 0%,100%{ transform:scale(1) } 50%{ transform:scale(1.12) } }
.view-pulse { animation: viewPulse .6s ease; color: var(--acc); }

/* ── 피드 모드 탭 반응형 ────────────────────────────────── */
@media (max-width: 600px) {
  .feed-header { flex-direction: column; align-items: flex-start; }
  .collection-tabs { gap: 4px; }
  .collection-tab { font-size: 12px; padding: 5px 10px; }
}

/* ── 컬렉션 선택 팝오버 ──────────────────────────────────── */
.col-picker {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: 0 8px 32px rgba(0,0,0,.45);
  min-width: 200px; overflow: hidden;
  animation: fadeInDown .15s ease;
}
@keyframes fadeInDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.col-picker-title {
  padding: 10px 14px 8px; font-size: 12px; font-weight: 700;
  color: var(--txm); border-bottom: 1px solid var(--border);
  letter-spacing: .4px; text-transform: uppercase;
}
.col-picker-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; background: none; border: none;
  color: var(--tx); font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left; transition: background .15s;
}
.col-picker-item:hover { background: var(--bg-tag); }
.col-picker-nosave { color: var(--txm); font-size: 12px; }
