/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ===== Color Tokens ===== */
:root {
  --primary: #7C5CFC;
  --primary-dark: #6444E0;
  --primary-light: #F0EBFF;
  --primary-glow: rgba(124, 92, 252, 0.15);
  --text: #1a1a1a;
  --text-light: #555;
  --text-muted: #888;
  --border: #e8e8ec;
  --bg: #f7f7f9;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(124,92,252,0.15);
}

[data-theme="dark"] {
  --primary: #9B7CFF;
  --primary-dark: #7C5CFC;
  --primary-light: #2A1F4D;
  --primary-glow: rgba(155, 124, 255, 0.2);
  --text: #e8e8ec;
  --text-light: #a0a0a8;
  --text-muted: #6a6a72;
  --border: #2a2a32;
  --bg: #0f0f12;
  --bg-card: #1a1a22;
  --bg-elevated: #1f1f28;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 24px rgba(155,124,255,0.25);
}

/* ===== Header ===== */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 16px; letter-spacing: -0.3px;
  flex-shrink: 0;
}
.logo-icon { font-size: 22px; }
.logo-text { color: var(--text); }
.logo-text em { font-style: normal; font-weight: 500; color: var(--text-light); font-size: 14px; margin-left: 4px; }
.header-search { flex: 1; max-width: 480px; }
.header-search .search-input {
  width: 100%; padding: 10px 16px; border-radius: 24px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 14px; outline: none; color: var(--text);
  transition: all .15s;
}
.header-search .search-input:focus {
  border-color: var(--primary); background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: background .15s;
}
.nav-icon:hover { background: var(--bg); }
.lang-toggle {
  height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: 12px;
  transition: all .15s;
}
.lang-toggle:hover { background: var(--primary); color: white; }

/* ===== Category Chips Bar ===== */
.category-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky; top: 64px; z-index: 90;
}
.chips-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg); color: var(--text);
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--primary); color: var(--primary);
}
.chip-active {
  background: var(--text) !important;
  color: var(--bg-card) !important;
  border-color: var(--text) !important;
  font-weight: 700;
}
.chip em {
  font-style: normal; font-size: 11px;
  opacity: 0.7; font-weight: 600;
}
.chip-active em { opacity: 0.85; }

/* ===== Main Sections ===== */
.main { padding: 32px 24px 64px; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.section-title em {
  font-style: normal; font-size: 14px; color: var(--primary);
  font-weight: 700; background: var(--primary-light);
  padding: 2px 10px; border-radius: 10px;
}
.fire-icon { font-size: 22px; }
.sort-select {
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-card);
  color: var(--text); font-size: 13px; cursor: pointer;
  font-weight: 500;
}

/* ===== TOP 8 Section ===== */
.top8-section {
  margin-bottom: 48px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
  border-radius: 16px;
  border: 1px solid var(--border);
}
.top8-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
}
.top8-grid .workflow-card {
  position: relative;
}
.popularity-badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  color: white; padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; gap: 4px;
  box-shadow: 0 2px 8px rgba(255,107,53,0.4);
}
.list-section .section-title { font-size: 18px; }

/* ===== Workflow Grid ===== */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.workflow-card {
  background: var(--bg-card);
  border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all .2s;
  cursor: pointer;
  display: flex; flex-direction: column;
  min-height: 170px;
  position: relative;
  overflow: hidden;
}
.workflow-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary); opacity: 0; transition: opacity .2s;
}
.workflow-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}
.workflow-card:hover::before { opacity: 1; }
.card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 10px;
}
.card-category {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  background: var(--primary-light); color: var(--primary);
}
.card-risk {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.card-risk.low { background: rgba(16,185,129,0.12); color: var(--success); }
.card-risk.medium { background: rgba(245,158,11,0.12); color: var(--warning); }
.card-risk.high { background: rgba(239,68,68,0.12); color: var(--danger); }
.card-title {
  font-size: 14px; font-weight: 700;
  margin-bottom: 8px; line-height: 1.4;
  flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: 12px; color: var(--text-light); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 12px;
}
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-muted);
  padding-top: 10px; border-top: 1px solid var(--border);
  gap: 8px;
}
.card-trigger {
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg); font-size: 10px; font-weight: 600;
  color: var(--text-light);
}
.card-stats {
  display: flex; gap: 10px; align-items: center;
}
.card-stat {
  display: flex; align-items: center; gap: 3px;
}
.card-source {
  font-size: 10px; color: var(--text-muted); opacity: 0.7;
}

/* ===== Loading ===== */
.loading { text-align: center; padding: 60px 0; color: var(--text-light); }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Pagination ===== */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 4px;
  margin-top: 32px; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border); background: var(--bg-card);
  border-radius: 8px; font-size: 13px; color: var(--text);
  transition: all .15s; font-weight: 500;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.page-btn.active {
  background: var(--primary); color: white;
  border-color: var(--primary); font-weight: 700;
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ===== Ad Modal ===== */











.ad-modal-footer small { color: var(--text-muted); font-size: 11px; }

/* ===== Footer ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px; margin-top: 64px;
}
.footer-content {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px; margin-bottom: 32px;
}
.footer-section h4 {
  color: var(--text); margin-bottom: 12px;
  font-size: 14px; font-weight: 700;
}
.footer-section a {
  display: block; color: var(--text-light); font-size: 13px;
  margin-top: 6px; transition: color .15s;
}
.footer-section a:hover { color: var(--primary); }
.footer-section p, .footer-section small {
  font-size: 12px; color: var(--text-light); line-height: 1.6;
}
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-muted); font-size: 11px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .header-inner { gap: 12px; }
  .header-search { max-width: none; }
  .logo-text em { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section-title { font-size: 16px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .top8-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .top8-grid .card-desc { display: none; }
  .nav-icon { width: 34px; height: 34px; font-size: 16px; }
  
  
}


/* ===== Hero Section (Coral Gradient Text) ===== */
.hero {
  background: linear-gradient(135deg, #FFE5E0 0%, #FFD4CC 100%);
  border-radius: 20px;
  margin: 16px auto 16px;
  max-width: 1200px;
  padding: 24px 0 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .hero { background: linear-gradient(135deg, #2a1f2e 0%, #1a1520 100%); }
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #FFE5E0 0%, #FFD4CC 100%);
  border-radius: 20px;
  padding: 60px 40px;
  box-sizing: border-box;
}
.hero h1 { margin: 0; }
.hero-title {
  font-size: 64px;
  margin-top: 0;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.hero-title strong {
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.hero-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 32px;
}
[data-theme="dark"] .hero-subtitle { color: #ddd; }
.hero-search {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(255, 109, 90, 0.15);
  margin: 0 auto 26px;
  max-width: 640px;
}
[data-theme="dark"] .hero-search {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-search .search-input {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 15px;
  outline: none;
  background: transparent;
  color: #1a1a1a;
}
[data-theme="dark"] .hero-search .search-input { color: #fff; }
.hero-search .search-input::placeholder { color: #999; }
.hero-search .search-btn {
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  color: #fff;
  border: none;
  padding: 0 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.hero-search .search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 109, 90, 0.4);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  font-size: 14px;
  color: #666;
}
[data-theme="dark"] .hero-stats { color: #aaa; }
.hero-stats strong {
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 17px;
  margin-right: 6px;
}

@media (max-width: 640px) {
  .hero { padding: 50px 16px 40px; }
  .hero h1 { margin: 0; }
.hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 15px; }
  .hero-stats { flex-direction: column; gap: 10px; }
}


/* ===== Hero CTA Banner (A) ===== */
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding: 6px 20px;
  background: transparent;
  border: none;
}
[data-theme="dark"] .hero-cta { background: transparent; border: none; }
.hero-cta-text {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
[data-theme="dark"] .hero-cta-text { color: #fff; }
.hero-cta-btn {
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 109, 90, 0.5);
}

/* ===== Floating Upload Button (C) ===== */
.floating-upload {
  position: fixed;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF6D5A 0%, #FF4D8D 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(255, 109, 90, 0.45);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}
.floating-upload:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(255, 109, 90, 0.6);
}
.floating-icon { font-size: 18px; }

@media (max-width: 640px) {
  .hero-cta { flex-direction: column; gap: 12px; padding: 16px; }
  .hero-cta-text { font-size: 14px; text-align: center; }
  .floating-upload { right: 16px; bottom: 16px; padding: 12px 18px; font-size: 14px; }
  .floating-label { display: none; }
  .floating-upload { padding: 14px; border-radius: 50%; }
}


/* ===== 광고 모달 (Postmate 스타일) ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.05);
  border: none; border-radius: 50%;
  font-size: 20px; cursor: pointer; color: #555;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(0,0,0,0.12); }

/* 1단계: 잠금 해제 모달 */
.unlock-modal {
  background: #fff; border-radius: 18px;
  padding: 40px 36px 32px;
  max-width: 440px; width: 90%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: slideUp 0.25s ease;
}
[data-theme="dark"] .unlock-modal { background: #1f1f23; color: #fff; }
.unlock-icon { font-size: 56px; margin-bottom: 16px; }
.unlock-title {
  font-size: 22px; font-weight: 700;
  color: #1a1a1a; margin: 0 0 12px;
}
[data-theme="dark"] .unlock-title { color: #fff; }
.unlock-desc {
  font-size: 15px; color: #555;
  line-height: 1.5; margin: 0 0 24px;
}
[data-theme="dark"] .unlock-desc { color: #bbb; }
.watch-ad-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  color: #fff; border: none;
  padding: 14px 36px; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 109, 90, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
  margin-bottom: 16px;
}
.watch-ad-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 109, 90, 0.5);
}
.play-icon { font-size: 14px; }
.unlock-info { font-size: 13px; color: #888; margin: 0; }
[data-theme="dark"] .unlock-info { color: #999; }

/* 2단계: AdSense 광고 모달 */

[data-theme="dark"] 

[data-theme="dark"] 
.ad-label {
  font-size: 11px; font-weight: 700; color: #888;
  background: #f0f0f0; padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.5px;
}
[data-theme="dark"] .ad-label { background: #2a2a2e; color: #aaa; }

.adsense-slot {
  width: 100%; min-height: 240px;
  display: flex; align-items: center; justify-content: center;
}

[data-theme="dark"] 



.ad-test-hint { margin-top: 10px; color: #FF6D5A !important; }

@media (max-width: 640px) {
  .unlock-modal { padding: 32px 24px 24px; }
  .unlock-title { font-size: 19px; }
  .watch-ad-btn { padding: 12px 28px; font-size: 15px; }
  
}


/* ===== Detail Page ===== */
.detail-main {
  padding: 32px 0 80px;
  min-height: calc(100vh - 64px);
}
.back-link {
  display: inline-block;
  color: #FF6D5A;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 24px;
  transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.7; }

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 16px;
}

.detail-content {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.detail-content.hidden { display: none; }

.detail-header { margin-bottom: 32px; }
.detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.badge-category { background: #FFE5E0; color: #FF4D8D; }
[data-theme="dark"] .badge-category { background: rgba(255,109,90,0.2); color: #FF9080; }
.badge-risk-low { background: #DCFCE7; color: #166534; }
.badge-risk-medium { background: #FEF3C7; color: #92400E; }
.badge-risk-high { background: #FEE2E2; color: #991B1B; }
[data-theme="dark"] .badge-risk-low { background: rgba(34,197,94,0.2); color: #4ADE80; }
[data-theme="dark"] .badge-risk-medium { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .badge-risk-high { background: rgba(239,68,68,0.2); color: #FCA5A5; }
.badge-source { background: #EEF2FF; color: #4F46E5; }
[data-theme="dark"] .badge-source { background: rgba(99,102,241,0.2); color: #A5B4FC; }

.detail-title-ko {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.3;
}
.detail-title-en {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 20px;
  font-weight: 500;
}
.detail-title-en:empty { display: none; }

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.meta-item strong { color: var(--text); font-weight: 700; }

.download-section {
  background: linear-gradient(135deg, #FFE5E0 0%, #FFD4CC 100%);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  margin: 24px 0 32px;
}
[data-theme="dark"] .download-section {
  background: linear-gradient(135deg, #2a1f2e 0%, #1a1520 100%);
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  color: #fff;
  border: none;
  padding: 16px 36px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,109,90,0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}
.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255,109,90,0.5);
}
.download-icon { font-size: 20px; }
.download-size {
  font-size: 13px;
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.download-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: #666;
}
[data-theme="dark"] .download-hint { color: #bbb; }

.detail-section { margin-top: 28px; }
.section-h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.desc-block {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.desc-block.hidden { display: none; }
.desc-block strong { color: #FF6D5A; margin-right: 4px; }
.desc-empty {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}
.tag-empty {
  color: var(--text-muted);
  font-size: 13px;
}

.source-info p {
  margin: 6px 0;
  font-size: 14px;
  color: var(--text);
}
.source-info a {
  color: #FF6D5A;
  text-decoration: none;
  font-weight: 500;
}
.source-info a:hover { text-decoration: underline; }
.source-info code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.source-file { word-break: break-all; }

/* 하단 광고 배너 */
.ad-banner-section { margin-top: 40px; }
.ad-banner {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 32px 24px;
  text-align: center;
  background: var(--bg-card);
}
[data-theme="dark"] .ad-banner { border-color: #444; }
.ad-placeholder-inline { color: var(--text-muted); }
.ad-placeholder-inline p { margin: 6px 0; }
.ad-label-inline {
  display: inline-block;
  background: #f0f0f0;
  color: #888;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}
[data-theme="dark"] .ad-label-inline { background: #2a2a2e; color: #aaa; }

/* 에러 박스 */
.error-box {
  text-align: center;
  padding: 60px 24px;
}
.error-box.hidden { display: none; }
.error-box h2 {
  color: var(--text);
  margin: 0 0 12px;
}
.error-box p {
  color: var(--text-muted);
  margin: 0 0 24px;
}
.btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 640px) {
  .detail-content { padding: 24px 20px; }
  .detail-title-ko { font-size: 24px; }
  .download-btn { padding: 14px 24px; font-size: 15px; }
  .detail-meta { gap: 12px; font-size: 13px; }
}


/* ===== Upload Page ===== */
.upload-page { padding-top: 24px; }
.upload-container { max-width: 720px; margin: 0 auto; }
.upload-info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid #FF6D5A;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.upload-info-box h3 { margin: 0 0 12px 0; font-size: 16px; color: #FF6D5A; }
.upload-info-box ul { margin: 0; padding-left: 0; list-style: none; }
.upload-info-box li { padding: 4px 0; font-size: 14px; line-height: 1.6; }

.upload-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}
.required { color: #FF4D8D; }
.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: #FF6D5A;
  box-shadow: 0 0 0 3px rgba(255,109,90,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* 파일 드롭존 */
.file-drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}
.file-drop-zone:hover, .file-drop-zone.drag-active {
  border-color: #FF6D5A;
  background: rgba(255,109,90,0.04);
}
.file-drop-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}
.file-drop-icon { font-size: 48px; margin-bottom: 8px; }
.file-drop-text { font-size: 15px; margin-bottom: 4px; }
.file-drop-hint { font-size: 12px; color: var(--text-muted); }
.file-info {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255,109,90,0.08);
  border-radius: 8px;
}
.file-info-inner { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.file-icon { font-size: 20px; }
.file-name { flex: 1; text-align: left; word-break: break-all; }
.file-size { color: var(--text-muted); font-size: 12px; }

/* 체크박스 */
.checkbox-group { margin: 24px 0; }
.checkbox-label {
  display: flex; gap: 10px;
  font-size: 13px; line-height: 1.6;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: #FF6D5A;
  flex-shrink: 0;
}
.checkbox-label a { color: #FF6D5A; text-decoration: underline; }

/* 액션 버튼 */
.form-actions {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 28px;
}
.btn-cancel {
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel:hover { background: var(--bg-hover); }
.btn-submit {
  padding: 12px 32px;
  background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,109,90,0.35);
}
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* 결과 메시지 */
.result-message {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 12px;
  display: flex; align-items: flex-start; gap: 16px;
}
.result-message.result-success {
  background: rgba(76,175,80,0.1);
  border-left: 4px solid #4CAF50;
}
.result-message.result-error {
  background: rgba(244,67,54,0.1);
  border-left: 4px solid #F44336;
}
.result-icon { font-size: 32px; }
.result-content h3 { margin: 0 0 6px 0; font-size: 16px; }
.result-content p { margin: 0 0 8px 0; font-size: 14px; line-height: 1.5; }
.result-link {
  display: inline-block;
  margin-top: 4px;
  color: #FF6D5A;
  font-weight: 600;
  text-decoration: none;
}
.result-link:hover { text-decoration: underline; }

.hidden { display: none !important; }


/* ===== Admin Page ===== */
.admin-login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #FFE5E0 0%, #FFD4CC 100%); padding: 20px; }
.login-card { background: white; border-radius: 20px; padding: 48px 40px; width: 100%; max-width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); text-align: center; }
.login-logo { font-size: 56px; margin-bottom: 8px; }
.login-card h1 { margin: 0 0 8px 0; font-size: 24px; background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-card p { color: #666; margin-bottom: 24px; font-size: 14px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input { padding: 12px 16px; border: 1px solid #ddd; border-radius: 10px; font-size: 15px; outline: none; }
.login-card input:focus { border-color: #FF6D5A; box-shadow: 0 0 0 3px rgba(255,109,90,0.15); }
.login-card button { padding: 12px; background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%); color: white; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-error { margin-top: 12px; padding: 10px; background: rgba(244,67,54,0.1); color: #c62828; border-radius: 8px; font-size: 13px; }
.login-back { display: inline-block; margin-top: 20px; color: #999; text-decoration: none; font-size: 13px; }
.admin-app { background: var(--bg); min-height: 100vh; }
.admin-header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 0; z-index: 100; }
.admin-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.admin-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.admin-nav { display: flex; gap: 12px; }
.admin-nav-link { padding: 8px 14px; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; cursor: pointer; }
.admin-main { padding: 32px 24px 80px; }
.admin-section { margin-bottom: 40px; }
.admin-section-title { font-size: 18px; margin: 0 0 16px 0; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.stat-card.stat-pending { border-left: 4px solid #FF6D5A; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.admin-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.admin-btn { padding: 8px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; cursor: pointer; font-family: inherit; }
.admin-btn-primary { background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%); color: white; border: none; }
.admin-btn-danger { background: #F44336; color: white; border: none; }
.trans-status-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.trans-stat strong { font-size: 18px; }
.trans-ok strong { color: #4CAF50; }
.trans-fail strong { color: #F44336; }
.trans-bar { margin: 12px 0 4px; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.trans-bar-fill { height: 100%; background: linear-gradient(90deg, #FF6D5A 0%, #FF4D8D 100%); transition: width 0.5s; }
.trans-stat-sub { font-size: 12px; color: var(--text-muted); }
.uploads-list { display: flex; flex-direction: column; gap: 12px; }
.upload-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.upload-item-header { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.upload-item-header strong { font-size: 16px; }
.upload-meta { font-size: 12px; color: var(--text-muted); }
.upload-item-body { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upload-tag { padding: 3px 10px; border-radius: 12px; background: rgba(255,109,90,0.1); color: #FF6D5A; font-size: 12px; font-weight: 600; }
.upload-desc { width: 100%; margin-top: 8px; padding: 8px 12px; background: var(--bg); border-radius: 6px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.upload-item-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.loading { padding: 20px; text-align: center; color: var(--text-muted); }
.error { padding: 16px; background: rgba(244,67,54,0.1); color: #c62828; border-radius: 8px; }
.hidden { display: none !important; }

/* ===== 언어 토글 2탭 ===== */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-secondary, #f1f5f9);
  border-radius: 8px;
  padding: 2px;
  margin-left: 4px;
}
.lang-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.lang-btn:hover {
  color: var(--text-primary, #0f172a);
}
.lang-btn.active {
  background: var(--bg-primary, #ffffff);
  color: var(--accent, #0ea5e9);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
[data-theme="dark"] .lang-toggle {
  background: rgba(255,255,255,0.06);
}
[data-theme="dark"] .lang-btn.active {
  background: rgba(255,255,255,0.12);
  color: #38bdf8;
}


/* ===== 워크플로우 흐름도 ===== */
.flow-diagram-section {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-card, #fff);
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
}
.flow-diagram-section .section-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #1f2937);
}
.diagram-wrapper {
  overflow-x: auto;
  background: var(--bg, #f9fafb);
  border-radius: 8px;
  padding: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mermaid-container {
  width: 100%;
  text-align: center;
}
.mermaid-container svg {
  max-width: 100%;
  height: auto;
}
.diagram-hint {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  text-align: center;
}
[data-theme="dark"] .flow-diagram-section {
  background: #1f2937;
  border-color: #374151;
}
[data-theme="dark"] .diagram-wrapper {
  background: #111827;
}

/* MERMAID V2 - 가로 스크롤 + 원본 크기 유지 */
.diagram-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg, #f9fafb);
  border-radius: 8px;
  padding: 20px;
  min-height: 200px;
  /* 다이어그램이 wrapper보다 클 때 가로 스크롤 */
}
.diagram-wrapper::-webkit-scrollbar { height: 10px; }
.diagram-wrapper::-webkit-scrollbar-track { background: #e5e7eb; border-radius: 4px; }
.diagram-wrapper::-webkit-scrollbar-thumb { background: #9ca3af; border-radius: 4px; }
.diagram-wrapper::-webkit-scrollbar-thumb:hover { background: #6b7280; }

.mermaid-container {
  /* 원본 크기 강제 - 축소 방지 */
  display: inline-block;
  min-width: 100%;
}
.mermaid-container svg {
  max-width: none !important;  /* 축소 방지 */
  height: auto;
  min-height: 150px;
}
[data-theme="dark"] .diagram-wrapper {
  background: #111827;
}
[data-theme="dark"] .diagram-wrapper::-webkit-scrollbar-track { background: #374151; }
[data-theme="dark"] .diagram-wrapper::-webkit-scrollbar-thumb { background: #6b7280; }

/* MERMAID V3 - 가로 스크롤 강제 + 원본 크기 보장 */
.diagram-wrapper {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: var(--bg, #f9fafb);
  border-radius: 8px;
  padding: 24px 20px;
  min-height: 240px;
  width: 100%;
}
.mermaid-container {
  display: block;
  width: max-content;  /* 내용물 크기에 맞춤 - 가로 스크롤 트리거 */
  min-width: 100%;
}
.mermaid-container svg {
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

/* MERMAID V4 - Pan/Zoom + 전체 표시 */
.flow-diagram-section .diagram-wrapper {
  position: relative;
  overflow: hidden !important;
  background: var(--bg, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 0;
  height: 620px; /* 고정 높이로 전체 흐름 보임 */
  width: 100%;
}
.mermaid-container {
  width: 100% !important;
  height: 100% !important;
  display: block;
  min-width: auto;
}
.mermaid-container svg {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  cursor: grab;
}
.mermaid-container svg:active {
  cursor: grabbing;
}

/* 컨트롤 버튼 */
.diagram-controls {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.diagram-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-card, #fff);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.diagram-btn:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}
[data-theme="dark"] .diagram-btn {
  background: #1f2937;
  border-color: #374151;
  color: #f1f5f9;
}
[data-theme="dark"] .diagram-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
}

/* 전체화면 모드 */
.diagram-wrapper:fullscreen {
  height: 100vh !important;
  background: #f9fafb;
  padding: 20px;
}
[data-theme="dark"] .diagram-wrapper:fullscreen {
  background: #0f172a;
}

/* ===== TOP 8: 강제 4x2 그리드 ===== */
#top8-grid, .top8-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: repeat(2, auto) !important;
  gap: 16px !important;
}
@media (max-width: 1024px) {
  #top8-grid, .top8-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  #top8-grid, .top8-grid { grid-template-columns: 1fr !important; }
}

/* 텍스트 길이에 맞춰 박스 자동 확장 */
.mermaid .node .label {
  min-width: 0 !important;
}

/* 다이어그램 영역 자체에 가로 스크롤 + 충분한 높이 */
.flow-diagram-section .diagram-wrapper {
  overflow: auto !important;
  height: 620px !important;
}


/* ===== MERMAID FINAL - 폰트 축소만 적용 (박스 폭 건드리지 않음) ===== */
#flow-diagram foreignObject > div,
#flow-diagram .nodeLabel,
#flow-diagram foreignObject span {
  font-size: 11px !important;
  font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif !important;
  line-height: 1.2 !important;
}


/* ===== AdSense 승인 전 광고 숨김 (승인 후 이 블록 제거) ===== */
.ad-banner-section,
.ad-banner,
.adsense-slot,
#unlock-modal,
#ad-modal { display: none !important; }


/* ===== INTERACTION FOOTER & REPORT MODAL ===== */
.interaction-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-top: 24px; padding: 14px 18px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 14px; color: var(--text-muted, #6b7280);
}
.interaction-stats { display: flex; gap: 18px; align-items: center; }
.stat-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; cursor: default;
  color: inherit; font-size: 14px;
}
.like-btn { cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: background 0.15s; }
.like-btn:hover { background: rgba(255, 0, 80, 0.08); }
.like-btn:active { transform: scale(0.95); }
.stat-icon { font-size: 15px; }
.report-notice { flex: 1; text-align: center; font-size: 12px; margin: 0; min-width: 200px; }
.report-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 6px;
  background: transparent; color: var(--text-muted, #6b7280); font-size: 13px;
  cursor: pointer; transition: all 0.15s;
}
.report-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
[data-theme="dark"] .report-btn:hover { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }

/* 신고 모달 */
.report-modal {
  background: var(--bg, #fff); border-radius: 12px;
  width: 92%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.report-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border, #e5e7eb);
}
.report-modal-header h3 { margin: 0; font-size: 16px; color: #dc2626; }
.report-modal-body { padding: 20px; }
.report-target {
  background: #fef3c7; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px;
  font-size: 13px; color: #92400e;
}
[data-theme="dark"] .report-target { background: #422006; color: #fde68a; }
.report-label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--text, #111); }
.report-label select,
.report-label input,
.report-label textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 8px 10px; border: 1px solid var(--border, #d1d5db); border-radius: 6px;
  font-size: 14px; background: var(--bg, #fff); color: var(--text, #111); box-sizing: border-box;
}
.report-label textarea { resize: vertical; font-family: inherit; }
.report-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-footer-notice { font-size: 11px; color: var(--text-muted, #6b7280); margin: 8px 0 14px; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-secondary {
  padding: 8px 16px; border: 1px solid var(--border, #d1d5db); border-radius: 6px;
  background: transparent; color: var(--text, #111); cursor: pointer; font-size: 14px;
}
.btn-danger {
  padding: 8px 18px; border: none; border-radius: 6px;
  background: #dc2626; color: #fff; cursor: pointer; font-size: 14px; font-weight: 600;
}
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }
.report-success {
  padding: 30px 20px; text-align: center; color: #059669; font-weight: 600; font-size: 15px;
}
@media (max-width: 480px) {
  .report-row { grid-template-columns: 1fr; }
  .interaction-footer { flex-direction: column; align-items: flex-start; }
  .report-notice { text-align: left; }
}


/* ===== BOOKMARK BUTTON ===== */
.workflow-card {
  position: relative;
}
.card-bookmark-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  color: #c0c0c0;
  line-height: 1;
  transition: all 0.15s ease;
  z-index: 5;
  opacity: 0.5;
}
.workflow-card:hover .card-bookmark-btn {
  opacity: 1;
}
.card-bookmark-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.2);
  opacity: 1 !important;
}
.card-bookmark-btn.active {
  color: #f5b800;
  opacity: 1 !important;
  text-shadow: 0 0 8px rgba(245, 184, 0, 0.4);
}
.card-bookmark-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.card-bookmark-btn:hover::after {
  opacity: 1;
}
@media (max-width: 600px) {
  .card-bookmark-btn { opacity: 1; font-size: 20px; }
}

/* ===== DETAIL BOOKMARK BUTTON ===== */
.bookmark-btn { cursor: pointer; }
.bookmark-btn .stat-icon { font-size: 18px; transition: color 0.2s; }
.bookmark-btn.active .stat-icon { color: #f5b800; text-shadow: 0 0 8px rgba(245,184,0,0.4); }
.bookmark-btn:hover .stat-icon { transform: scale(1.15); }

/* ===== HEADER BOOKMARK ICON & BADGE ===== */
.nav-bookmark { position: relative; }
.bookmark-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #f5b800;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  line-height: 16px;
  text-align: center;
  display: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.nav-bookmark:hover { transform: scale(1.1); transition: transform 0.15s; }

/* === bookmarks page === */
.bookmarks-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 20px;
  flex-wrap: wrap;
}
.bookmarks-header h1 { margin: 0; font-size: 1.6rem; }
.bookmarks-count { margin: 0; color: #666; font-size: 0.95rem; }
.bookmarks-count #bookmarks-count-num { font-weight: 700; color: #f5b800; font-size: 1.1rem; }
#bookmarks-clear-btn { margin-left: auto; }
.bookmarks-empty {
  text-align: center;
  padding: 80px 20px;
  color: #888;
}
.bookmarks-empty .empty-icon { font-size: 4rem; margin-bottom: 12px; }
.bookmarks-empty p { font-size: 1.1rem; margin: 12px 0 24px; }
/* ===== Card Attribution (Creator + Source) ===== */
.card-attribution {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.78rem;
  color: #888;
  line-height: 1.4;
}
.card-attribution a {
  color: #555;
  text-decoration: none;
  transition: color 0.15s;
}
.card-attribution a:hover {
  color: #ff6d5a;
  text-decoration: underline;
}

/* ===== 법적 고지 푸터 ===== */
.legal-footer { margin-top: 60px; padding: 24px 16px; border-top: 1px solid var(--border, #2a2a3a); text-align: center; }
.legal-footer-title { font-size: 0.875rem; color: var(--text-muted, #808090); margin-bottom: 12px; }
.legal-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 0.875rem; }
.legal-footer-links a { color: var(--text-secondary, #b0b0c0); text-decoration: none; }
.legal-footer-links a:hover { color: var(--accent, #ff7a45); }
.legal-footer-copyright { margin-top: 16px; font-size: 0.8rem; color: var(--text-muted, #808090); }

/* ===== 법적 고지 푸터 ===== */
.legal-footer { margin-top: 60px; padding: 24px 16px; border-top: 1px solid var(--border, #2a2a3a); text-align: center; }
.legal-footer-title { font-size: 0.875rem; color: var(--text-muted, #808090); margin-bottom: 12px; }
.legal-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 0.875rem; }
.legal-footer-links a { color: var(--text-secondary, #b0b0c0); text-decoration: none; }
.legal-footer-links a:hover { color: var(--accent, #ff7a45); }
.legal-footer-copyright { margin-top: 16px; font-size: 0.8rem; color: var(--text-muted, #808090); }
