/* ============================================
   CSS Variables
   ============================================ */
:root {
  --bg:            #f5f5f7;
  --surface:       #efefef;
  --card:          #ffffff;
  --card-hover:    #fafafa;
  --border:        #e4e4e7;
  --border-light:  #ececec;

  --sidebar-bg:    #1c1c28;
  --sidebar-text:  rgba(255,255,255,.55);
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active-bg:   #7c3aed;
  --sidebar-active-text: #ffffff;

  --primary:       #7c3aed;
  --primary-light: #6d28d9;
  --primary-dim:   #ede9fe;

  --danger:        #dc2626;
  --danger-dim:    #fee2e2;
  --warning:       #d97706;
  --warning-dim:   #fef3c7;
  --success:       #16a34a;
  --success-dim:   #dcfce7;

  --text:          #111118;  /* 제목, 주요 본문 */
  --text-secondary:#3d3d55;  /* 보조 텍스트 */
  --text-muted:    #6b6b85;  /* 레이블, 캡션 */
  --text-dim:      #9898b4;  /* 힌트, 비활성 */
  --text-subtle:   #c4c4d8;  /* 플레이스홀더, 구분선 텍스트 */

  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

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

/* ============================================
   Layout
   ============================================ */
.container {
  padding: 0 64px;
}

.dash-container {
  padding: 0 64px;
}

/* ============================================
   Header
   ============================================ */
.site-header { display: none; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-sm);
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}

.sidebar-toggle-btn:hover { background: var(--card); }

.sidebar-toggle-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.sidebar-toggle-btn.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.sidebar-toggle-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.sidebar-toggle-btn.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}

.logo-mark {
  color: var(--primary-light);
  font-size: 1rem;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover { background: var(--card); color: var(--text); }
.nav-link.active { background: var(--primary-dim); color: var(--primary-light); }

.badge-beta {
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--primary-dim);
  color: var(--primary-light);
  border: 1px solid var(--primary);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ============================================
   App Layout (Sidebar + Content)
   ============================================ */
.app-body {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--sidebar-bg);
  border-right: none;
  flex-shrink: 0;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: flex-start;
  transition: width 0.25s ease, min-width 0.25s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-header .logo {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header .logo-mark { color: #a78bfa; }

.sidebar-header .sidebar-toggle-btn span { background: rgba(255,255,255,.5); }

.sidebar.collapsed {
  width: 0;
  min-width: 0;
}

.sidebar-nav {
  padding: 12px 0;
  white-space: nowrap;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 20px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 2px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 0.87rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: rgba(255,255,255,.85);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.sidebar-icon {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  padding-top: 32px;
  padding-bottom: 60px;
}

/* ============================================
   Calendar
   ============================================ */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-month-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  min-width: 110px;
  text-align: center;
}

.cal-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.cal-nav-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  background: var(--surface);
  margin-bottom: 0;
}

.cal-weekday {
  text-align: center;
  padding: 8px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.cal-weekday.cal-sun { color: #dc2626; }
.cal-weekday.cal-sat { color: #2563eb; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.cal-day {
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 8px;
  min-height: 140px;
  min-width: 0;
  cursor: pointer;
  transition: background .1s;
  background: #ffffff;
}

.cal-day:hover { background: #f4f4f8; }
.cal-day--drag-over { background: var(--primary-dim) !important; outline: 2px dashed var(--primary); outline-offset: -2px; }

.cal-chip--dragging { opacity: 0.4; }

.cal-day--other { background: #f7f7fc; pointer-events: none; }
.cal-day--other .cal-day-num { color: var(--border-light); }

.cal-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1;
  height: 22px;
  display: flex;
  align-items: center;
}

.today-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-event-chip {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity .1s;
  line-height: 1.5;
}

.cal-event-chip:hover { opacity: 0.75; }

/* ============================================
   Schedule Modal
   ============================================ */
.schedule-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  background: #ffffff;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 16px 60px rgba(0,0,0,.75), 0 0 0 1px rgba(0,0,0,.08);
  z-index: 500;
  display: none;
  user-select: none;
}

.schedule-modal.visible { display: block; }

.modal-drag-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #7c3aed;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: move;
}

.modal-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: var(--radius-sm);
  transition: color .15s;
}

.modal-close-btn:hover { color: #ffffff; }

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  user-select: text;
  background: #ffffff;
}

.modal-field {
  display: flex;
  flex-direction: column;
}

.modal-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
}

.modal-body .input {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #111827;
  border-radius: var(--radius-sm);
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  width: 100%;
  flex: none;
  box-sizing: border-box;
}

.modal-body textarea.input {
  height: 80px;
  min-height: 80px;
  padding: 10px 14px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.modal-body .input::placeholder { color: #9ca3af; }

.modal-body .input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
  outline: none;
}

.modal-body .input.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.modal-body .input.select option {
  background: #ffffff;
  color: #111827;
}

.modal-radio-group {
  display: flex;
  gap: 20px;
}

.modal-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #111827;
  cursor: pointer;
  user-select: none;
}

.modal-radio-label input[type="radio"] {
  accent-color: #7c3aed;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex: none;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================
   Dashboard
   ============================================ */
.dash-header { margin-bottom: 24px; }
.dash-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.3px; color: var(--text); margin-bottom: 4px; }
.dash-sub { font-size: 0.87rem; color: var(--text-muted); }

.page-header {
  margin-bottom: 24px;
}

.write-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.write-tab {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.write-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.write-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
  margin-bottom: 4px;
}

.page-sub {
  font-size: 0.87rem;
  color: #4b4b63;
}

.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.blog-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-stat-card--danger  { border-color: rgba(239,68,68,.4); }
.blog-stat-card--warning { border-color: rgba(245,158,11,.4); }
.blog-stat-card--ok      { border-color: rgba(34,197,94,.3); }
.blog-stat-card--empty   { opacity: 0.55; }

.bsc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bsc-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.bsc-scan-time {
  font-size: 0.73rem;
  color: var(--text-dim);
}

.bsc-id {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: -6px;
}

.bsc-no-data {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 8px 0;
}

.bsc-stats {
  display: flex;
  gap: 8px;
}

.bsc-stat {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.bsc-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.bsc-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.bsc-expired .bsc-stat-num { color: var(--danger); }
.bsc-warning .bsc-stat-num { color: var(--warning); }
.bsc-recent  .bsc-stat-num { color: var(--success); }

.bsc-link {
  align-self: flex-end;
  text-decoration: none;
}

.quick-action-row {
  display: flex;
  gap: 12px;
}

.quick-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.quick-action-btn:hover {
  border-color: var(--primary-light);
  background: var(--primary-dim);
}

.qa-icon  { font-size: 1.3rem; }

.qa-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.qa-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .blog-cards-grid { grid-template-columns: 1fr; }
  .quick-action-row { flex-direction: column; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  text-align: center;
  padding: 52px 20px 36px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================
   Card
   ============================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-label-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.card-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0.75;
}

/* ============================================
   Setup Card
   ============================================ */
.setup-card {
  margin-bottom: 20px;
}

.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0 14px;
  height: 44px;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}

.input::placeholder { color: var(--text-muted); }

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}

.input.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352526a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input.select option {
  background: var(--card);
  color: var(--text);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height:1;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0 20px;
  height: 42px;
}

.btn-primary:hover:not(:disabled) {
  background: #6d28d9;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .25);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0 12px;
  height: 32px;
  font-size: 0.8rem;
}

.btn-outline:hover { border-color: var(--primary-light); color: var(--primary-light); }

#btn-new-post { border-color: var(--text-subtle); color: var(--text-secondary); font-size: 1.1rem; }
#btn-new-post:hover { border-color: var(--text-muted); color: var(--text); background: var(--surface); }

/* ============================================
   Scan Range
   ============================================ */
.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.range-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  font-weight: 600;
}

.range-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scan-range-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: all .15s;
}

.scan-range-btn .hint {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.scan-range-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.scan-range-btn.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary-light);
  font-weight: 600;
}

.scan-range-btn.active .hint { color: var(--primary-light); opacity: .6; }

/* ============================================
   Loading
   ============================================ */
.loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   Stats Grid
   ============================================ */
.cal-card { margin-bottom: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all .15s;
}

.stat-card[data-filter] {
  cursor: pointer;
  user-select: none;
}

.stat-card[data-filter]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.stat-card.danger { border-color: var(--danger-dim); background: color-mix(in srgb, var(--danger-dim) 40%, var(--card)); }
.stat-card.warning { border-color: var(--warning-dim); background: color-mix(in srgb, var(--warning-dim) 40%, var(--card)); }
.stat-card.success { border-color: var(--success-dim); background: color-mix(in srgb, var(--success-dim) 40%, var(--card)); }

.stat-card[data-filter].active { box-shadow: 0 0 0 2px var(--primary-light); }
.stat-card.danger[data-filter].active { box-shadow: 0 0 0 2px var(--danger); }
.stat-card.warning[data-filter].active { box-shadow: 0 0 0 2px var(--warning); }
.stat-card.success[data-filter].active { box-shadow: 0 0 0 2px var(--success); }

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text);
}

.stat-card.danger .stat-num { color: var(--danger); }
.stat-card.warning .stat-num { color: var(--warning); }
.stat-card.success .stat-num { color: var(--success); }

.stat-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-hint-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ============================================
   Scan Info
   ============================================ */
.scan-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  text-align: center;
}

/* ============================================
   Filters
   ============================================ */
.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  transition: all .15s;
}

.filter-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }

.filter-btn.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary-light);
  font-weight: 600;
}

/* ============================================
   Table Toolbar
   ============================================ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 14px;
  gap: 8px;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0 12px;
  height: 32px;
}

.btn-md {
  font-size: 0.9rem;
  padding: 0 16px;
  height: 44px;
}

#sel-check-count {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  padding: 0 8px;
  height: 32px;
}

/* ============================================
   정보 입력
   ============================================ */
.extract-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
}

.write-category {
  flex: 0 0 250px;
  width: 250px;
}

.write-category + input[type="text"] {
  flex: 0 0 auto;
  width: 300px;
}

.write-textarea {
  width: 100%;
  min-height: 200px;
  margin-top: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}


   /*
.title-gen-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.title-gen-form .input {
  flex: 1;
  min-width: 160px;
}

.title-gen-form .select {
  flex: 0 0 auto;
  width: auto;
}


.extract-row.is-review .select  { flex: 2; }
.extract-row.is-review #stay-location { flex: 2; }
.extract-row.is-review #stay-hotel    { flex: 6; }

.extract-row.is-promo .select  { flex: 2; }
.extract-row.is-promo #stay-hotel     { flex: 8; }

.extract-row.is-info .select   { flex: 2; }
.extract-row #info-country     { flex: 2; }
.extract-row #info-city        { flex: 6; }

.extract-row .select-fixed { flex: 0 0 220px; width: 220px; }
*/
.write-category {
  flex: 0 0 220px;
  width: 220px;
}

.btn-extract-full {
  width: 100%;
  margin-top: 14px;
}

.title-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.title-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.title-num {
  font-size: 0.75rem;
  color: var(--text-dim);
  min-width: 18px;
  text-align: right;
}

.title-item-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.title-copy-btn {
  flex-shrink: 0;
}

.count-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.count-loading { background: var(--card); color: var(--text-dim); }
.count-unknown { background: var(--card); color: var(--text-dim); }
.count-low  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.count-mid  { background: rgba(234,179,8,0.15);  color: #eab308; }
.count-high { background: rgba(239,68,68,0.15);  color: #ef4444; }

.image-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 120px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  padding: 12px;
}

.image-dropzone:hover,
.image-dropzone.drag-over {
  border-color: var(--primary-light);
  background: var(--primary-dim);
}

.dropzone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
  pointer-events: none;
  width: 100%;
}

.dropzone-icon { font-size: 3.2rem; }

.dropzone-hint {
  font-size: 0.75rem;
  opacity: 0.6;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.thumb-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-add {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.thumb-add:hover { border-color: var(--primary-light); color: var(--primary-light); }

.card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-label-row .card-label { margin-bottom: 0; }


.upload-guide {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 6px 0 0;
  opacity: 0.7;
}

.info-group {
  margin-top: 20px;
}

.info-group-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-row,
.weather-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.product-row .input { flex: 1; }
.product-row .btn { height: 44px; }

.weather-row .info-weather-month { flex: 2; }
.weather-row .info-weather-city  { flex: 4; }
.weather-row .info-weather-temp  { flex: 4; }
.weather-row .btn { height: 44px; flex-shrink: 0; }

.field-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.textarea-counter {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 4px;
}
.textarea-counter.over { color: var(--danger); font-weight: 600; }


.promo-textarea {
  min-height: 120px;
  margin-top: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}

.floating-hidden-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card);
  border: 1px solid var(--border-light);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 16px 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 200;
  transition: all .15s;
  letter-spacing: 0.5px;
  box-shadow: -2px 0 12px rgba(0,0,0,.1);
}

.floating-hidden-btn:hover {
  background: var(--card-hover);
  color: var(--text);
}

/* ============================================
   숨긴 글 패널
   ============================================ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hidden-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 301;
  animation: slideInRight .2s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color .15s;
}

.panel-close:hover { color: var(--text); }

.panel-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.panel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.panel-item:hover { background: var(--card); }

.panel-item-content {
  flex: 1;
  min-width: 0;
}

.panel-item-title {
  font-size: 0.87rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.panel-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-item-date { font-size: 0.73rem; color: var(--text-dim); }
.panel-item-days { font-size: 0.73rem; color: var(--text-dim); }

.panel-restore-btn {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
}

.panel-restore-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  flex-shrink: 0;
}

.panel-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
  font-size: 0.87rem;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.btn-danger-outline:hover { background: var(--danger-dim); }

.post-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary-light);
}

tr.post-hidden td {
  opacity: 0.35;
  text-decoration: line-through;
  text-decoration-color: var(--text-dim);
}

/* ============================================
   Table
   ============================================ */
.table-wrap {
  overflow-x: auto;
}

#blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

#blog-table thead tr {
  border-bottom: 1px solid var(--border);
}

#blog-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}

#blog-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

#blog-table tbody tr:last-child td { border-bottom: none; }

#blog-table tbody tr:hover td { background: var(--card-hover); }

#blog-table td a {
  color: var(--primary-light);
  transition: opacity .15s;
}

#blog-table td a:hover { opacity: .75; }

.table-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  font-size: 0.87rem;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-danger  { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3); }
.badge-warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }
.badge-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(34,197,94,.3); }

/* ============================================
   Mission Card
   ============================================ */
.mission-card { margin-bottom: 48px; }

.mission-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mission-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
  border-radius: var(--radius-sm);
}

.mission-item:last-child { border-bottom: none; }
.mission-item:hover { background: var(--card-hover); }

.mission-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-dim);
  color: var(--primary-light);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mission-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.mission-title {
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
}

.mission-title:hover { color: var(--primary-light); }

.mission-days {
  font-size: 0.75rem;
  color: var(--danger);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.mission-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
  font-size: 0.87rem;
}

/* ============================================
   키워드 추출 — 반자동 제목 만들기
   ============================================ */
.keyword-card { margin-top: 0; }

.keyword-group {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 18px;
}

.keyword-group:last-child { margin-bottom: 0; }

.keyword-group-label {
  margin-right: 8px;
  min-width: 70px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kw-group-conversion {
  align-items: flex-start;
}

.kw-group-conversion .keyword-group-label {
  padding-top: 5px;
}

.kw-conv-sub-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.keyword-sub-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.kw-sub-label {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}

.kw-sub-available     { background: rgba(34,197,94,.15);  color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.kw-sub-caution       { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.kw-sub-forbidden     { background: rgba(239,68,68,.15);  color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.kw-sub-unclassified  { background: rgba(148,148,176,.1); color: var(--text-muted); border: 1px solid var(--border-light); }

.kw-chip {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.kw-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: var(--primary-dim);
}

.kw-chip-available {
  border-color: rgba(34,197,94,.35);
  color: #22c55e;
}

.kw-chip-available:hover {
  border-color: #22c55e;
  background: rgba(34,197,94,.12);
  color: #22c55e;
}

.kw-chip-caution {
  border-color: rgba(245,158,11,.35);
  color: #f59e0b;
}

.kw-chip-caution:hover {
  border-color: #f59e0b;
  background: rgba(245,158,11,.12);
  color: #f59e0b;
}

.kw-chip-forbidden {
  border-color: rgba(239,68,68,.3);
  color: rgba(239,68,68,.55);
  text-decoration: line-through;
}

.kw-chip-unclassified {
  border-color: var(--border-light);
  color: var(--text-muted);
  border-style: dashed;
}

/* 여행 정보 제목 추천 리스트 */
.info-title-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.info-title-item {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 12px 16px;
  cursor: pointer;
  transition: all .15s;
  line-height: 1.4;
}

.info-title-item:hover {
  border-color: var(--primary-light);
  background: var(--primary-dim);
  color: var(--primary-light);
}

.info-title-item.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary-light);
  font-weight: 600;
}

.title-compose-row {
  display: flex;
  gap: 10px;
}

.btn-write-post { width: 100%; margin-top: 16px; }

.write-setting-item {
  display: flex;
  align-items: center;
  margin-top: 14px;
  gap: 16px;
}

.write-setting-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
  min-width: 40px;
}

.persona-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.write-setting-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.persona-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}

.persona-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.persona-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 18px;
  cursor: pointer;
  transition: all .15s;
}

.persona-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.persona-btn.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary-light);
  font-weight: 600;
}

.length-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.length-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.length-btn.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary-light);
  font-weight: 600;
}

.length-btn-range {
  font-size: 0.68rem;
  opacity: 0.7;
  font-weight: 400;
}

.post-content {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 4px;
}

.title-compose-row .input { flex: 1; }

/* 작성된 글 헤더 */
.post-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.post-result-header .card-label { margin-bottom: 0; }

.persona-convert-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-action-select {
  height: 32px;
  padding: 0 8px;
  font-size: 0.82rem;
  width: auto;
  min-width: 130px;
}
.post-action-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.2);
  margin: 0 2px;
}
.post-action-select {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.25) !important;
  color: #fff !important;
}
.post-action-select option { background: var(--text); color: #fff; }

/* Unsplash 키워드 */
.unsplash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.unsplash-chip {
  background: var(--primary-dim);
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.unsplash-chip:hover {
  background: var(--primary);
  color: #fff;
}

.hist-chip {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 3px 10px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.hist-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* ============================================
   Photo Section (Unsplash 키워드 추천)
   ============================================ */
.photo-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.photo-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.photo-section-label {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
}

.photo-section-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--primary-dim);
  color: var(--primary-light);
  padding: 2px 9px;
  border-radius: 20px;
}

.photo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.photo-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 5px 14px;
  text-decoration: none;
  transition: all .15s;
}

.photo-tag:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: var(--primary-dim);
}

.photo-tag-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.photo-note {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ============================================
   Steps (생성 진행 단계)
   ============================================ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.87rem;
  color: var(--text-muted);
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}

.step.active {
  border-color: var(--primary);
  color: var(--text);
}

.step.active .step-dot {
  background: var(--primary);
  animation: step-pulse 1s ease-in-out infinite;
}

.step.done {
  color: var(--text-muted);
}

.step.done .step-dot {
  background: transparent;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--primary);
}

.step.done .step-dot::before {
  content: '✓';
}

@keyframes step-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ============================================
   Changelog
   ============================================ */
.changelog-bell-btn {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 200;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  box-shadow: var(--shadow);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.changelog-bell-btn:hover { color: var(--text); background: var(--card-hover); }

.changelog-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.changelog-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 340px;
  max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.changelog-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.changelog-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.changelog-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.changelog-close:hover { color: var(--text); }

.changelog-panel-body {
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.changelog-entry { display: flex; flex-direction: column; gap: 8px; }

.changelog-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.changelog-version {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-light);
}

.changelog-new-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.changelog-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.changelog-items {
  margin: 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.changelog-items li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.changelog-entry--latest .changelog-items li { color: var(--text); }

/* ============================================
   Sidebar Footer
   ============================================ */
.sidebar-footer {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: center;
}

.sidebar-logout {
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s;
}

.sidebar-logout:hover {
  background: none;
  color: rgba(255,255,255,.7);
  font-weight: bold;
  text-decoration: underline;
}

/* ============================================
   Login
   ============================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 360px;
}

.login-error {
  font-size: 0.83rem;
  color: var(--danger);
  margin-top: 8px;
}

/* ============================================
   Responsive
   ============================================ */
/* ============================================
   Responsive — 모바일
   ============================================ */
@media (max-width: 640px) {

  /* 컨테이너 */
  .container { padding: 0 14px; }

  /* 헤더 */
  .header-inner { height: 48px; }
  .logo { font-size: 1rem; }

  /* 히어로 */
  .hero { padding: 24px 0 18px; }
  .hero-title { font-size: 1.25rem; letter-spacing: -.3px; }
  .hero-sub { font-size: 0.82rem; }

  /* 카드 */
  .card { padding: 14px; margin-bottom: 10px; }

  /* 셀렉트 + 버튼 */
  .input-row { flex-direction: column; gap: 8px; }
  .input { height: 46px; }
  .input.select { height: 46px; }
  textarea.input { height: auto; min-height: 80px; padding: 12px 14px; }
  .btn-primary { width: 100%; height: 46px; font-size: 0.95rem; }

  /* 스캔 범위 버튼 */
  .range-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .range-group { flex-wrap: wrap; gap: 6px; }
  .scan-range-btn { font-size: 0.78rem; padding: 5px 10px; }

  /* 통계 그리드 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px 14px; }
  .stat-num { font-size: 1.6rem; }
  .stat-name { font-size: 0.78rem; }
  .stat-hint-text { font-size: 0.67rem; }

  /* 테이블 툴바 */
  .table-toolbar { flex-wrap: wrap; gap: 6px; }

  /* 테이블 — 작성일 숨김, 나머지 맞춤 */
  .col-date { display: none; }
  #blog-table { font-size: 0.82rem; }
  #blog-table th,
  #blog-table td { padding: 9px 8px; }
  .badge { font-size: 0.68rem; padding: 2px 7px; }

  /* 플로팅 버튼 */
  .floating-hidden-btn { padding: 12px 7px; font-size: 0.7rem; }

  /* 키워드 추출 */
  .title-compose-row { flex-direction: column; }
  .title-compose-row .btn-primary { width: 100%; }

  /* 숨긴 글 패널 — 전체 너비 */
  .hidden-panel { width: 100vw; }
}

/* 아주 작은 화면 (320px) */
@media (max-width: 360px) {
  .hero-title { font-size: 1.1rem; }
  .stat-num { font-size: 1.4rem; }
}

/* ============================================
   History Drawer
   ============================================ */
.history-trigger {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  width: 40px;
  padding: 16px 0;
  cursor: pointer;
  box-shadow: -2px 0 10px rgba(0,0,0,0.08);
  transition: all .15s;
}
.history-trigger:hover { border-color: var(--primary); color: var(--primary); }
.history-trigger-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-left: -5px;
}
.history-badge {
  display: none;
  writing-mode: horizontal-tb;
  margin-left: -3px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  border-radius: 50%;
  padding: 0;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}
.history-badge.show { display: flex; }

.history-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
}
.history-overlay.open { display: block; }

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 95vw;
  height: 100vh;
  background: var(--card);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.history-drawer.open { transform: translateX(0); }

.history-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.history-drawer-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.history-drawer-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .12s;
}
.history-drawer-close:hover { background: var(--surface); }

.history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}
.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.history-empty-icon { font-size: 2rem; opacity: .4; }

.history-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}
.history-item-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.history-item-head:hover { background: var(--surface); }
.history-item-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.history-item-tag {
  font-size: 0.72rem;
  background: var(--primary-dim);
  color: var(--primary);
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: -2px;
  font-weight: 500;
}
.history-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.history-item-date { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

.history-item-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
  height: 200px;
  overflow-y: auto;
}
.history-item.expanded .history-item-body { display: block; }

.history-item-actions {
  display: none;
  border-top: 1px solid var(--border);
  padding: 8px 14px;
  gap: 6px;
}
.history-item.expanded .history-item-actions { display: flex; }
.history-item-btn {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .12s;
  font-weight: 500;
}
.history-item-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }
.history-item-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }

.history-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.history-clear-btn {
  width: auto;
  padding: 5px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--danger);
  background: var(--card);
  font-size: 0.78rem;
  color: var(--danger);
  cursor: pointer;
  transition: all .12s;
}
.history-clear-btn:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }

