:root {
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #888;
  --line: #e8e8e8;
  --bg: #fafaf7;
  --surface: #ffffff;
  --accent: #2a5c3f;
  --accent-soft: #edf4ef;
}
* { box-sizing: border-box; }
body {
  font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  margin: 0; padding: 0;
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}
a { color: inherit; text-decoration: none; }

.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
}
.nav a { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav a.logo { font-weight: 700; color: var(--ink); font-size: 17px; letter-spacing: -0.3px; }
.nav a:hover, .nav a.active { color: var(--ink); }

.hero-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--accent-soft) 100%);
  padding: 60px 24px 40px;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 40px;
}
.hero-text h1 { font-size: 38px; font-weight: 700; margin: 0 0 16px; letter-spacing: -1px; line-height: 1.3; }
.hero-text p { font-size: 18px; color: var(--ink-2); margin: 0 0 32px; }

.hero-visual {
  display: flex; align-items: center; gap: 24px;
}
.hero-illust { width: 180px; height: auto; display: block; }
.stats-container { display: flex; flex-direction: column; gap: 16px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.stat-icon { width: 40px; height: 40px; }
.stat-num { font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.1; letter-spacing: -0.5px; }
.stat-label { font-size: 14px; color: var(--ink-2); }

.search-bar { display: flex; gap: 8px; width: 100%; }
.form-control {
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 16px; font-family: inherit; outline: none; background: var(--surface); color: var(--ink);
}
.form-control:focus { border-color: var(--accent); }
.form-control:disabled { background: #f5f5f5; color: var(--ink-3); cursor: not-allowed; }
#region-select, #m-region-select { width: 140px; flex-shrink: 0; }
#sigungu-select, #m-sigungu-select { width: 140px; flex-shrink: 0; }
#keyword-input, #m-keyword-input { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 16px;
  cursor: pointer; transition: all 0.15s; border: 1px solid transparent; min-height: 48px;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #204a32; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { width: 20px; height: 20px; }

.mobile-only { display: none; }
.desktop-only { display: flex; }

.search-section {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 16px 24px; position: sticky; top: 0; z-index: 100;
}

.main-content { max-width: 1100px; margin: 0 auto; padding: 40px 24px; min-height: 50vh; }
.content-header { margin-bottom: 24px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 15px;
  cursor: pointer; transition: all 0.15s; font-weight: 500;
}
.chip:hover { border-color: var(--ink-3); }
.chip.active { background: var(--accent); color: white; border-color: var(--accent); }

.result-actions { display: flex; justify-content: space-between; align-items: center; }
.result-info { font-weight: 600; font-size: 18px; }
.result-info span { color: var(--accent); }
.sort-select { padding: 8px 12px; height: 40px; font-size: 15px; border-color: var(--line); border-radius: 6px; }

.job-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.post-card {
  padding: 24px; border: 1px solid var(--line); border-radius: 12px;
  transition: all 0.2s; background: var(--surface); cursor: pointer;
  display: flex; flex-direction: column;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 8px;}
.fclt-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 4px 8px; border-radius: 4px;
}
.fclt-badge img { width: 14px; height: 14px; }
.fclt-badge.care { background: #e6f4ea; color: #1e8e3e; }
.fclt-badge.home { background: #e8f0fe; color: #1a73e8; }
.fclt-badge.day { background: #fef7e0; color: #f29900; }
.fclt-badge.other { background: #f1f3f4; color: #5f6368; }

.badge { font-size: 12px; padding: 4px 8px; border-radius: 4px; font-weight: 700; white-space: nowrap; }
.badge.today { background: #eef2ff; color: #4f46e5; }
.badge.urgent { background: #fee2e2; color: #dc2626; }
.badge.normal { background: var(--surface); color: var(--ink-3); border: 1px solid var(--line); }

.company { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.post-card h3 { font-size: 19px; font-weight: 700; margin: 0 0 16px; line-height: 1.4; letter-spacing: -0.3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.meta-row { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }
.meta-row img { width: 16px; height: 16px; opacity: 0.6; margin-top: 4px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; margin-top: auto; }
.insurances { display: flex; gap: 4px; }
.ins-badge {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%;
}
.ins-badge img { width: 14px; height: 14px; }
.ins-badge.active { background: #e6f4ea; color: #1e8e3e; }
.ins-badge.inactive { background: #f5f5f5; color: #ccc; }

.card-more { font-size: 14px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 4px; }

.empty-state { text-align: center; padding: 60px 0; grid-column: 1/-1; }
.empty-illust { width: 120px; height: auto; margin-bottom: 24px; opacity: 0.8; }
.empty-state p { color: var(--ink-2); font-size: 18px; font-weight: 600; line-height: 1.5; margin: 0; }
.empty-state small { font-weight: 400; color: var(--ink-3); font-size: 15px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.page-numbers { display: flex; gap: 4px; }
.page-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--ink-2); transition: all 0.15s;
}
.page-btn:hover { background: var(--line); }
.page-btn.active { background: var(--ink); color: white; }

.footer { background: #1a1a1a; color: #999; padding: 48px 24px; text-align: center; font-size: 14px; margin-top: 60px;}
.footer a { color: #ccc; margin: 0 10px; }
.footer .brand { color: #fff; font-weight: 700; margin-bottom: 8px; }

/* Modal */
.modal {
  display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5); align-items: flex-end; justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
  background-color: var(--surface); padding: 32px; border-radius: 20px 20px 0 0;
  max-width: 600px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.3s ease-out forwards;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.close-btn { font-size: 28px; font-weight: bold; cursor: pointer; color: var(--ink-3); line-height: 1; }
.close-btn:hover { color: var(--ink); }

.modal-company { font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.modal-title { font-size: 24px; font-weight: 700; margin: 0 0 24px; letter-spacing: -0.5px; line-height: 1.3; }

.modal-highlight {
  display: flex; gap: 16px; background: var(--bg); border-radius: 12px; padding: 20px; margin-bottom: 32px; border: 1px solid var(--line);
}
.highlight-item { flex: 1; }
.hl-label { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.hl-value { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.5px; }
.hl-value.highlight-accent { color: var(--accent); }

.modal-sections { display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.section-item { display: flex; gap: 16px; }
.section-icon-box {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent);
}
.section-icon-box img { width: 18px; height: 18px; }
.section-content { flex: 1; }
.section-content h4 { font-size: 14px; color: var(--ink-3); margin: 0 0 4px; font-weight: 600; }
.section-content p { margin: 0; font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.section-content a { color: var(--accent); text-decoration: underline; }

.modal-actions { position: sticky; bottom: 0; padding-top: 16px; background: var(--surface); border-top: 1px solid var(--bg); margin: 0 -32px -32px; padding: 20px 32px 32px; }

@media (min-width: 768px) {
  .modal { align-items: center; padding: 20px; }
  .modal-content { border-radius: 20px; animation: fadeIn 0.2s ease-out forwards; }
  @keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
  .modal-actions { margin: 0; padding: 24px 0 0; position: static; border: none; }
}

@media (max-width: 900px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-visual { width: 100%; justify-content: center; }
  .stats-container { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .job-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  .hero-text h1 { font-size: 28px; }
  .hero-visual { flex-direction: column; }
  .job-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; gap: 12px; }
  #region-select, #sigungu-select, #keyword-input { width: 100%; }
  #m-region-select, #m-sigungu-select, #m-keyword-input { width: 100%; }
  .result-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sort-select { width: 100%; }
  #page-info { display: inline-block !important; }
}

/* Skeleton */
.skeleton-box {
  background: var(--line);
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: 4px;
}
@keyframes pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-card {
  padding: 24px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); display: flex; flex-direction: column; gap: 16px;
}
.sk-header { display: flex; justify-content: space-between; }
.sk-badge { width: 60px; height: 24px; }
.sk-badge2 { width: 50px; height: 24px; }
.sk-title { width: 80%; height: 24px; }
.sk-title2 { width: 60%; height: 24px; }
.sk-meta { width: 100%; height: 16px; margin-bottom: 8px; }
.sk-meta-short { width: 70%; height: 16px; }

/* Fade-in */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}
