/* ========================================================
   Threads Viral Radar - Official Threads Pure White Minimalist Theme
   Design System: White Minimal, 1px Hairline Borders, Plus Jakarta Sans
   Designed & Implemented by 안 본부장 (AI개발본부장)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Pretendard:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #FFFFFF;
  --bg-surface: #F9FAFB;
  --bg-surface-hover: #F3F4F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAFA;
  --bg-inset: #F8FAFC;
  
  /* Hairline Borders */
  --border-hairline: #EEEEEE;
  --border-color: #EEEEEE;
  --border-subtle: #E5E7EB;
  --border-bright: #D1D5DB;
  
  /* Text */
  --text-main: #111111;
  --text-primary: #111111;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  /* Accents */
  --primary: #000000;
  --primary-light: #262626;
  --cyan: #065F46; /* High-Contrast Deep Emerald */
  --accent-emerald: #065F46; /* High-contrast text WCAG AAA (8.5:1+) */
  --accent-emerald-text: #065F46; /* Deep Forest Emerald */
  --accent-emerald-bg: #ECFDF5; /* Clean light mint background */
  --accent-emerald-border: #A7F3D0; /* Crisp mint border */
  --accent-emerald-glow: #10B981; /* Bright emerald for pulse dots / glows */
  --pink: #F43F5E; /* Coral Golden-Time */
  --accent-coral: #F43F5E;
  --accent-coral-bg: #FFF1F2;
  --gold: #F59E0B;
  
  /* Typography */
  --font-body: 'Plus Jakarta Sans', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-head: 'Plus Jakarta Sans', 'Space Grotesk', sans-serif;
  
  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.12);
}

/* 🛡️ Chrome/브라우저 비밀번호 관리자 오작동 방어: type="text" 상태에서 시각적 마스킹(●) 완벽 구현 */
.secret-masked {
  -webkit-text-security: disc !important;
  font-family: text-security-disc, -apple-system, sans-serif !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========================================================
   3-Column Main Layout Architecture
   ======================================================== */
.threads-app-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-primary);
}

.threads-app-container {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* --------------------------------------------------------
   COLUMN 1: Left Navigation Rail (250px)
   -------------------------------------------------------- */
.left-rail {
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-hairline);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-primary);
  z-index: 20;
}

.left-rail-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rail-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-hairline);
}

.rail-brand-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: opacity 0.18s ease, transform 0.18s ease;
  user-select: none;
}

.rail-brand-main:hover {
  opacity: 0.82;
}

.rail-brand-main:active {
  transform: scale(0.98);
}

.mobile-brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
  user-select: none;
}

.mobile-brand-title:hover {
  opacity: 0.82;
}

.mobile-brand-title:active {
  transform: scale(0.98);
}

.threads-glyph-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-head);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rail-brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rail-brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rail-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald-text);
  border: 1px solid var(--accent-emerald-border);
  font-size: 0.72rem;
  font-weight: 800;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald-glow);
  animation: livePulseAnim 2s infinite ease-in-out;
}

@keyframes livePulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.25); }
}

/* Rail Navigation Menu */
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rail-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
}

.rail-nav-item:hover {
  background: var(--bg-surface-hover);
  color: #000000;
}

.rail-nav-item.active {
  background: #000000;
  color: #ffffff;
}

.rail-nav-item.active .nav-badge {
  background: #ffffff;
  color: #000000;
}

.rail-nav-item-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  min-width: 0;
}

.rail-nav-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.nav-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Rail Watched Keywords */
.rail-keywords-section {
  padding-top: 1rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rail-keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rail-chip {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rail-chip:hover {
  border-color: #000000;
  color: #000000;
  background: #ffffff;
}

.rail-chip.active {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.rail-chip-add {
  border: 1px dashed var(--border-bright);
  background: transparent;
  color: var(--text-muted);
}

.rail-chip-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Rail Common Radar Keywords & Accents */
.rail-common-section {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rail-common-chips-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.2rem 0.15rem 0.3rem 0.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

/* Tag Type Accent Chip (#태그) */
.rail-chip.tag-chip {
  background: var(--accent-coral-bg);
  border-color: #FFE4E6;
  color: var(--accent-coral-text);
}
.rail-chip.tag-chip:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
  color: #9F1239;
}

/* Search Term Type Accent Chip (일반 키워드) */
.rail-chip.search-chip {
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald-text);
}
.rail-chip.search-chip:hover {
  background: #DCFCE7;
  border-color: #BBF7D0;
  color: #14532D;
}

/* Tag & Search Chip Active State */
.rail-chip.active,
.rail-chip.tag-chip.active,
.rail-chip.search-chip.active {
  background: #111827 !important;
  border-color: #111827 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Mobile Quick Ticker & Bar Common Pill */
.pill.common-kw-pill {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.pill.common-kw-pill:hover {
  border-color: #000000;
  color: #000000;
}
.pill.common-kw-pill.active {
  background: #000000;
  border-color: #000000;
  color: #FFFFFF;
}
.pill.common-kw-pill.tag-pill {
  color: var(--accent-coral-text);
  background: var(--accent-coral-bg);
  border-color: #FFE4E6;
}
.pill.common-kw-pill.search-pill {
  color: var(--accent-emerald-text);
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald-border);
}

/* Rail Bottom Engine Info */
.left-rail-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-hairline);
}

.server-status-card {
  padding: 0.75rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.server-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.server-name {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.server-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.server-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* User Profile Widget */
.user-profile-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  transition: background 0.15s ease;
  cursor: pointer;
}

.user-profile-strip:hover {
  background: var(--bg-surface-hover);
}

.user-profile-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.user-meta-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------
   COLUMN 2: Center Feed Stream (max-width: 680px)
   -------------------------------------------------------- */
.center-stream {
  flex: 1;
  max-width: 680px;
  min-width: 0;
  border-right: 1px solid var(--border-hairline);
  padding: 1.5rem 1.75rem 4rem;
  background: var(--bg-primary);
  min-height: 100vh;
}

/* Center Stream Sticky Header */
.center-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  z-index: 15;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Collapsible Top Header Container (Brand, Profile, Admin Bar) */
.center-top-collapsible {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 480px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease, transform 0.2s ease;
  transform-origin: top center;
}

.center-top-collapsible.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none !important;
  transform: translateY(-8px);
}

/* 🏆 [시나리오 A] 접혔을 때 상단에 단 1줄(38px)로 표시되는 초슬림 요약 컨트롤 바 */
.collapsed-mini-header-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  min-height: 32px;
  padding: 0.1rem 0;
}

#centerStickyHeader.is-header-collapsed {
  padding-top: 0.2rem !important;
  padding-bottom: 0.35rem !important;
  margin-bottom: 0.45rem !important;
  gap: 0 !important;
}

#centerStickyHeader.is-header-collapsed .collapsed-mini-header-bar {
  display: flex !important;
}

#centerStickyHeader.is-header-collapsed #centerTopCollapsibleSection,
#centerStickyHeader.is-header-collapsed #unifiedFilterControlDeck,
#centerStickyHeader.is-header-collapsed .mobile-header-toggle-bar,
#centerStickyHeader.is-header-collapsed .center-search-wrap,
#centerStickyHeader.is-header-collapsed #categoryControlsBar,
#centerStickyHeader.is-header-collapsed #adminStoriesSourceBar {
  display: none !important;
}

.mini-header-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mini-viral-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.26rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  transition: all 0.15s ease;
}

.mini-viral-pill.active-viral {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.mini-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: #94a3b8;
}

.mini-status-dot.on {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
}

.mini-filter-summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mini-filter-summary-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.mini-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.26rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 800;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.mini-expand-btn:hover {
  background: #d1fae5;
  color: #065f46;
}

/* Mobile Header Fold/Unfold Toggle Bar */
.mobile-header-toggle-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: -0.35rem;
  margin-bottom: -0.15rem;
}

.mobile-header-fold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.16rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mobile-header-fold-btn:hover {
  background: var(--bg-surface-hover);
  color: #000000;
  border-color: var(--border-medium);
}

.mobile-header-fold-btn.is-collapsed {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .mobile-header-fold-btn.is-collapsed {
  background: #38bdf8;
  color: #000000;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.center-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-brand-title {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.mobile-brand-title h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin: 0;
}

.center-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.threads-search-bar {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.threads-search-icon {
  position: absolute;
  left: 0.9rem;
  font-size: 0.95rem;
  color: var(--text-light);
  pointer-events: none;
}

.threads-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
}

.threads-search-input:focus {
  background: #ffffff;
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.threads-sort-select {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.threads-sort-select:hover {
  background: var(--bg-surface-hover);
}

/* ⚡ [피드 운영 모드 바] 카테고리 필터와 완전히 독립된 상위 모드 스위처 (짤림 원천 방지) */
.feed-mode-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  margin-bottom: 0.15rem;
}

.feed-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #10b981;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.feed-mode-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.feed-mode-btn.active-user-kw {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

.feed-mode-status-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* Category Filter Pills (우측 짤림 방지 및 100% 가시성) */
.category-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap; /* ⭐ 우측 짤림 방지: 컨테이너 너비에 맞게 자연스러운 래핑 */
  padding: 0.15rem 0;
}

.pill {
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pill:hover {
  background: var(--bg-surface-hover);
  color: #000000;
}

.pill.active {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.pill.active-user-kw {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

#btnToggleUserKeywordsOnly {
  border-color: #10b981;
  font-weight: 700;
}

#btnToggleUserKeywordsOnly:hover {
  border-color: #059669;
}

#quickReturnViralModeBanner {
  transition: all 0.2s ease;
}

#quickReturnViralModeBanner:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12) !important;
}

.pill.active-golden {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  font-weight: 800 !important;
}

/* Filter Summary Text */
.filter-stats-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Stories Stream Container */
.stories-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* --------------------------------------------------------
   Story Card Component (Official Threads Card Style)
   -------------------------------------------------------- */
.story-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
}

.story-card:hover {
  border-color: #D1D5DB;
  box-shadow: var(--shadow-md);
}

.story-header {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

/* 1단: 작성자 프로필 & 시간 정보 (전체 가로 폭 활용) */
.story-author-row,
.author-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-hairline);
  color: #000000;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-meta,
.author-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.author-handle-row,
.author-name-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.author-time-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  line-height: 1.35;
}

.author-time-line .time-elapsed-badge {
  color: var(--text-primary);
  font-weight: 500;
}

.author-time-line .time-elapsed-badge b {
  color: #000000;
  font-weight: 700;
}

.author-time-line .time-dot {
  color: #94a3b8;
  font-size: 0.7rem;
}

.author-time-line .time-exact {
  color: var(--text-secondary);
}

.author-time-line .time-discovered-hint {
  color: var(--text-muted);
  font-size: 0.74rem;
}

/* 2단: 뱃지 & 지표 메트릭스 스트립 (가로 전체 폭 활용) */
.story-meta-badge-bar,
.score-badge-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  width: 100%;
  margin-top: 0.1rem;
}

.handle {
  font-size: 0.95rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.01em;
}

.author-sub-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tags-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

/* Tags & Badges */
.golden-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--accent-coral-bg);
  color: var(--accent-coral);
  border: 1px solid rgba(244, 63, 94, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.keyword-chip-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
  white-space: nowrap;
  flex-shrink: 0;
}

.score-badge-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-velocity {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald-text);
  border: 1px solid var(--accent-emerald-border);
  font-weight: 800;
}

.badge-trending {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald-text);
  border: 1px solid var(--accent-emerald-border);
  font-weight: 800;
  font-family: var(--font-mono);
}

.badge-score {
  background: #000000;
  color: #ffffff;
}

.badge-category {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
}

.badge-user-matched {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald-text);
  border: 1px solid var(--accent-emerald-border);
  font-weight: 800;
}

.badge-common-hotpick {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
}

/* Story Body */
.story-body {
  font-size: 0.98rem;
  line-height: 1.65;
  color: #111111;
  word-break: break-word;
  white-space: pre-wrap;
  padding: 0.2rem 0;
}

/* 1-Cut Webtoon Guide Box (Gemini AI Feature) */
.scene-guide-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.scene-guide-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.scene-guide-title > span {
  white-space: nowrap;
  flex-shrink: 0;
}

.scene-guide-content {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.prompt-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.btn-prompt-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  background: #000000;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-prompt-copy:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.prompt-copy-hint {
  font-size: 0.74rem;
  color: var(--accent-emerald);
  font-weight: 700;
}

/* Story Summary Box */
.story-summary-box {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.summary-badge {
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.summary-text {
  flex: 1;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Bookmark 1-Cut Summary Box (고대비 시인성 보장) */
.bookmark-summary-box {
  background: var(--bg-surface, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-left: 4px solid #0891b2;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary, #0f172a);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.bookmark-summary-box b {
  color: #0e7490;
  font-weight: 800;
  margin-right: 0.35rem;
}

[data-theme="dark"] .bookmark-summary-box {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  border-left-color: #06b6d4;
  color: #f8fafc;
}

[data-theme="dark"] .bookmark-summary-box b {
  color: #38bdf8;
}

/* Card Actions & Engagement Metrics */
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.story-metrics-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.metric-icon {
  font-size: 0.95rem;
}

.action-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-hairline);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-surface-hover);
  border-color: #000000;
}

/* Modal Internal Buttons Override (Stitch Light Surface Consistency) */
.modal-window .btn-outline,
.modal-solid-card .btn-outline,
.modal-footer-sticky .btn-outline {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  border-radius: 8px;
}

.modal-window .btn-outline:hover,
.modal-solid-card .btn-outline:hover,
.modal-footer-sticky .btn-outline:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.btn-primary, .btn:not(.btn-outline) {
  background: #000000;
  color: #ffffff;
}

.btn-primary:hover, .btn:not(.btn-outline):hover {
  opacity: 0.85;
}

.btn-bookmark.bookmarked {
  background: #FFFBEB;
  border-color: #FCD34D;
  color: #D97706;
}

/* Story Card Footer */
.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-hairline);
  font-size: 0.72rem;
  color: var(--text-light);
}

.radar-registered-tag {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.32rem;
  min-width: 0;
}

.radar-dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald-glow);
  flex-shrink: 0;
}

.radar-registered-tag .reg-label,
.radar-registered-tag .reg-time,
.radar-registered-tag .reg-relative {
  white-space: nowrap;
  flex-shrink: 0;
}

.story-footer-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-delete-card {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.72rem;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0;
  transition: color 0.15s ease;
}

.btn-delete-card:hover {
  color: var(--accent-coral);
}

/* --------------------------------------------------------
   COLUMN 3: Right Intelligence & Radar Panel (340px)
   -------------------------------------------------------- */
.right-panel {
  width: 350px;
  flex-shrink: 0;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-primary);
}

.widget-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.01em;
}

.widget-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.widget-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.widget-badge.emerald {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald-text);
  border: 1px solid var(--accent-emerald-border);
  font-weight: 800;
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.leaderboard-item:hover {
  background: var(--bg-surface);
  border-color: #000000;
  transform: translateX(2px);
}

.leaderboard-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.leaderboard-rank {
  width: 22px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #000000;
  flex-shrink: 0;
}

.leaderboard-rank.rank-1 {
  color: var(--accent-coral);
}

.leaderboard-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.leaderboard-author {
  font-size: 0.85rem;
  font-weight: 800;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.leaderboard-snippet {
  font-size: 0.72rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
  line-height: 1.25;
}

/* ========================================================
   Leaderboard Tabs & Keyword Viral Rankings
   ======================================================== */
.leaderboard-tabs-wrap {
  display: flex;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 0.75rem;
  gap: 3px;
}

.leaderboard-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748B);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.leaderboard-tab-btn:hover {
  color: #111827;
}

.leaderboard-tab-btn.active {
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Keyword Rank Sort Chips Bar (2x2 Balanced Grid) */
.rank-sort-chips-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  padding-bottom: 0.25rem;
  margin-bottom: 0.65rem;
}

.rank-sort-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-hairline, #E2E8F0);
  background: #ffffff;
  color: var(--text-secondary, #64748B);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.32rem 0.45rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.rank-sort-pill:hover {
  border-color: #94A3B8;
  color: #111827;
  background: #F8FAFC;
}

.rank-sort-pill.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Keyword Rank Card */
.keyword-rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.keyword-rank-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--border-hairline, #E2E8F0);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.keyword-rank-item:hover {
  background: var(--bg-surface, #F8FAFC);
  border-color: #111827;
  transform: translateX(2px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.kw-rank-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.kw-rank-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.kw-rank-num {
  font-weight: 800;
  font-size: 0.85rem;
  color: #111827;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.kw-rank-num.top-1 { color: #D97706; font-size: 0.95rem; }
.kw-rank-num.top-2 { color: #64748B; font-size: 0.9rem; }
.kw-rank-num.top-3 { color: #B45309; font-size: 0.88rem; }

.kw-rank-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kw-rank-tier {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
}

.kw-rank-tier.tier-sp { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.kw-rank-tier.tier-s  { background: #FFF1F2; color: #E11D48; border: 1px solid #FECDD3; }
.kw-rank-tier.tier-a  { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.kw-rank-tier.tier-b  { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }

.kw-rank-score {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0284C7;
  white-space: nowrap;
}

.kw-rank-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748B);
}

.kw-rank-gauge-track {
  width: 100%;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
}

.kw-rank-gauge-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #38BDF8, #818CF8, #F43F5E);
  transition: width 0.3s ease;
}

.leaderboard-time {
  font-size: 0.69rem;
  color: var(--text-muted);
}

/* 🌟 랭킹 클릭 / 텔레그램 연동 시 타겟 카드 포커스 하이라이트 애니메이션 */
.story-card.highlight-target {
  outline: 3px solid #000000 !important;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.45), 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  animation: pulseCardGlow 1.8s ease-in-out infinite !important;
  transform: translateY(-2px);
}

@keyframes pulseCardGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.6), 0 0 15px rgba(0, 0, 0, 0.35);
  }
}

/* --------------------------------------------------------
   Raw Post Card Component (1차 스캔 원시 데이터 카드)
   -------------------------------------------------------- */
.raw-post-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: var(--radius-lg, 14px);
  padding: 1.15rem 1.25rem 1.05rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color: var(--text-primary, #111827);
  margin-bottom: 0.85rem;
}

.raw-post-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.raw-post-card.golden-card {
  border-color: #BAE6FD;
  background: #ffffff;
}

.raw-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.raw-meta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.raw-author-id {
  font-weight: 700;
  color: var(--text-primary, #111827) !important;
  font-size: 0.95rem;
}

/* 키워드 뱃지 (태그 vs 일반 검색어) */
.raw-badge-kw {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill, 9999px);
  border: 1px solid transparent;
  white-space: nowrap;
}

.raw-badge-kw.tag {
  background: var(--accent-coral-bg, #FFF1F2) !important;
  border-color: #FECDD3 !important;
  color: var(--accent-coral-text, #E11D48) !important;
}

.raw-badge-kw.search {
  background: var(--accent-emerald-bg, #ECFDF5) !important;
  border-color: var(--accent-emerald-border, #A7F3D0) !important;
  color: var(--accent-emerald-text, #065F46) !important;
}

/* 출처 뱃지 */
.raw-badge-source {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.raw-badge-source.admin {
  background: #FEF3C7 !important;
  border: 1px solid #FDE68A !important;
  color: #92400E !important;
}

.raw-badge-source.user {
  background: #EFF6FF !important;
  border: 1px solid #BFDBFE !important;
  color: #1E40AF !important;
}

.raw-badge-source.both {
  background: #F3E8FF !important;
  border: 1px solid #E9D5FF !important;
  color: #6B21A8 !important;
}

/* 골든타임 뱃지 */
.raw-badge-time {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.raw-badge-time.golden {
  background: #E0F2FE !important;
  border: 1px solid #BAE6FD !important;
  color: #0369A1 !important;
}

.raw-badge-time.expired {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
}

/* 본문 */
.raw-post-body {
  font-size: 0.92rem;
  color: var(--text-primary, #1F2937);
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-line;
}

/* 푸터 및 반응 지표 */
.raw-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-hairline, #F3F4F6);
}

.raw-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary, #4B5563);
  font-weight: 500;
}

.raw-velocity-highlight {
  color: #B45309 !important;
  font-weight: 700 !important;
  background: #FEF3C7 !important;
  padding: 0.1rem 0.45rem !important;
  border-radius: 4px !important;
  border: 1px solid #FDE68A !important;
}

.leaderboard-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.leaderboard-velocity {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.leaderboard-rate {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Golden Time Progress Widget */
.golden-time-widget {
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.golden-time-widget:hover {
  transform: translateY(-1px);
  border-color: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.golden-story-snippet {
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
  margin: 0.35rem 0 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.golden-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-hover);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.golden-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #000000, var(--accent-emerald-glow));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.golden-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.golden-time-labels .active-val {
  font-weight: 800;
  color: #000000;
}

.golden-tip {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Telegram Status Rows */
.status-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-row strong {
  color: #000000;
}

.status-row strong.emerald {
  color: var(--accent-emerald);
}


/* --------------------------------------------------------
   Stats Cards Grid (Desktop Top Stats)
   -------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.02em;
  font-family: var(--font-head);
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* User Monitoring Banner */
#userMonitoringBanner {
  background: #ffffff;
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.06);
}

/* Badge Status Pill */
.badge-status-pill {
  font-size: 0.74rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.badge-status-pill.emerald {
  background: var(--accent-emerald-bg);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald-text);
}

.badge-status-pill.muted {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

/* View Switcher Bar */
.view-switcher-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.main-view-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.view-tab {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-tab:hover {
  background: var(--bg-surface-hover);
  color: #000000;
}

.view-tab.active {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.badge-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.25);
  margin-left: 0.25rem;
}

.view-tab:not(.active) .badge-count {
  background: var(--border-hairline);
  color: var(--text-muted);
}

.view-switcher-meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* --------------------------------------------------------
   Mobile Smart Transformation (< 768px)
   -------------------------------------------------------- */
.mobile-quick-ticker {
  display: none;
}

.mobile-keywords-bar {
  display: none;
}

.mobile-bottom-dock {
  display: none;
}

.bottom-sheet-backdrop {
  display: none;
}

.mobile-bottom-sheet {
  display: none;
}

@media (max-width: 1180px) {
  .right-panel {
    display: none !important;
  }
  .center-stream {
    border-right: none;
    max-width: 800px;
  }
}

@media (max-width: 860px) {
  .left-rail {
    display: none !important;
  }
  
  .center-stream {
    max-width: 100%;
    padding: 0.5rem 0.75rem 5.5rem;
    border-right: none;
  }

  /* 모바일 상단 고정 헤더 초슬림화 */
  .center-header {
    padding-bottom: 0.35rem;
    margin-bottom: 0.45rem;
    gap: 0.35rem;
  }

  .center-top-collapsible {
    gap: 0.35rem;
  }
  
  .center-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
  }

  .mobile-brand-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mobile-brand-title .threads-glyph-badge {
    width: 26px !important;
    height: 26px !important;
  }

  .mobile-brand-title h2 {
    font-size: 1.02rem;
    font-weight: 800;
    white-space: nowrap;
    margin: 0;
  }

  .user-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    margin-left: auto;
    max-width: 100%;
  }

  #userProfileWidget {
    max-width: none !important;
    padding: 0.1rem 0.34rem !important;
    gap: 0.2rem !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  #userNameText {
    max-width: 110px !important;
    min-width: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
    font-size: 0.72rem;
    flex-shrink: 1 !important;
  }

  body.is-super-admin #userNameText {
    max-width: 62px !important;
  }

  .plan-badge-pill {
    font-size: 0.6rem !important;
    padding: 0.1rem 0.32rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }

  #btnHeaderNotices, #btnOpenUserSettings, #btnAdminConsoleToggle {
    padding: 0.18rem 0.36rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    height: 26px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  /* 관리자 제어 바 모바일 초슬림화 */
  #adminControlsWrap.admin-command-bar {
    padding: 0.28rem 0.42rem !important;
    gap: 0.25rem !important;
  }

  .admin-ctrl-group {
    gap: 0.24rem;
  }

  #adminControlsWrap .admin-ctrl-btn,
  #adminControlsWrap .admin-ctrl-select,
  #adminControlsWrap .admin-ctrl-scan-btn,
  #adminControlsWrap .admin-ctrl-stop-btn,
  #adminControlsWrap .toggle-switch-wrap {
    padding: 0 0.45rem !important;
    font-size: 0.69rem !important;
    height: 25px !important;
  }

  #adminControlsWrap .toggle-label {
    font-size: 0.68rem !important;
  }

  /* 모바일 검색 및 정렬 바 슬림화 */
  .center-search-wrap {
    gap: 0.35rem;
  }

  .threads-search-input {
    padding: 0.42rem 0.75rem 0.42rem 2.05rem;
    font-size: 0.8rem;
    height: 34px;
  }

  .threads-search-icon {
    left: 0.75rem;
    font-size: 0.82rem;
  }

  .threads-sort-select {
    padding: 0.42rem 0.6rem;
    font-size: 0.76rem;
    height: 34px;
  }

  /* 피드 운영 모드 바 슬림화 */
  .feed-mode-strip {
    padding: 0.22rem 0.5rem;
    gap: 0.35rem;
  }

  .feed-mode-btn {
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    height: 26px;
    flex-shrink: 0;
  }

  .feed-mode-status-text {
    font-size: 0.68rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 🏆 [시나리오 A] 모바일 펼침 상태에서도 카테고리 알약 3줄 줄바꿈 금지 ➔ 1줄 가로 터치 스와이프! */
  .category-pills {
    gap: 0.3rem;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.1rem 0 0.2rem 0;
    width: 100%;
    max-width: 100%;
  }

  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .category-pills .pill {
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    height: 27px;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .mobile-header-toggle-bar {
    margin-top: -0.1rem;
    margin-bottom: 0.05rem;
  }

  .mobile-header-fold-btn {
    padding: 0.14rem 0.7rem;
    font-size: 0.7rem;
    height: 24px;
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
  }

  /* Mobile Quick Ticker Bar */
  .mobile-quick-ticker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F9FAFB;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
    padding: 0.45rem 0.95rem;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.15s ease;
    margin-bottom: 0.65rem;
  }
  
  .mobile-quick-ticker:active {
    background: var(--bg-surface-hover);
  }
  
  .ticker-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }
  
  .ticker-badge {
    font-weight: 800;
    color: var(--accent-coral);
    font-size: 0.78rem;
    flex-shrink: 0;
  }
  
  .ticker-author {
    font-weight: 700;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .ticker-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-emerald);
    font-weight: 700;
    font-size: 0.76rem;
    flex-shrink: 0;
  }
  
  /* Mobile Keywords Bar */
  .mobile-keywords-bar {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
    margin-bottom: 0.75rem;
  }
  
  .mobile-keywords-bar::-webkit-scrollbar {
    display: none;
  }
  
  /* Stats Grid on Mobile: 2x2 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  
  .stat-card {
    padding: 0.85rem 0.95rem;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  /* Mobile Bottom Dock Navigation */
  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-hairline);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  
  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    transition: color 0.15s ease, transform 0.1s ease;
  }
  
  .dock-item:active {
    transform: scale(0.92);
  }
  
  .dock-item.active {
    color: #000000;
  }
  
  .dock-icon {
    font-size: 1.2rem;
  }
  
  /* Mobile Bottom Sheet */
  .bottom-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  
  .bottom-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  
  .mobile-bottom-sheet {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 82vh;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: var(--shadow-sheet);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column;
    overflow: hidden;
  }
  
  .mobile-bottom-sheet.open {
    transform: translateY(0);
  }
  
  .sheet-grab-bar {
    width: 100%;
    padding: 0.75rem 0 0.35rem;
    display: flex;
    justify-content: center;
    cursor: grab;
  }
  
  .sheet-pill {
    width: 36px;
    height: 4px;
    background: #D1D5DB;
    border-radius: var(--radius-pill);
  }
  
  .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--border-hairline);
  }
  
  .sheet-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #000000;
  }
  
  .sheet-subtitle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
  }
  
  .sheet-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
  }
  
  .sheet-body {
    overflow-y: auto;
    padding: 1rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .sheet-cta-btn {
    width: 100%;
    padding: 0.85rem;
    background: #000000;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: opacity 0.15s ease;
  }
  
  .sheet-cta-btn:active {
    opacity: 0.85;
  }
}

/* --------------------------------------------------------
   Mobile Story Card Header & Badge Stacking (< 640px)
   -------------------------------------------------------- */
@media (max-width: 640px) {
  .card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
  }

  .author-info {
    width: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    min-width: 0 !important;
  }

  .author-meta {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .author-handle-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-wrap: wrap !important;
  }

  .author-sub-time {
    white-space: normal !important;
    line-height: 1.45 !important;
    font-size: 0.76rem !important;
  }

  .score-badge-group {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 0.35rem !important;
    flex-wrap: wrap !important;
    padding-top: 0.45rem !important;
    border-top: 1px dashed var(--border-hairline) !important;
  }

  .badge {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 0.72rem !important;
    padding: 0.2rem 0.5rem !important;
  }

  .badge-velocity, .badge-trending {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Mobile Viewport Modal Adjustments */
  .modal-window {
    max-height: 94vh !important;
    max-height: 94dvh !important;
    border-radius: 16px !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .modal-overlay {
    padding: 0.5rem !important;
    align-items: center !important;
  }

  .modal-header-sticky {
    padding: 0.85rem 1rem !important;
    gap: 0.5rem !important;
  }

  .modal-header-sticky h3 {
    font-size: 1.05rem !important;
    word-break: keep-all !important;
    line-height: 1.3 !important;
  }

  .modal-body-scroll {
    padding: 0.85rem 0.9rem !important;
    gap: 0.75rem !important;
  }

  .modal-footer-sticky {
    padding: 0.75rem 0.9rem !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    align-items: stretch !important;
  }

  .modal-footer-sync-info {
    text-align: center !important;
    font-size: 0.74rem !important;
    color: #64748b !important;
    order: 2 !important;
  }

  .modal-footer-actions {
    display: flex !important;
    gap: 0.5rem !important;
    width: 100% !important;
    order: 1 !important;
  }

  .modal-footer-actions .btn {
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  .modal-footer-actions .btn-modal-close {
    flex: 1 1 35% !important;
    min-width: 70px !important;
    text-align: center !important;
  }

  .modal-footer-actions .btn-save-settings {
    flex: 2 1 65% !important;
    text-align: center !important;
  }
}

/* --------------------------------------------------------
   Modals & Popups (Keyword Studio, Auth, Settings)
   -------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 0.75rem;
  overscroll-behavior: contain;
}

.modal-overlay.open {
  display: flex;
}

/* Modal Window (Stitch Official Clean White Theme) */
.modal-window {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-xl, 20px) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  margin: auto;
}

.modal-header-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  padding: 1.1rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-body-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.25rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.modal-footer-sticky {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  padding: 0.9rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-close-touch-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close-touch-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-close-touch-btn:active {
  transform: scale(0.92);
}

.modal-solid-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px;
  padding: 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 🔐 Auth Modal Specific Styles (Segmented Tabs, Google Button, Divider) */
.auth-tabs {
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  display: flex;
  gap: 4px;
  margin-bottom: 1.25rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.55rem 0.2rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-google-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.btn-google-auth:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.2rem 0;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 0.75rem;
}

/* Stitch Style Keyword Chips in Settings Modal */
.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.kw-chip.enabled {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.kw-chip.disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  text-decoration: line-through;
  opacity: 0.7;
}

.kw-chip.tag-style.enabled {
  background: #faf5ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}

.kw-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.kw-chip .del-btn {
  margin-left: 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.12s ease;
}

.kw-chip .del-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #000000;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* Cyberpunk Terminal HUD (Preserved for Super Admin) */
.scan-hud {
  background: #111827;
  color: #F9FAFB;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hud-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-header-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 0.6rem;
}

.hud-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #F9FAFB;
  min-width: 0;
}

.hud-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: livePulseAnim 1.5s infinite;
  flex-shrink: 0;
}

.hud-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #F9FAFB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-status-badge {
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.hud-header-right-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hud-keyword-pill {
  font-size: 0.76rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 600;
  white-space: nowrap;
}

.hud-candidate-pill {
  font-size: 0.76rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  white-space: nowrap;
}

.hud-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f3f4f6;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1.2;
}

.hud-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.hud-header-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
  padding-top: 0.42rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.hud-sub-stats {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.hud-sub-label {
  font-size: 0.74rem;
  color: #9ca3af;
  font-weight: 600;
}

.hud-sub-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-hud-stop {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid #ef4444 !important;
  color: #fca5a5 !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 6px !important;
  cursor: pointer;
}

.btn-hud-stop:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.btn-hud-clear {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #d1d5db !important;
  font-size: 0.74rem !important;
  padding: 0.2rem 0.6rem !important;
  border-radius: 6px !important;
  cursor: pointer;
}

.btn-hud-clear:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.pipeline-steps {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
  overflow-x: auto;
}

.step-chip {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.step-chip.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10B981;
  color: #6EE7B7;
}

.terminal-console {
  background: #030712;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  max-height: 180px;
  overflow-y: auto;
  color: #D1D5DB;
  line-height: 1.5;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #09090b;
  color: #ffffff;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 99999;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  word-break: keep-all;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================================
   Pagination - Threads Minimalist Modern Pagination
   ======================================================== */
#storiesPaginationContainer,
#rawPaginationContainer,
#bookmarksPaginationContainer,
#storiesTopPaginationContainer,
#rawTopPaginationContainer,
#bookmarksTopPaginationContainer,
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.pagination-top {
  margin: 0.85rem 0 1.25rem 0 !important;
  padding: 0.25rem 0;
}

.pagination-bottom {
  margin: 2.25rem 0 3.5rem 0;
  padding: 0.5rem 0;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.85rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg-surface, #f9fafb);
  border: 1px solid var(--border-subtle, #e5e7eb);
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-surface-hover, #f3f4f6);
  color: var(--text-primary, #111111);
  border-color: var(--border-bright, #d1d5db);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.page-btn.active {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  font-weight: 800;
  cursor: default;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: scale(1.04);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-surface, #f9fafb);
  border-color: var(--border-subtle, #e5e7eb);
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 38px;
  color: var(--text-light, #9ca3af);
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
}

[data-theme="dark"] .page-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .page-btn:hover:not(:disabled) {
  background: #334155;
  color: #ffffff;
  border-color: #475569;
}

[data-theme="dark"] .page-btn.active {
  background: #06b6d4 !important;
  color: #020617 !important;
  border-color: #06b6d4 !important;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
}

[data-theme="dark"] .page-btn:disabled {
  opacity: 0.25;
  background: #0f172a;
  border-color: #1e293b;
}

[data-theme="dark"] .page-ellipsis {
  color: #64748b;
}

/* Mobile Pagination Optimization (1줄 고정 & 줄바꿈 원천 차단) */
@media (max-width: 640px) {
  #storiesPaginationContainer,
  #rawPaginationContainer,
  #bookmarksPaginationContainer,
  #storiesTopPaginationContainer,
  #rawTopPaginationContainer,
  #bookmarksTopPaginationContainer,
  .pagination-container {
    gap: 0.2rem;
    padding: 0.25rem 0;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pagination-container::-webkit-scrollbar {
    display: none;
  }

  .pagination-top {
    margin: 0.65rem 0 1rem 0 !important;
  }

  .pagination-bottom {
    margin: 1.5rem 0 5.25rem 0 !important; /* 모바일 하단 도크 바 가림 방지 */
  }

  .page-btn {
    min-width: 29px;
    height: 32px;
    padding: 0 0.42rem;
    font-size: 0.76rem;
    border-radius: 8px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .page-btn.page-btn-nav {
    padding: 0 0.48rem;
    font-size: 0.74rem;
  }

  .page-ellipsis {
    min-width: 12px;
    height: 32px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
}

/* 🛡️ 달빛 센티넬 운영 관제 패널 (Sentinel Ops Panel) */
.sentinel-ops-panel {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.25s ease-out;
}
.sentinel-ops-panel b {
  font-weight: 700;
}

/* 모바일 관제 콘솔 & 센티넬 24H 운영 관제 초슬림화 */
@media (max-width: 768px) {
  .scan-hud {
    padding: 0.55rem 0.75rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 10px !important;
  }

  /* 모바일 실시간 레이더 관제 콘솔: 2열 구조 완벽 정돈 */
  .hud-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    padding-bottom: 0.4rem !important;
  }

  .hud-header-main-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0.35rem !important;
  }

  .hud-title-wrap {
    gap: 0.35rem !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .hud-title {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .hud-status-badge {
    flex-shrink: 0 !important;
    font-size: 0.65rem !important;
    padding: 0.08rem 0.35rem !important;
  }

  .hud-header-right-tools {
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .hud-keyword-pill {
    font-size: 0.68rem !important;
    padding: 0.14rem 0.4rem !important;
  }

.hud-candidate-pill {
    font-size: 0.68rem !important;
    padding: 0.14rem 0.4rem !important;
  }

  .hud-toggle-btn {
    font-size: 0.7rem !important;
    padding: 0.16rem 0.45rem !important;
  }

  .hud-header-sub-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
    width: 100% !important;
    padding-top: 0.35rem !important;
  }

  .hud-sub-stats {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.3rem !important;
    width: 100% !important;
  }

  .hud-sub-stats .hud-keyword-pill {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: center !important;
    font-size: 0.66rem !important;
    padding: 0.16rem 0.35rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .hud-sub-stats .hud-candidate-pill {
    flex: 0 0 auto !important;
    font-size: 0.66rem !important;
    padding: 0.16rem 0.4rem !important;
  }

  .hud-sub-actions {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    gap: 0.35rem !important;
  }

  .hud-sub-label {
    font-size: 0.68rem !important;
  }

  .btn-hud-stop, .btn-hud-clear {
    font-size: 0.68rem !important;
    padding: 0.14rem 0.45rem !important;
    height: 24px !important;
  }

  .pipeline-steps {
    margin: 0.35rem 0 !important;
    gap: 0.3rem !important;
  }

  .step-chip {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  .step-num {
    width: 14px !important;
    height: 14px !important;
    font-size: 0.62rem !important;
    margin-right: 0.25rem !important;
  }

  .hud-progress-wrap {
    margin: 0.35rem 0 !important;
  }

  .hud-progress-info {
    font-size: 0.7rem !important;
    margin-bottom: 0.2rem !important;
  }

  /* 🛡️ 센티넬 24H 관제 패널 초슬림 2x2 미니 그리드 (본문 가림 완전 해소) */
  .sentinel-ops-panel {
    margin: 0.45rem 0 !important;
    padding: 0.45rem 0.55rem !important;
    border-radius: 10px !important;
  }

  /* 헤더 행 (아이콘 + 타이틀 + 갱신 버튼) */
  .sentinel-ops-panel > div:first-child {
    margin-bottom: 0.45rem !important;
    gap: 0.3rem !important;
  }

  .sentinel-ops-panel > div:first-child img {
    width: 20px !important;
    height: 20px !important;
  }

  .sentinel-ops-panel > div:first-child span {
    font-size: 0.75rem !important;
  }

  /* 4대 메트릭 카드: 2x2 미니 그리드로 전격 개편! */
  .sentinel-ops-panel > div:nth-child(2) {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
    margin-bottom: 0.35rem !important;
  }

  .sentinel-ops-panel > div:nth-child(2) > div {
    padding: 0.45rem 0.5rem !important;
    border-radius: 6px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  /* 카드 헤더 (타이틀 vs 수치 배지) 겹침 방지 */
  .sentinel-ops-panel > div:nth-child(2) > div > div:first-child {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 0.2rem !important;
    margin-bottom: 0.3rem !important;
    min-width: 0 !important;
  }

  .sentinel-ops-panel > div:nth-child(2) > div > div:first-child span:first-child {
    font-size: 0.68rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .sentinel-ops-panel > div:nth-child(2) > div > div:first-child span:last-child {
    font-size: 0.66rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .sentinel-ops-panel > div:nth-child(2) > div > div:last-child {
    font-size: 0.64rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 카드 3 중간 지표 행 (탐색 / 통과) 줄바꿈 방지 */
  .sentinel-ops-panel > div:nth-child(2) > div > div:nth-child(2) {
    font-size: 0.68rem !important;
    white-space: nowrap !important;
  }

  /* 하단 발사 컨트롤: 모드 라디오 및 버튼 1줄 정렬 */
  .sentinel-ops-bottom-bar {
    gap: 0.45rem !important;
  }

  .sentinel-ops-modes {
    width: 100% !important;
    justify-content: flex-start !important;
    font-size: 0.7rem !important;
    gap: 0.45rem !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  .sentinel-ops-modes::-webkit-scrollbar {
    display: none !important;
  }

  .sentinel-ops-actions {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  #btnResetHudFirestoreReads {
    flex: 0 0 auto !important;
    padding: 0.38rem 0.6rem !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
  }

  #btnLaunchHudOpsReport {
    flex: 1 1 auto !important;
    padding: 0.38rem 0.65rem !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  /* 터미널 상단 타이틀바 모바일 슬림화 */
  .terminal-bar {
    padding: 0.35rem 0.6rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }

  .terminal-title {
    font-size: 0.68rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* ==========================================================================
   🎛️ Radar Studio (Keyword & Admin Settings Modal) - Modern White Clean Theme
   ========================================================================== */
#keywordModal .modal-window {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25) !important;
  border-radius: 16px !important;
  overflow-x: hidden !important;
}

#keywordModal .modal-header-sticky {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 1rem 1.15rem !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#keywordModal .modal-header-sticky h2 {
  color: #0f172a !important;
  font-size: 1.12rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em;
}

#keywordModal .modal-body-scroll {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

#keywordModal .modal-footer-sticky {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 0.75rem 1.05rem !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#keywordModal #keywordSummaryText {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  line-height: 1.38 !important;
  white-space: normal !important;
  word-break: keep-all !important;
  flex: 1 1 160px !important;
  min-width: 0 !important;
}

/* 관리자 스튜디오 상단 탭 버튼 줄: 모바일에서 이 줄만 부드럽게 좌우 스크롤 */
.studio-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.studio-tabs-scroll::-webkit-scrollbar {
  display: none;
}

#keywordModal .pill {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

#keywordModal .pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

#keywordModal .pill.active {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#tabContentKeywords,
#tabContentSettings,
#tabContentTrends,
#tabContentUsers,
#tabContentNotices {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* 👥 관리자 회원 정원 & 대기자 명단 테이블 (모바일 찌그러짐 완전 방어) */
.admin-users-table-wrap {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-users-table {
  width: 100%;
  min-width: 390px;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.admin-users-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-users-table th,
.admin-users-table td {
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
  word-break: keep-all;
  vertical-align: middle;
}

.admin-users-table th {
  font-weight: 800;
  color: #334155;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  #keywordModal .setting-sub-card {
    padding: 0.85rem 0.75rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #keywordModal .settings-grid {
    grid-template-columns: 1fr !important;
  }
  #keywordModal .admin-notice-meta-grid {
    grid-template-columns: 1fr !important;
  }
  #keywordModal .pill {
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
  }
}

.kw-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.kw-input-row select,
.kw-input-row input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.85rem !important;
  font-size: 0.88rem !important;
  outline: none;
}

.kw-input-row select:focus,
.kw-input-row input:focus {
  border-color: #0f172a !important;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.kw-category-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  transition: border-color 0.15s;
}

.kw-category-card:hover {
  border-color: #cbd5e1;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.setting-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s, background-color 0.15s;
}

.setting-item:focus-within {
  border-color: #94a3b8;
  background: #ffffff;
}

.setting-item label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item input[type="password"],
.setting-item select {
  width: 100%;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 8px !important;
  padding: 0.55rem 0.75rem !important;
  font-size: 0.88rem !important;
  outline: none;
  font-weight: 600;
}

.setting-item input:focus,
.setting-item select:focus {
  border-color: #000000 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.setting-desc {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.45;
  margin-top: 0.15rem;
}

.setting-desc code {
  background: #e2e8f0;
  color: #0f172a;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.setting-sub-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.setting-sub-card h4 {
  margin: 0;
  color: #0f172a !important;
  font-size: 1rem;
  font-weight: 800;
}

.setting-sub-card p {
  color: #475569 !important;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0.35rem 0 1rem 0;
}

.trend-badge-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.trend-badge-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.trend-rank {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.85rem;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trend-keyword-text {
  font-weight: 800;
  color: #0f172a !important;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* 🌟 세련된 모던 미니멀 로그아웃 버튼 */
.btn-logout-icon {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.btn-logout-icon:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  transform: translateX(1px);
}

.btn-logout-text {
  background: #ffffff;
  border: 1px solid #fee2e2;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-logout-text:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}


/* 👑 회원 플랜 및 최고관리자 뱃지 */
.plan-badge-pill {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  display: inline-flex !important;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box;
}

.plan-badge-pill.admin {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
}

.plan-badge-pill.pro {
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(168, 85, 247, 0.3);
}

.plan-badge-pill.free {
  background: #000000 !important;
  color: #ffffff !important;
}


/* 📱 반응형 인라인 텍스트 스위처 (모바일 컴팩트 레이아웃) */
.mobile-only-inline {
  display: none !important;
}
@media (max-width: 768px) {
  .desktop-only-inline {
    display: none !important;
  }
  .mobile-only-inline {
    display: inline !important;
  }
}

/* 🔐 로그인 / 비로그인 UI 가시성 철벽 제어 (큰형님 특명) */
body:not(.is-logged-in) #userProfileWidget {
  display: none !important;
}
body:not(.is-logged-in) #btnOpenUserSettings {
  display: none !important;
}
body:not(.is-logged-in) #btnAdminConsoleToggle {
  display: none !important;
}
body.is-logged-in #btnAuthLogin {
  display: none !important;
}

/* 🎯 [큰형님 특명] 키워드 칩 드래그 앤 드롭 & 인라인 수정 스타일 */
.kw-chip {
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
}
.kw-chip:active {
  cursor: grabbing;
}
.kw-chip.dragging {
  opacity: 0.35 !important;
  transform: scale(0.95) rotate(1.5deg) !important;
  border-style: dashed !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

/* 칩 내부 수정 및 액션 버튼들 */
.kw-chip .chip-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.25rem;
}
.kw-chip .edit-btn {
  font-size: 0.72rem;
  padding: 0 0.2rem;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  border-radius: 3px;
  line-height: 1;
}
.kw-chip .edit-btn:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.08);
}

/* 인라인 에디트 인풋 */
.kw-chip .kw-edit-input {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px dashed #0284c7;
  background: #ffffff;
  color: #0f172a;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  outline: none;
  min-width: 60px;
  max-width: 140px;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* 카테고리 카드 드롭 영역 피드백 */
.kw-category-card {
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.kw-category-card.drag-over-active {
  border: 2px dashed #0284c7 !important;
  background: rgba(2, 132, 199, 0.04) !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.12) !important;
}
.kw-category-card.drag-over-active .chip-group {
  min-height: 48px;
}

/* 👑/👤 떡상 사연 출처 뱃지 스타일 */
.badge-source-admin {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}
.badge-source-user {
  background: #f5f3ff !important;
  color: #7c3aed !important;
  border: 1px solid #ddd6fe !important;
  font-weight: 800 !important;
}
.badge-source-both {
  background: #eff6ff !important;
  color: #0284c7 !important;
  border: 1px solid #bae6fd !important;
  font-weight: 800 !important;
}

/* 👑 관리자 전용 사연 성격·출처 분리 필터 탭 바 (초슬림 1줄 반응형 & 모바일 삐져나옴 원천 차단) */
.admin-stories-source-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: #ffffff;
  border: 1px solid var(--border-hairline, #e2e8f0);
  border-radius: 10px;
  margin-top: 0.05rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.admin-source-group,
.admin-source-left {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 0%;
}
.admin-source-divider {
  width: 1.5px;
  height: 18px;
  background: #c7d2fe;
  flex-shrink: 0;
  margin: 0 0.05rem;
}
.admin-source-label {
  font-size: 0.69rem;
  font-weight: 800;
  color: #312e81;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.source-filter-pills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.1rem;
  background: #ffffff;
  padding: 0.1rem 0.12rem;
  border-radius: 9999px;
  border: 1px solid #c7d2fe;
  min-width: 0;
  flex: 1 1 0%;
  box-sizing: border-box;
}
.source-filter-pills .source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.14rem 0.28rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  line-height: 1.2;
  flex: 1 1 0%;
  min-width: 0;
  letter-spacing: -0.02em;
}
.source-filter-pills .source-pill .source-pill-cnt {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.02rem 0.22rem;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  line-height: 1.1;
  flex-shrink: 0;
}
.source-filter-pills .source-pill.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.source-filter-pills .source-pill.active .source-pill-cnt {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.source-filter-pills .source-pill[data-source="admin"].active {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
}
.source-filter-pills .source-pill[data-source="user"].active {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
}
.source-filter-pills .source-pill[data-type="viral_story"].active {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
}
.source-filter-pills .source-pill[data-type="instant_viral"].active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
}
@media (max-width: 768px) {
  .admin-stories-source-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.28rem 0.35rem;
    gap: 0.26rem;
  }
  .admin-source-group,
  .admin-source-left {
    width: 100%;
    gap: 0.25rem;
  }
  .admin-source-label {
    font-size: 0.71rem;
    min-width: 38px;
  }
  .source-filter-pills {
    display: flex;
    flex: 1 1 0%;
    width: 100%;
    justify-content: space-between;
    padding: 0.12rem;
    gap: 0.12rem;
  }
  .source-filter-pills .source-pill {
    flex: 1 1 0%;
    min-width: 0;
    padding: 0.18rem 0.2rem;
    font-size: 0.69rem;
    gap: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .source-filter-pills .source-pill .source-pill-cnt {
    font-size: 0.61rem;
    padding: 0.02rem 0.24rem;
    flex-shrink: 0;
  }
}

/* ========================================================
   🚀 플로팅 퀵 스크롤 네비게이션 (맨 위로 / 맨 아래로 반투명 FAB)
   ======================================================== */
.floating-quick-scroll {
  position: fixed;
  z-index: 90;
  bottom: 28px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  padding: 3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  opacity: 0.52;
  transition: opacity 0.22s ease, transform 0.2s ease, background 0.22s ease, box-shadow 0.22s ease;
  user-select: none;
}

/* 데스크톱 와이드 화면에서는 중앙 사연 스트림 우측 하단 모서리에 밀착 배치 */
@media (min-width: 1181px) {
  .floating-quick-scroll {
    right: auto;
    left: calc(50% + 234px);
    bottom: 32px;
  }
}

/* 모바일/태블릿에서는 하단 네비게이션 독(60px) 바로 위 우측에 배치 */
@media (max-width: 860px) {
  .floating-quick-scroll {
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    padding: 2.5px;
  }
}

.floating-quick-scroll:hover,
.floating-quick-scroll:active,
.floating-quick-scroll.is-scrolling {
  opacity: 0.95;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.floating-quick-scroll.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px);
}

.quick-scroll-btn {
  width: 36px;
  height: 34px;
  border: none;
  background: transparent;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  border-radius: 9999px;
  transition: background 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
  padding: 0;
  line-height: 1;
}

@media (max-width: 860px) {
  .quick-scroll-btn {
    width: 34px;
    height: 32px;
  }
}

.quick-scroll-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.quick-scroll-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.25);
}

.quick-scroll-btn.at-edge {
  opacity: 0.35;
}

.quick-scroll-arrow {
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.quick-scroll-label {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.9;
  line-height: 1;
}

.quick-scroll-divider {
  width: 18px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  margin: 1px 0;
}

/* ========================================================
   📢 [공지사항 & 중요 팝업 알림 시스템] 스타일
   ======================================================== */
.notice-widget-card {
  border: 1px solid #e9d5ff;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 48%);
}

.notice-more-btn {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.15s ease;
}

.notice-more-btn:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  transform: translateY(-1px);
}

.notice-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.notice-summary-item {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.6rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.notice-summary-item:hover {
  border-color: #c4b5fd;
  background: #faf5ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(109, 40, 217, 0.08);
}

.notice-cat-badge {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.notice-cat-badge.cat-UPDATE {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.notice-cat-badge.cat-URGENT {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.notice-cat-badge.cat-TIP {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.notice-cat-badge.cat-MAINTENANCE {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.notice-cat-badge.cat-EVENT {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.notice-summary-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.notice-new-pill {
  font-size: 0.6rem;
  font-weight: 900;
  background: #ef4444;
  color: #ffffff;
  padding: 0.06rem 0.34rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.notice-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px #ffffff;
  display: inline-block;
  flex-shrink: 0;
}

.notice-board-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.notice-board-card.pinned-notice {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 35%);
}

.notice-board-card.active-target {
  border: 1.5px solid #7c3aed;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

/* ========================================================
   📱 [태블릿 구간 (861px ~ 1180px)] 우측 패널 숨김 시 좌측 패널 흡수 위젯 & 랭킹 시트 연동
   ======================================================== */
.tablet-only-nav-item {
  display: none !important;
}

.tablet-only-rail-widgets {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.rail-tablet-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.rail-tablet-notice-card {
  border-color: #e9d5ff;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 55%);
}

.rail-tablet-ranking-card {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%);
}

.rail-tablet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.rail-tablet-more-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rail-tablet-more-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.rail-tablet-notice-list {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.rail-tablet-notice-item {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.34rem 0.45rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  min-width: 0;
  transition: all 0.15s ease;
}

.rail-tablet-notice-item:hover {
  border-color: #c4b5fd;
  background: #faf5ff;
}

.rail-tablet-golden-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 0.48rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rail-tablet-golden-box:hover {
  border-color: #10b981;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.rail-tablet-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rail-tablet-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.34rem 0.45rem;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  min-width: 0;
  transition: all 0.15s ease;
}

.rail-tablet-rank-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.rail-tablet-full-rank-btn {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.38rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  background: #0f172a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease;
}

.rail-tablet-full-rank-btn:hover {
  opacity: 0.9;
}

/* 우측 패널(.right-panel)이 숨겨지는 1180px 이하(태블릿 + 모바일) 구간 통합 대응 */
@media (max-width: 1180px) {
  .tablet-only-nav-item {
    display: flex !important;
  }

  .tablet-only-rail-widgets {
    display: flex;
  }

  /* 태블릿에서도 피드 최상단 1위 퀵 티커 바 활성화 */
  .mobile-quick-ticker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F9FAFB;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
    padding: 0.45rem 0.95rem;
    cursor: pointer;
    margin-bottom: 0.65rem;
    font-size: 0.8rem;
  }

  .ticker-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }

  .ticker-badge {
    font-weight: 800;
    color: var(--accent-coral);
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .ticker-author {
    font-weight: 700;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ticker-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-emerald);
    font-weight: 700;
    font-size: 0.76rem;
    flex-shrink: 0;
  }

  /* 태블릿에서도 랭킹 바텀시트/모달이 정상 작동하도록 활성화 */
  .bottom-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .bottom-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-bottom-sheet {
    display: flex;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    width: 100%;
    max-width: 560px;
    max-height: 84vh;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: var(--shadow-sheet);
    z-index: 200;
    transform: translate(-50%, 100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column;
    overflow: hidden;
  }

  .mobile-bottom-sheet.open {
    transform: translate(-50%, 0);
  }

  .sheet-grab-bar {
    width: 100%;
    padding: 0.75rem 0 0.35rem;
    display: flex;
    justify-content: center;
    cursor: grab;
  }

  .sheet-pill {
    width: 36px;
    height: 4px;
    background: #D1D5DB;
    border-radius: var(--radius-pill);
  }

  .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--border-hairline);
  }

  .sheet-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #000000;
  }

  .sheet-subtitle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .sheet-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sheet-body {
    padding: 1rem 1.25rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .sheet-cta-btn {
    width: 100%;
    padding: 0.85rem;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
  }
}

/* ========================================================
   🎨 [3-Zone 컴팩트 클러스터링] 중앙 상단 필터·컨트롤 덱 리디자인
   ======================================================== */

/* [Zone 1] 상단 유틸리티 & 계정 바 (1줄 통합 + 하단 구분선) */
.center-header {
  gap: 0.55rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}

.center-top-collapsible {
  gap: 0.45rem;
}

.center-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: nowrap;
}

/* 데스크톱에서는 접기 버튼이 1행 좌측 끝에 깔끔하게 흡수됨 */
.center-top-row .mobile-header-toggle-bar {
  width: auto;
  margin: 0;
  justify-content: flex-start;
  flex-shrink: 0;
}

.center-top-row .mobile-header-fold-btn {
  height: 30px;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 999px;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1;
}

.center-top-row .mobile-header-fold-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* 🎯 [큰형님 특명] 관리자 로그인 시 상단 1행(.user-nav-actions) 버튼 줄바꿈/짤림 원천 차단 및 30px 높이 통일 */
.center-top-row .user-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.24rem !important;
  margin-left: auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.center-top-row .user-nav-actions .btn-sm {
  height: 30px;
  padding: 0 0.48rem;
  font-size: 0.72rem;
  line-height: 1;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.center-top-row #btnAdminConsoleToggle.active-console {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.center-top-row #userProfileWidget {
  height: 30px;
  padding: 0 0.42rem !important;
  gap: 0.24rem !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.center-top-row #userNameText {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  font-size: 0.72rem !important;
  line-height: 1;
}

/* [Zone 2] 연회색(#F8FAFC) 통합 검색·필터 컨트롤 덱 박스 */
.control-deck-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* 1단: 검색창 + 바이럴 스위치 + 골든타임 스위치 + 정렬 드롭다운 통합 행 */
.deck-top-controls-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  width: 100%;
}

.deck-top-controls-row .threads-search-bar {
  flex: 1 1 170px;
  min-width: 150px;
}

.deck-top-controls-row .threads-search-icon {
  left: 0.75rem;
  font-size: 0.84rem;
}

.deck-top-controls-row .threads-search-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.42rem 0.75rem 0.42rem 2.05rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.deck-switches-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.deck-switches-group .feed-mode-btn {
  padding: 0.36rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #10b981;
  color: #065f46;
}

.deck-switches-group .deck-golden-switch {
  padding: 0.36rem 0.68rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 999px;
}

.deck-switches-group .threads-sort-select {
  padding: 0.36rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
}

/* 컨트롤 덱 내부 점선 구분선 */
.deck-divider-dashed {
  border-top: 1px dashed #cbd5e1;
  margin: 0.45rem 0;
  width: 100%;
}

/* 👑 슈퍼 관리자 커맨드 바 (#adminControlsWrap) 정돈 스타일 */
#adminControlsWrap.admin-command-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 0.34rem 0.55rem;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.admin-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

.admin-ctrl-right {
  margin-left: auto;
}

#adminControlsWrap .admin-ctrl-btn,
#adminControlsWrap .admin-ctrl-select,
#adminControlsWrap .admin-ctrl-scan-btn,
#adminControlsWrap .admin-ctrl-stop-btn {
  height: 28px;
  padding: 0 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

#adminControlsWrap .admin-ctrl-count-pill {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
}

/* 자동 순찰 리얼 캡슐 스위치 (기본 체크박스 숨김 + iOS 스타일 토글) */
#adminControlsWrap .toggle-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 28px;
  padding: 0 0.58rem 0 0.4rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

#adminControlsWrap .toggle-switch-wrap:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

#adminControlsWrap .toggle-switch-wrap input[type="checkbox"] {
  display: none !important;
}

#adminControlsWrap .toggle-slider {
  position: relative;
  width: 26px;
  height: 15px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

#adminControlsWrap .toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

#adminControlsWrap .toggle-label {
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
}

#adminControlsWrap .toggle-switch-wrap.active {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

#adminControlsWrap .toggle-switch-wrap.active .toggle-slider {
  background: #10b981;
}

#adminControlsWrap .toggle-switch-wrap.active .toggle-slider::after {
  transform: translateX(11px);
}

#adminControlsWrap .admin-ctrl-select {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding-right: 0.5rem;
  cursor: pointer;
}

#adminControlsWrap .admin-ctrl-stop-btn {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #e11d48 !important;
  font-weight: 800 !important;
}

#adminControlsWrap .admin-ctrl-stop-btn:hover {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
}

/* 2단+3단 래퍼(#categoryControlsBar): 실시간 피드 탭 전환(display:flex) 시에도 무조건 세로(column) 적층 고정 */
#categoryControlsBar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

/* 2단: 좌측 '카테고리' 고정 라벨 + 1줄 주제 카테고리 알약 바 */
.deck-category-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.deck-section-label {
  font-size: 0.73rem;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 0.35rem;
  border-right: 1.5px solid #cbd5e1;
  line-height: 1.2;
}

.deck-category-row .category-pills {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
  padding: 0;
  flex: 1;
}

.deck-category-row .category-pills .pill {
  padding: 0.28rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.deck-category-row .category-pills .pill:hover {
  border-color: #0f172a;
  color: #0f172a;
}

.deck-category-row .category-pills .pill.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

/* 3단: 관리자 전용 관제 뷰 서브바 (연보라 #EEF2FF 틴트 도킹) */
.control-deck-box .admin-stories-source-bar {
  margin-top: 0.45rem;
  padding: 0.34rem 0.6rem;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
}

/* [Zone 3] 초슬림 4대 KPI 리본 카드 (세로 높이 45% 절감) */
.stats-grid.compact-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.stats-grid.compact-kpi-ribbon .stat-card {
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left-width: 3.5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.stats-grid.compact-kpi-ribbon .stat-card.kpi-coral { border-left-color: #f43f5e; }
.stats-grid.compact-kpi-ribbon .stat-card.kpi-amber { border-left-color: #f59e0b; }
.stats-grid.compact-kpi-ribbon .stat-card.kpi-indigo { border-left-color: #6366f1; }
.stats-grid.compact-kpi-ribbon .stat-card.kpi-emerald { border-left-color: #10b981; }

.stat-top-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem;
}

.stat-label-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.stats-grid.compact-kpi-ribbon .stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
}

.stats-grid.compact-kpi-ribbon .stat-watermark-val {
  font-size: 0.88rem !important;
}

.stats-grid.compact-kpi-ribbon .stat-sub {
  font-size: 0.66rem;
  color: #64748b;
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* [Zone 3-B] 내 맞춤 레이더 24H 감시 1줄 초슬림 에메랄드 스트립 */
#userMonitoringBanner.slim-monitoring-strip {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.42rem 0.72rem;
  margin-bottom: 0.55rem;
  box-shadow: none;
  overflow: hidden;
}

.slim-monitoring-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.38rem 0.6rem;
  flex-wrap: wrap;
}

.slim-monitoring-left {
  display: flex;
  align-items: center;
  gap: 0.3rem 0.45rem;
  flex: 1 1 320px;
  min-width: min(100%, 300px);
  flex-wrap: wrap;
}

.slim-monitoring-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #064e3b;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  flex-shrink: 0;
}

.slim-monitoring-sep {
  color: #6ee7b7;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.slim-monitoring-kw {
  font-size: 0.74rem;
  color: #047857;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.slim-monitoring-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.slim-monitoring-right .badge-status-pill {
  padding: 0.18rem 0.52rem;
  font-size: 0.7rem;
  background: #ffffff;
  white-space: nowrap;
}

.slim-change-btn {
  padding: 0.18rem 0.5rem !important;
  font-size: 0.7rem !important;
  background: #ffffff !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* [Zone 3-C] 사연 피드 본문 시작 탭 바 & 명확한 하단 경계선 */
.view-switcher-bar {
  padding: 0.3rem 0 0.55rem;
  margin-bottom: 0.65rem;
  border-bottom: 2px solid #0f172a;
}

/* 📈 [Phase 3] 키워드 스튜디오 칩 내 타율(Hit-Rate) 성적표 미니 뱃지 */
.kw-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.15;
  margin-left: 0.1rem;
}

.kw-stat-badge.s-tier {
  background: linear-gradient(135deg, #f3e8ff, #ecfdf5);
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.kw-stat-badge.a-tier {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.kw-stat-badge.normal {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.kw-stat-badge.pending {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  font-weight: 600;
}

.kw-stat-badge.skull {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.kw-source-tag {
  font-size: 0.62rem;
  font-weight: 800;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  border-radius: 5px;
  padding: 0.04rem 0.28rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 모바일(<= 860px) 반응형 최적화 */
@media (max-width: 860px) {
  .center-top-row {
    padding-bottom: 0.3rem;
    flex-wrap: wrap;
  }

  .center-top-row .mobile-header-toggle-bar {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.15rem;
  }

  .control-deck-box {
    padding: 0.45rem 0.55rem;
    border-radius: 12px;
  }

  .deck-top-controls-row .threads-search-bar {
    flex: 1 1 100%;
  }

  .deck-switches-group {
    width: 100%;
    justify-content: space-between;
  }

  .deck-switches-group .feed-mode-btn,
  .deck-switches-group .deck-golden-switch,
  .deck-switches-group .threads-sort-select {
    flex: 1;
    justify-content: center;
    text-align: center;
    padding: 0.32rem 0.4rem;
    font-size: 0.71rem;
  }

  .deck-section-label {
    display: none;
  }

  .stats-grid.compact-kpi-ribbon {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.38rem;
  }

  .slim-monitoring-sep {
    display: none;
  }

  .slim-monitoring-left {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .slim-monitoring-right {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.28rem;
    border-top: 1px dashed rgba(16, 185, 129, 0.28);
  }
}

/* 🔗 공지사항 본문 내 자동 변환 하이퍼링크 스타일 */
.notice-auto-link {
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
  padding: 0.08rem 0.32rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  transition: background 0.15s ease, color 0.15s ease;
}
.notice-auto-link:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.16);
}

/* 🎯 [큰형님 특명] 좌측 관리자 전용 관제 - 현재 감시 키워드 현황 카드 */
.rail-admin-kw-card {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.52rem 0.62rem;
  margin-bottom: 0.42rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.rail-admin-kw-card:hover {
  border-color: #6366f1;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}
.rail-admin-kw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-bottom: 0.38rem;
  margin-bottom: 0.38rem;
  border-bottom: 1px dashed #cbd5e1;
}
.rail-admin-kw-title {
  font-size: 0.73rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.rail-admin-kw-total-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.46rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.rail-admin-kw-rows {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}
.rail-admin-kw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  line-height: 1.3;
}
.rail-admin-kw-label {
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}
.rail-admin-kw-val {
  font-size: 0.73rem;
  font-weight: 800;
  white-space: nowrap;
}
.rail-admin-kw-val.master {
  color: #4338ca;
}
.rail-admin-kw-val.user {
  color: #047857;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.rail-admin-kw-user-owners {
  font-size: 0.65rem;
  font-weight: 800;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 0.04rem 0.34rem;
  border-radius: 9999px;
  line-height: 1.15;
}

/* ========================================================
   🧩 좌측 패널 크롬 확장 프로그램 「스레드 레이더 라이트」 홍보 배너
   ======================================================== */
.rail-ext-promo-banner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding: 0.78rem 0.75rem;
  border-radius: 13px;
  background: radial-gradient(circle at 85% 0%, #065f46 0%, #0f172a 58%, #020617 100%);
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 8px 22px rgba(6, 78, 59, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.rail-ext-promo-banner:hover {
  transform: translateY(-2px);
  border-color: #fbbf24;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.32), 0 0 14px rgba(251, 191, 36, 0.25);
}

.rail-ext-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  white-space: nowrap;
}

.rail-ext-tag {
  font-size: 0.64rem;
  font-weight: 800;
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.75);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.rail-ext-free-pill {
  font-size: 0.62rem;
  font-weight: 800;
  color: #022c22;
  background: linear-gradient(135deg, #34d399, #fbbf24);
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.rail-ext-brand-row {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}

.rail-ext-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.55);
}

.rail-ext-headline {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
}

.rail-ext-headline span {
  font-size: 0.69rem;
  font-weight: 700;
  color: #cbd5e1;
  line-height: 1.25;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.rail-ext-headline strong {
  font-size: 0.76rem;
  font-weight: 900;
  color: #fef08a;
  line-height: 1.25;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.rail-ext-badges-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.24rem;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 0.28rem 0.25rem;
}

.ext-mini-chip {
  font-size: 0.61rem;
  font-weight: 800;
  text-align: center;
  padding: 0.14rem 0.1rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.ext-mini-chip.chip-chance {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.ext-mini-chip.chip-rising {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.45);
}

.ext-mini-chip.chip-mega {
  background: rgba(234, 179, 8, 0.22);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.48);
}

.rail-ext-desc {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.38;
  color: #cbd5e1;
  word-break: keep-all;
  letter-spacing: -0.01em;
}

.rail-ext-desc b {
  color: #6ee7b7;
  font-weight: 800;
}

.rail-ext-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #022c22;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.02em;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
  transition: background 0.15s ease, color 0.15s ease;
}

.rail-ext-promo-banner:hover .rail-ext-cta-btn {
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
  color: #0f172a;
}

.rail-ext-arrow {
  font-size: 0.74rem;
  transition: transform 0.15s ease;
}

.rail-ext-promo-banner:hover .rail-ext-arrow {
  transform: translateX(3px);
}

.mobile-sheet-ext-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  text-decoration: none;
  color: #f8fafc;
}

/* ========================================================
   GLOBAL BUSINESS FOOTER (사업자 정보 및 개인정보처리방침)
   ======================================================== */
.radar-business-footer {
  width: 100%;
  border-top: 1px solid var(--border-hairline, #eeeeee);
  background: var(--bg-surface, #f9fafb);
  color: var(--text-muted, #6b7280);
  padding: 1.5rem 1.25rem 2rem;
  margin-top: 2rem;
  font-size: 0.78rem;
  line-height: 1.65;
}

.radar-business-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.32rem;
}

.radar-footer-links-row,
.radar-footer-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.radar-footer-brand {
  color: var(--text-primary, #111111);
  font-weight: 700;
}

.radar-footer-sep {
  color: var(--border-bright, #d1d5db);
  user-select: none;
}

.radar-footer-link,
.radar-footer-link-strong {
  color: var(--text-secondary, #4b5563);
  text-decoration: none;
  transition: color 0.15s ease;
}

.radar-footer-link-strong {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.radar-footer-link:hover,
.radar-footer-link-strong:hover {
  color: var(--text-primary, #111111);
  text-decoration: underline;
}

.radar-footer-copy {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-light, #9ca3af);
}

@media (max-width: 768px) {
  .radar-business-footer {
    padding: 1.25rem 1rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.74rem;
  }
}





