:root {
  --green: #03c75a;
  --green-dark: #02a84a;
  --green-light: #eefbf3;
  --bg: #f5f6f8;
  --card: #fff;
  --text: #222;
  --muted: #888;
  --border: #e8ebed;
  --border-dark: #d0d4d8;
  --sidebar-w: 280px;
}

* { box-sizing: border-box; }

.hidden {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

body.admin-open {
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--green-dark);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.icon-btn:hover {
  background: var(--green-light);
  border-color: var(--green);
}

.icon-btn.running {
  animation: pulse 1.2s infinite;
  border-color: var(--green);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ── 크롤링 모달 ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
}

.crawl-panel {
  padding-bottom: 8px;
}

.settings-panel {
  width: min(840px, 100%);
}

.settings-body {
  padding: 0 20px 20px;
}

.settings-intro {
  margin: 14px 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-version {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.settings-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.settings-meta-input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.region-settings-list {
  display: grid;
  gap: 12px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
}

.region-setting-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg);
}

.region-setting-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.region-label-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.region-id-badge {
  font-size: 11px;
  color: var(--muted);
  background: var(--card);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.region-setting-type {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 12px;
}

.region-setting-type label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.region-eup-input,
.region-city-input,
.region-suffix-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 10px;
  align-items: end;
}

.settings-status {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--green-dark);
}

.settings-status.error {
  color: #c0392b;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.crawl-stats {
  margin: 12px 20px 0;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.crawl-stats em {
  font-style: normal;
  color: var(--green-dark);
  font-weight: 700;
}

.crawl-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.crawl-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.creator-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.creator-form input,
.creator-form select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  min-width: 0;
}

.creator-form button {
  grid-column: span 2;
}

.creator-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.creator-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.creator-list .cr-info {
  flex: 1;
  min-width: 0;
}

.creator-list .cr-name {
  font-weight: 700;
}

.creator-list .cr-meta {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-list .cr-del {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.crawl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.inline-label input {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.crawl-hint--top {
  margin: 0 0 10px;
  line-height: 1.5;
}

.hint-inline {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.creator-form input[type="text"],
.creator-form input[type="url"] {
  grid-column: span 1;
}

#crNotes {
  grid-column: span 2;
}

.crawl-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.crawl-log {
  margin-top: 12px;
  padding: 10px 12px;
  background: #1e1e1e;
  color: #b8f0c8;
  border-radius: 8px;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn.primary:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.badge {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.tabs {
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
}

.tab-badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.tab-badge.hidden {
  display: none;
}

.tabs.hidden {
  display: none;
}

/* ── 설정 화면 (전체 화면 전환) ── */
.admin-panel {
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.admin-panel.active {
  display: flex;
  height: 100%;
  min-height: 0;
}

.admin-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
}

.admin-back-btn:hover {
  background: var(--green-light);
}

.admin-title {
  margin: 0;
  font-size: 17px;
}

.admin-tabs {
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
  flex-shrink: 0;
}

.admin-tab {
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}

.admin-tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
}

.admin-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 24px;
}

.admin-body--flush {
  overflow: hidden;
  padding: 0 16px;
}

.admin-pane--wide {
  max-width: none;
  padding-bottom: 0;
}

#admin-pane-sources.active,
#admin-pane-enrich.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 112px);
  overflow: hidden;
}

.sources-sub-pane {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.sources-sub-pane.active {
  display: flex;
}

#sources-sub-match .tourapi-layout {
  flex: 1;
  min-height: 0;
}

#admin-pane-enrich.active .enrich-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.crawl-subtab .tab-badge {
  margin-left: 4px;
  vertical-align: middle;
}

.admin-pane {
  display: none;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

.admin-pane.active {
  display: block;
}

#admin-pane-crawls {
  max-width: 1100px;
  padding-bottom: 16px;
}

#admin-pane-blog-authors {
  max-width: none;
  padding-bottom: 16px;
}

#admin-pane-lodging-airbnb,
#admin-pane-spot-visitjeju {
  max-width: none;
  padding-bottom: 16px;
}

.lodging-airbnb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 12px 0 4px;
}

.lodging-airbnb-title {
  margin: 0;
  font-size: 1.1rem;
}

.lodging-airbnb-summary {
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 10px;
  border-radius: 999px;
}

.tag-dup {
  display: inline-block;
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.35;
  max-width: 120px;
}

.spot-brief-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.65;
}

.spot-brief-list li {
  margin-bottom: 0.35rem;
}

.detail-vj-body p {
  margin: 0 0 0.75rem;
  line-height: 1.65;
}

.detail-vj-title {
  margin: 0 0 0.35rem;
}

.lodging-airbnb-intro {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
}

.lodging-airbnb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 8px;
}

.lodging-airbnb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #555;
}

.lodging-airbnb-field input,
.lodging-airbnb-field select {
  min-width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.lodging-airbnb-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.lodging-airbnb-table-wrap {
  overflow: auto;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 10px;
  max-height: min(70vh, 720px);
}

.lodging-airbnb-table tbody tr.lodging-airbnb-row {
  cursor: pointer;
}

.lodging-airbnb-table tbody tr.lodging-airbnb-row:hover {
  background: #f8faf8;
}

.lodging-airbnb-table th,
.lodging-airbnb-table td {
  font-size: 12px;
  padding: 8px 10px;
  vertical-align: top;
}

.lodging-airbnb-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.lodging-airbnb-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.lodging-airbnb-pager span {
  font-size: 13px;
  color: #666;
}

.lodging-airbnb-match-panel {
  width: min(960px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.lodging-airbnb-match-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.lodging-airbnb-match-body {
  display: grid;
  grid-template-columns: minmax(240px, 34%) 1fr;
  gap: 16px;
  padding: 0 16px 16px;
  overflow: auto;
}

.lodging-airbnb-match-source {
  border-right: 1px solid var(--border);
  padding-right: 12px;
}

.lodging-airbnb-match-source h3,
.lodging-airbnb-match-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.lodging-airbnb-match-dl {
  margin: 0 0 12px;
  font-size: 13px;
}

.lodging-airbnb-match-dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.lodging-airbnb-match-dl dt {
  color: var(--muted);
}

.lodging-airbnb-match-dl dd {
  margin: 0;
  word-break: break-word;
}

.lodging-airbnb-match-current {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.lodging-airbnb-match-current h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.lodging-airbnb-match-section {
  margin-bottom: 16px;
}

@media (max-width: 760px) {
  .lodging-airbnb-match-body {
    grid-template-columns: 1fr;
  }

  .lodging-airbnb-match-source {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 12px;
  }
}

.blog-authors-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 12px 0 4px;
}

.blog-authors-title {
  margin: 0;
  font-size: 1.1rem;
}

.blog-authors-summary {
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 10px;
  border-radius: 999px;
}

.blog-authors-intro {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
}

.blog-authors-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 8px;
}

.blog-authors-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #555;
}

.blog-authors-field input {
  min-width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.blog-authors-field input[type="number"] {
  min-width: 88px;
  width: 88px;
}

.blog-authors-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.blog-authors-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 240px);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 10px;
  background: var(--card, #fff);
}

.blog-authors-table tbody tr:not(.table-spacer) {
  height: auto;
  min-height: 40px;
  cursor: default;
  contain-intrinsic-size: auto 40px;
}

.blog-authors-table tbody tr:not(.table-spacer):hover {
  background: #f8fffb;
}

.blog-authors-table th,
.blog-authors-table td {
  padding: 6px 8px;
  font-size: 13px;
  vertical-align: middle;
}

.blog-authors-table thead th {
  padding: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.blog-authors-table .col-rank {
  width: 36px;
  text-align: right;
  color: #888;
}

.blog-authors-table .col-blog-id {
  width: 92px;
}

.blog-authors-table .col-blog-name {
  width: 12%;
  min-width: 88px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-authors-table .col-num {
  width: 56px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.blog-authors-table th.col-review-lte {
  width: 52px;
  font-size: 11px;
  letter-spacing: -0.02em;
}

.blog-authors-table .col-links {
  width: 84px;
  white-space: normal;
  line-height: 1.35;
  font-size: 12px;
}

.blog-authors-table .col-links a {
  white-space: nowrap;
}

.blog-authors-table th.col-sort {
  cursor: pointer;
  user-select: none;
}

.blog-authors-table th.col-sort:hover {
  color: var(--green-dark, #2e7d32);
}

.blog-id-code {
  font-size: 12px;
  background: #f5f5f5;
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-all;
  white-space: normal;
}

.blog-authors-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.blog-authors-pager span {
  font-size: 13px;
  color: #666;
  min-width: 64px;
  text-align: center;
}

.blog-authors-table .col-jeju,
.blog-authors-table .col-promo {
  width: 52px;
  min-width: 52px;
  text-align: center;
  white-space: nowrap;
}

.blog-class-field {
  display: flex;
  justify-content: center;
}

.blog-class-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
  color: #444;
}

.blog-class-toggle input {
  margin: 0;
  width: 14px;
  height: 14px;
}

.blog-class-state {
  font-size: 11px;
  color: #888;
  min-width: 28px;
}

.blog-class-toggle:has(input:checked) .blog-class-state {
  color: #2e7d32;
  font-weight: 600;
}

.blog-label-save {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 11px;
  min-height: 26px;
  margin: 0;
  white-space: nowrap;
}

.blog-label-save.dirty:not(:disabled) {
  background: #e8f5e9;
  border-color: #81c784;
  color: #2e7d32;
}

.blog-labels-muted {
  font-size: 11px;
  color: #999;
}

.blog-authors-table .col-notes {
  width: 80px;
  min-width: 72px;
  max-width: 96px;
  white-space: normal;
  overflow: visible;
}

.blog-authors-table .col-save {
  width: 52px;
  min-width: 48px;
  max-width: 56px;
  text-align: center;
  padding-left: 4px;
  padding-right: 6px;
}

.blog-notes-pick-btn {
  display: block;
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}

.blog-notes-pick-btn:hover {
  border-color: #81c784;
  background: #f9fdf9;
}

.blog-notes-pick-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-notes-pick-btn:has(.blog-notes-pick-text:empty),
.blog-notes-pick-text:empty {
  color: #999;
}

.blog-notes-modal-panel {
  width: min(440px, calc(100vw - 32px));
}

.blog-notes-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-notes-modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.blog-notes-modal-sub {
  margin: 0 0 10px;
  font-size: 13px;
  color: #666;
}

.blog-notes-modal-input {
  width: 100%;
  min-height: 160px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.blog-notes-modal-input:focus {
  outline: none;
  border-color: #81c784;
  box-shadow: 0 0 0 2px rgba(129, 199, 132, 0.25);
}

.blog-notes-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.blog-authors-table .col-hobbies {
  width: 108px;
  min-width: 96px;
  max-width: 120px;
  white-space: normal;
  overflow: visible;
}

.blog-hobby-pick-btn {
  display: block;
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}

.blog-hobby-pick-btn:hover {
  border-color: #81c784;
  background: #f9fdf9;
}

.blog-hobby-pick-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.25;
}

.blog-hobby-pick-panel {
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.blog-hobby-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-hobby-pick-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.blog-hobby-pick-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
}

.blog-hobby-pick-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 10px;
  background: #fafafa;
}

.blog-hobby-pick-empty {
  margin: 0;
  padding: 12px 8px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.blog-hobby-pick-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  background: #fff;
  border: 1px solid transparent;
}

.blog-hobby-pick-option:hover {
  border-color: #c8e6c9;
  background: #f1f8f1;
}

.blog-hobby-pick-option input {
  margin: 0;
  flex-shrink: 0;
}

.blog-hobby-pick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.blog-hobby-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.blog-hobby-modal-panel {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.blog-hobby-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-hobby-modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.blog-hobby-modal-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: #777;
}

.blog-hobby-modal-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 10px;
  overflow: hidden;
}

.blog-hobby-modal-empty {
  padding: 16px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.blog-hobby-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #eee);
  background: #fff;
}

.blog-hobby-modal-item:last-child {
  border-bottom: none;
}

.blog-hobby-modal-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.blog-hobby-modal-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.blog-hobby-modal-id {
  font-size: 11px;
  color: #888;
  background: #f5f5f5;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.blog-hobby-modal-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.blog-hobby-move-btn {
  min-width: 32px;
  padding: 2px 6px;
  font-size: 12px;
}

.blog-hobby-delete-btn {
  padding: 2px 8px;
  font-size: 11px;
  color: #c62828;
}

.blog-hobby-modal-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
}

.blog-hobby-modal-status {
  margin: 10px 0 0;
  font-size: 12px;
  color: #666;
}

.blog-authors-table tbody tr[data-blog-row] {
  cursor: pointer;
}

.blog-authors-table tbody tr[data-blog-row]:hover .col-review-lte {
  color: var(--accent, #1a73e8);
  font-weight: 600;
}

.blog-author-places-panel {
  width: min(1520px, 99vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}

.blog-author-places-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.blog-author-places-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 42%);
  gap: 16px;
  padding: 0 18px 18px;
  min-height: 520px;
  flex: 1;
  overflow: hidden;
}

.blog-author-places-list-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.blog-author-places-meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: #666;
}

.blog-author-places-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.blog-author-places-table {
  width: 100%;
  font-size: 12px;
}

.blog-author-places-table th,
.blog-author-places-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.blog-author-places-table thead th {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 1;
  white-space: nowrap;
}

.blog-author-places-table tbody tr {
  cursor: pointer;
}

.blog-author-places-table tbody tr:hover {
  background: #f5f8ff;
}

.blog-author-places-table tbody tr.is-selected {
  background: #e8f0fe;
}

.blog-author-places-table .col-name {
  min-width: 120px;
  font-weight: 600;
}

.blog-author-places-table .col-addr {
  min-width: 160px;
  max-width: 220px;
  word-break: keep-all;
}

.blog-author-places-table .col-cat,
.blog-author-places-table .col-region {
  max-width: 120px;
  color: #555;
}

.blog-author-places-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.blog-author-places-table .col-links {
  white-space: nowrap;
}

.blog-author-places-table .col-links a {
  margin-right: 6px;
}

.blog-author-places-map-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.blog-author-places-map {
  flex: 1;
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef2f6;
}

.blog-author-places-map-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #888;
}

@media (max-width: 900px) {
  .blog-author-places-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .blog-author-places-map {
    min-height: 280px;
  }
}

.crawl-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border, #e0e0e0);
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg, #fff);
}

.crawl-subtab {
  padding: 6px 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 999px;
  background: #fafafa;
  font-size: 13px;
  cursor: pointer;
}

.crawl-subtab.active {
  background: #e8f5e9;
  border-color: #81c784;
  color: #2e7d32;
  font-weight: 600;
}

.crawl-sub-pane {
  display: none;
}

.crawl-sub-pane.active {
  display: block;
}

.crawl-hub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.crawl-hub-title {
  margin: 0;
  font-size: 1.1rem;
}

.crawl-hub-pct {
  margin-left: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
}

.crawl-hub-summary {
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 10px;
  border-radius: 999px;
}

.crawl-hub-summary.error {
  color: #c0392b;
  background: #fdecea;
}

.crawl-stage-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.crawl-hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.crawl-run-panel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: #f8faf8;
  border: 1px solid #e0e8e0;
  border-radius: 8px;
}

.crawl-run-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.crawl-run-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

.crawl-run-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.crawl-run-field select,
.crawl-run-field input[type="number"] {
  min-width: 180px;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.crawl-run-field input[type="number"] {
  min-width: 100px;
}

.crawl-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crawl-filter-options-scroll {
  max-height: min(320px, 50vh);
  overflow-y: auto;
}

.crawl-hub-table-wrap {
  position: relative;
  margin: 12px 0;
  overflow: auto;
  max-height: min(62vh, 680px);
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.crawl-hub-table-wrap .crawl-hub-table {
  border: none;
  border-radius: 0;
  margin: 0;
}

.crawl-hub-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fafbfc;
  box-shadow: 0 1px 0 var(--border);
}

.crawl-hub-table thead th .sources-col-btn {
  background: #fafbfc;
}

.crawl-table-meta {
  font-size: 12px;
  color: #666;
  margin: 12px 0 6px;
}

.crawl-hub-table-wrap + .btn {
  margin-top: 8px;
}

.crawl-hub-table {
  width: 100%;
  font-size: 13px;
}

.crawl-hub-table code {
  font-size: 11px;
}

.crawl-hub-table--narrative {
  min-width: 980px;
}

.crawl-hub-table--narrative .crawl-col-title {
  width: 22%;
}

.crawl-hub-table--narrative .crawl-col-source {
  width: 10%;
}

.crawl-hub-table--narrative .crawl-col-type {
  width: 12%;
}

.crawl-hub-table--narrative .crawl-col-category {
  width: 16%;
  min-width: 120px;
}

.crawl-hub-table--narrative .crawl-col-keyword {
  width: 12%;
}

.crawl-hub-table--narrative .crawl-col-geo {
  width: 10%;
}

.crawl-hub-table--narrative .crawl-col-updated {
  width: 12%;
}

.crawl-row-clickable {
  cursor: pointer;
}

.crawl-row-clickable:hover td {
  background: #f3faf5;
}

.crawl-detail-panel {
  width: min(860px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.crawl-detail-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.crawl-detail-subtitle {
  margin: 0 0 8px;
  color: #666;
  font-size: 14px;
}

.crawl-detail-link {
  margin: 0 0 12px;
}

.crawl-detail-link a {
  color: var(--green-dark);
  font-weight: 600;
}

.crawl-detail-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #f8faf9;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.crawl-detail-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border-bottom: none;
  font-size: 12px;
}

.crawl-detail-field dt {
  margin: 0;
  color: #888;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.crawl-detail-field dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crawl-detail-field dd[title] {
  cursor: help;
}

@media (max-width: 720px) {
  .crawl-detail-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .crawl-detail-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.crawl-detail-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.crawl-detail-body-text {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 14px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 14px;
  max-height: 50vh;
  overflow-y: auto;
}

.crawl-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.crawl-meta-chip {
  font-size: 12px;
  padding: 2px 8px;
  background: #f0f4f8;
  border-radius: 4px;
}

.crawl-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.crawl-status--done {
  background: #e8f5e9;
  color: #2e7d32;
}

.crawl-status--pending {
  background: #fff3e0;
  color: #e65100;
}

.crawl-status--failed {
  background: #ffebee;
  color: #c62828;
}

#panel-admin .region-settings-list {
  max-height: none;
}

#panel-admin .settings-body {
  padding-top: 16px;
}

#panel-admin .crawl-stats {
  margin: 16px 0 0;
}

main {
  flex: 1;
  min-height: 0;
  position: relative;
}

.panel {
  display: none;
  height: 100%;
}

.panel.active {
  display: block;
}

.panel.admin-panel.active {
  display: flex;
}

#panel-map {
  position: relative;
}

.map-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
}

.map-layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.map-type-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-type-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.map-type-filter select,
.filter-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.leaflet-marker-icon.custom-pin.lodging-pin {
  background: #3b82f6;
}

.leaflet-marker-icon.custom-pin.attraction-pin {
  background: #9333ea;
}

.enrich-domain-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.enrich-domain-tab {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.enrich-domain-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.enrich-type-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.enrich-type-filter select {
  min-width: 140px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.enrich-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.enrich-col-type {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}

#admin-pane-sources,
#admin-pane-enrich {
  overflow: hidden;
}

.tourapi-layout {
  display: flex;
  height: 100%;
  min-height: 0;
}

.tourapi-queue {
  width: min(320px, 36vw);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--card);
}

.tourapi-queue-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.tourapi-queue-head h2 {
  margin: 0;
  font-size: 16px;
}

.tourapi-queue-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.tourapi-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tourapi-inactive {
  color: #c62828;
}

.tourapi-summary {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.tourapi-summary em,
.tourapi-summary b {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
}

.tourapi-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.tourapi-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
}

.tourapi-queue-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.tourapi-queue-item:hover,
.tourapi-queue-item.active {
  background: #eef8f0;
}

.tourapi-queue-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.tourapi-queue-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.tourapi-queue-empty {
  padding: 24px 14px;
  color: var(--muted);
  font-size: 13px;
}

.tourapi-queue-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.tourapi-detail {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 28px;
  min-width: 0;
}

.tourapi-detail-empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
}

.tourapi-detail-body.hidden {
  display: none;
}

.tourapi-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tourapi-source-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.tourapi-detail-head h3 {
  margin: 0;
  font-size: 20px;
}

.tourapi-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13px;
}

.tourapi-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.tourapi-meta dt {
  margin: 0;
  color: var(--muted);
}

.tourapi-meta dd {
  margin: 0;
}

.tourapi-section {
  margin-bottom: 18px;
}

.tourapi-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.tourapi-suggestions,
.tourapi-search-results {
  display: grid;
  gap: 8px;
}

.tourapi-rest-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}

.tourapi-rest-card:hover {
  border-color: var(--green);
  background: #f6fcf7;
}

.tourapi-rest-card--addr {
  border-left: 3px solid #66bb6a;
}

.tourapi-rest-card--addr:hover {
  background: #f6fcf7;
}

.tourapi-rest-card--selected {
  border-color: #1b5e20;
  background: #e8f5e9;
  box-shadow: inset 0 0 0 1px #1b5e20;
}

.tourapi-rest-card--selected:hover {
  background: #e8f5e9;
}

.tourapi-rest-card--compact {
  padding: 8px 10px;
}

.tourapi-rest-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
}

.tourapi-rest-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.tourapi-match-row {
  display: flex;
  gap: 8px;
}

.tourapi-match-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tourapi-selected-rest {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.tourapi-skip-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
}

.tourapi-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--green-dark);
}

.tourapi-status.is-error {
  color: #c62828;
}

.tourapi-muted {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.tourapi-muted.is-error {
  color: #c62828;
}

#map {
  width: 100%;
  height: calc(100vh - 96px);
  background: #eef2f6;
}

.map-load-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: #5f6368;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: normal;
}

.detail-card {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  max-width: 420px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  padding: 16px 40px 16px 16px;
  z-index: 1000;
}

.detail-card.hidden { display: none; }

.close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}

.detail-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.detail-card .meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.detail-card .tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
}

.tag.ppc {
  background: #fff4e5;
  color: #c56a00;
}

.naver-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
}

.naver-link:hover {
  text-decoration: underline;
}

/* ── 목록 레이아웃 ── */
#panel-list {
  overflow: hidden;
}

#panel-list.active {
  display: flex;
  flex-direction: column;
}

.list-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.filter-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 14px 24px;
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filter-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.list-domain-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}

.list-domain-chip:has(input:checked) {
  border-color: #81c784;
  background: #f1f8f1;
  color: #2e7d32;
}

.list-domain-chip input {
  margin: 0;
}

.filter-sidebar:not(.list-mode-restaurant) .filter-block--restaurant {
  display: none;
}

.cell-domain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.cell-domain--lodging {
  background: #e3f2fd;
  color: #1565c0;
}

.detail-badge--lodging {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.text-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

.text-btn:hover {
  color: var(--green-dark);
}

.filter-block {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-block:last-of-type {
  border-bottom: none;
}

.filter-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}


/* 검색 드롭다운 */
.search-select {
  position: relative;
}

.search-select-input {
  width: 100%;
  padding: 9px 32px 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card);
}

.search-select-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(3, 199, 90, .12);
}

.search-select-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--bg);
  color: var(--muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.search-select-clear.hidden {
  display: none;
}

.search-select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 200px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  z-index: 20;
}

.search-select-list.hidden {
  display: none;
}

.search-select-list li {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.search-select-list li:hover,
.search-select-list li.focused {
  background: var(--green-light);
  color: var(--green-dark);
}

.search-select-list li.empty {
  color: var(--muted);
  cursor: default;
}

.search-select-list li.empty:hover {
  background: transparent;
  color: var(--muted);
}

.search-select-list .item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

/* 범위 게이지 (듀얼 슬라이더) */
.gauge-block {
  margin-bottom: 18px;
}

.gauge-block:last-child {
  margin-bottom: 0;
}

.gauge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gauge-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.gauge-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.gauge-track {
  position: relative;
  height: 28px;
}

.gauge-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--green);
  border-radius: 999px;
  pointer-events: none;
}

.gauge-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--border);
  border-radius: 999px;
}

.gauge-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.gauge-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--green);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: pointer;
  pointer-events: all;
}

.gauge-thumb::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--green);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: pointer;
  pointer-events: all;
}

.gauge-thumb::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.gauge-thumb::-moz-range-track {
  height: 4px;
  background: transparent;
}

.gauge-max {
  z-index: 2;
}

.gauge-min {
  z-index: 3;
}

.gauge-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.apply-gauge-btn {
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: not-allowed;
  transition: background .15s, border-color .15s, color .15s;
}

.apply-gauge-btn.pending {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  cursor: pointer;
}

.apply-gauge-btn.pending:hover {
  background: var(--green-light);
}

.filter-collapse {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.filter-collapse .chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform .2s;
}

.filter-collapse[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.filter-advanced {
  margin-top: 12px;
}

.filter-advanced.hidden {
  display: none;
}

.range-block {
  margin-bottom: 14px;
}

.range-block:last-child {
  margin-bottom: 0;
}

.range-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-inputs input {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.range-inputs span {
  color: var(--muted);
  font-size: 12px;
}

.active-filters {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.active-filters.hidden {
  display: none;
}

.active-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  border: none;
  cursor: pointer;
}

.active-chip:hover {
  background: #dff5e8;
}

.active-chip .remove {
  font-size: 14px;
  line-height: 1;
  opacity: .7;
}

.list-main {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.th-control {
  padding: 0 !important;
}

.th-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 6px 8px 10px;
}

.th-sort-btn,
.th-filter-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 2px 4px;
  border-radius: 4px;
}

.th-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.th-sort-btn:hover,
.th-filter-btn:hover {
  background: rgba(0, 0, 0, .05);
}

.th-sort-mark {
  font-size: 10px;
  color: var(--green-dark);
  min-width: 10px;
}

.th-filter-btn {
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  padding: 4px 6px;
}

.th-control.sorted .th-sort-btn {
  color: var(--green-dark);
}

.th-control.filtered .th-filter-btn {
  color: var(--green-dark);
  font-weight: 700;
}

.col-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: transparent;
}

.col-filter-backdrop.hidden,
.col-filter-menu.hidden,
.sources-filter-menu.hidden {
  display: none;
}

.col-filter-menu {
  position: fixed;
  z-index: 200;
  width: 240px;
  max-height: min(420px, 70vh);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  padding: 8px;
}

.col-filter-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 6px 8px;
}

.col-filter-sort {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.col-filter-sort:hover {
  background: var(--green-soft);
}

.col-filter-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.col-filter-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.col-filter-cities {
  display: flex;
  gap: 8px;
  padding: 4px 0 8px;
}

.col-filter-cities .col-filter-check {
  flex: 1;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.col-filter-menu--location {
  width: min(300px, calc(100vw - 24px));
}

.col-filter-dong-list .col-filter-check span:first-of-type {
  font-weight: 500;
}

.col-filter-values {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 8px;
}

.col-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
}

.col-filter-check:hover {
  background: #f5f7fa;
}

.col-filter-check span:first-of-type {
  flex: 1;
  min-width: 0;
}

.col-filter-count {
  font-size: 11px;
  color: var(--muted);
}

.col-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 4px;
}

.col-filter-actions button {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.col-filter-actions .primary {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 600;
}

.result-count {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.result-count em {
  font-style: normal;
  color: var(--green-dark);
}

.list-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-pagination.hidden {
  display: none;
}

.list-page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.list-page-btn:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green-dark);
}

.list-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.list-page-info {
  min-width: 72px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.sort-group select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card);
  cursor: pointer;
}

.sort-dir {
  min-width: 90px;
}

.table-wrap {
  flex: 1;
  overflow: auto;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fafbfc;
  padding: 11px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--border);
  overflow: hidden;
}

.data-table th {
  position: relative;
  background: #fafbfc;
  padding: 11px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
}

.mention-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mention-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.mention-youtube {
  background: #ffeaea;
  color: #c4302b;
}

.mention-blog {
  background: #e8f7ee;
  color: #03a94d;
}

.mention-tourapi {
  background: #eef3ff;
  color: #2f5fd0;
}

.mention-none {
  color: var(--muted);
}

.data-table tbody tr:not(.table-spacer) {
  height: 54px;
  box-sizing: border-box;
  content-visibility: auto;
  contain-intrinsic-size: auto 54px;
}

.table-spacer td {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.th-label-plain {
  display: block;
  padding-right: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 5;
  touch-action: none;
}

.col-resize-handle::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 1px;
  background: var(--border);
}

.col-resize-handle:hover::after,
body.col-resizing .col-resize-handle::after {
  background: var(--green);
  width: 2px;
  left: 2px;
}

body.col-resizing {
  cursor: col-resize !important;
  user-select: none;
}

body.col-resizing * {
  cursor: col-resize !important;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background .12s;
}

.data-table tbody tr:hover {
  background: #f8fffb;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.col-no {
  text-align: center !important;
  color: var(--muted);
}

.col-name {
  font-weight: 700;
}

.col-name .cell-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-dong {
  white-space: nowrap;
}

.col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.col-addr {
  max-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.col-flag {
  width: 52px;
  text-align: center !important;
}

.cell-name {
  font-weight: 700;
  color: var(--text);
}

.cell-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.cell-rank {
  color: var(--green-dark);
  font-weight: 600;
}

.cell-rank.empty,
.cell-num.empty {
  color: #ccc;
}

.badge-ppc {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff4e5;
  color: #c56a00;
}

.badge-normal {
  color: #ddd;
  font-size: 11px;
}

.empty-cell {
  text-align: center;
  padding: 48px 16px !important;
  color: var(--muted);
}

.leaflet-marker-icon.custom-pin {
  background: var(--green);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  width: 28px !important;
  height: 28px !important;
  margin-left: -14px !important;
  margin-top: -28px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.leaflet-marker-icon.custom-pin.ppc {
  background: #ff6b00;
}

@media (max-width: 900px) {
  .list-layout {
    flex-direction: column;
  }

  .filter-sidebar {
    width: 100%;
    max-height: 42vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .col-addr {
    display: none;
  }

  .data-table .col-addr {
    display: none;
  }
}

@media (max-width: 900px) {
  .tourapi-layout {
    flex-direction: column;
  }

  .tourapi-queue {
    width: 100%;
    max-height: 42vh;
  }
}

@media (max-width: 640px) {
  .detail-card {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .col-cat,
  .data-table th.col-cat,
  .data-table td:nth-child(4) {
    display: none;
  }
}

.badge-crawl {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.crawl-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.crawl-progress.hidden {
  display: none;
}

.badge-crawl--s1 {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
}

.badge-crawl--s2 {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

.badge-crawl--s3 {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffcc80;
}

.badge-crawl.hidden {
  display: none;
}

.detail-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.detail-badge--done {
  background: #e8f5e9;
  color: #2e7d32;
}

.detail-badge--failed {
  background: #ffebee;
  color: #c62828;
}

.detail-badge--pending {
  background: #f5f5f5;
  color: #757575;
}

.cell-name-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--green-dark, #1b5e20);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cell-name-btn:hover {
  color: var(--green, #2e7d32);
}

#restaurantDetailModal:not(.hidden) {
  align-items: stretch;
  padding: 10px;
}

.restaurant-detail-panel {
  width: 100%;
  max-width: calc(100vw - 20px);
  height: calc(100vh - 20px);
  max-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
}

.restaurant-detail-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.restaurant-detail-map-wrap {
  flex: 1 1 42%;
  min-width: 360px;
  max-width: 52%;
  border-left: 1px solid var(--border);
  background: #eef2f0;
}

.restaurant-detail-map-wrap.hidden {
  display: none;
}

.restaurant-detail-map {
  width: 100%;
  height: 100%;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.restaurant-detail-map .leaflet-control-attribution {
  font-size: 9px;
}

.restaurant-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.restaurant-detail-head h2 {
  margin: 0;
  font-size: 17px;
}

.restaurant-detail-body {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 20px;
  overflow: auto;
}

@media (max-width: 900px) {
  .restaurant-detail-layout {
    flex-direction: column;
  }

  .restaurant-detail-map-wrap {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
    height: 240px;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .restaurant-detail-map {
    min-height: 240px;
  }
}

.restaurant-detail-loading,
.detail-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.restaurant-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.restaurant-detail-title-row h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.restaurant-detail-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.restaurant-detail-summary-main {
  flex: 1;
  min-width: 0;
}

.restaurant-detail-photo {
  flex: 0 0 220px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f0;
  border: 1px solid var(--border);
}

.restaurant-detail-photo img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

@media (max-width: 720px) {
  .restaurant-detail-summary {
    flex-direction: column;
  }

  .restaurant-detail-photo {
    flex: none;
    width: 100%;
  }

  .restaurant-detail-photo img {
    height: 200px;
  }
}

.detail-subhead {
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.detail-micro {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.detail-meta-list code {
  font-size: 12px;
}

#resultTableBody tr[data-id] {
  cursor: pointer;
}

#resultTableBody tr[data-id]:hover {
  background: rgba(46, 125, 50, 0.06);
}

.detail-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.detail-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.detail-kw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-kw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f8e9;
  color: #33691e;
  font-size: 12px;
}

.detail-kw em {
  font-style: normal;
  font-weight: 700;
  color: #558b2f;
}

.detail-meta-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.detail-ai-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.detail-updated {
  font-size: 12px;
  color: var(--muted);
}

.detail-error {
  margin-top: 8px;
  font-size: 12px;
  color: #c62828;
}

.tag-pp {
  background: #e3f2fd;
  color: #1565c0;
}

.tag-ai {
  background: #f3e5f5;
  color: #6a1b9a;
}

.source-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.source-type-tab {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.source-type-tab.active {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
  font-weight: 600;
}

.tourapi-type {
  font-style: normal;
  font-size: 10px;
  color: #1565c0;
  background: #e3f2fd;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 4px;
}

.tourapi-type--ad {
  color: #c62828;
  background: #ffebee;
}

.tourapi-type--region {
  color: #6d4c41;
  background: #efebe9;
}

.tourapi-queue-item.is-non-jeju {
  opacity: 0.72;
}

.is-non-jeju-title {
  color: #6d4c41;
}

.tourapi-filter-ad {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
  margin: 6px 0 8px;
  cursor: pointer;
  user-select: none;
}

.tourapi-queue-item.is-ad {
  opacity: 0.88;
}

.tourapi-detail-body .is-ad-title {
  color: #c62828;
}

.tourapi-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tourapi-section-head h4 {
  margin: 0;
}

.tourapi-enrich-names {
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tourapi-name-chip {
  font-size: 12px;
  padding: 2px 8px;
}

.tourapi-enrich-details {
  margin-top: 8px;
  font-size: 12px;
}

.tourapi-enrich-details pre {
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow: auto;
  background: #f5f5f5;
  padding: 8px;
  border-radius: 6px;
}

.source-browse-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.source-browse-match-tabs {
  display: flex;
  gap: 4px;
}

.source-match-tab {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.source-match-tab.active {
  background: #e8f5e9;
  border-color: #81c784;
  color: #2e7d32;
}

.tourapi-queue-item.is-matched {
  border-left: 3px solid #66bb6a;
}

.tourapi-queue-item.is-unmatched {
  border-left: 3px solid #ffb74d;
}

.source-browse-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* ── 출처별 목록 (설정 > 출처) ── */
#admin-pane-sources {
  overflow: hidden;
}

#admin-pane-enrich {
  overflow: hidden;
}

.sources-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.sources-toolbar {
  flex-shrink: 0;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.sources-toolbar-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.sources-toolbar-head .source-type-tabs {
  margin: 8px 0 6px;
}

.sources-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.sources-toolbar-actions .tourapi-search {
  flex: 1;
  min-width: 220px;
}

.sources-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sources-table-wrap {
  flex: 1;
  min-height: 0;
}

.sources-table .sources-col-type { width: 72px; }
.sources-table .sources-col-program { width: 140px; }
.sources-table .sources-col-creator { width: 96px; }
.sources-table.sources-hide-creator .sources-col-creator,
.sources-table.sources-hide-creator tbody td:nth-child(3) {
  display: none;
}
.sources-table .sources-col-title { width: 14%; }
.sources-table .sources-col-addr { width: 24%; }
.sources-table .sources-col-match { width: 72px; }
.sources-table .sources-col-rest { width: 16%; }
.sources-table .sources-col-actions { width: 140px; }

.sources-col-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.sources-col-btn:hover {
  color: var(--accent, #1976d2);
}

.sources-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eceff1;
}

.sources-type-broadcast { background: #fce4ec; color: #c2185b; }
.sources-type-youtube { background: #ffebee; color: #c62828; }
.sources-type-naver_blog { background: #e8f5e9; color: #2e7d32; }
.sources-type-tourapi { background: #e3f2fd; color: #1565c0; }
.sources-type-daco_hidden { background: #fff8e1; color: #f57f17; }

.sources-program-daco {
  background: #fff8e1;
  color: #f57f17;
}

.sources-program-unknown {
  color: #9e9e9e;
  font-size: 12px;
}

.sources-row.is-matched td:first-child {
  box-shadow: inset 3px 0 0 #66bb6a;
}

.sources-row.is-unmatched td:first-child {
  box-shadow: inset 3px 0 0 #ffb74d;
}

.sources-title {
  font-weight: 600;
}

.sources-addr,
.sources-muted {
  color: var(--muted);
  font-size: 12px;
}

.sources-rest-name {
  display: block;
  font-weight: 600;
}

.sources-rest-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.sources-unmatched,
.sources-match-no {
  color: #ef6c00;
  font-size: 12px;
}

.sources-match-ok {
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
}

.sources-actions {
  white-space: nowrap;
}

.sources-actions .btn-sm {
  font-size: 11px;
  padding: 3px 8px;
  margin-right: 4px;
}

.sources-filter-menu {
  position: fixed;
  z-index: 200;
  min-width: 160px;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px;
}

.sources-col-btn.filtered {
  color: var(--green-dark, #2e7d32);
  font-weight: 700;
}

.sources-filter-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 6px 8px;
}

.sources-filter-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.sources-filter-opt:hover,
.sources-filter-opt.active {
  background: #e8f5e9;
  color: #2e7d32;
}

.sources-filter-values {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 8px;
}

.sources-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
}

.sources-filter-check:hover {
  background: #f5f7fa;
}

.sources-filter-check span {
  flex: 1;
  min-width: 0;
}

.sources-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 4px;
}

.sources-filter-actions button {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sources-filter-actions .primary {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 600;
}

.sources-program-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3e5f5;
  color: #6a1b9a;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.sources-program-markers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 100%;
}

.sources-program-markers .sources-program-badge {
  cursor: default;
}

.sources-program-more {
  display: inline-block;
  padding: 2px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #6a1b9a;
  cursor: default;
}

.btn.hidden {
  display: none;
}

/* 2·3단계 수집 데이터 탭 */
.enrich-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.enrich-toolbar {
  flex-shrink: 0;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: relative;
  z-index: 5;
}

.enrich-toolbar-head h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.enrich-stage-tabs,
.enrich-domain-tabs,
.enrich-status-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.enrich-stage-tab,
.enrich-domain-tab,
.enrich-status-tab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.enrich-stage-tab.active {
  background: #e3f2fd;
  border-color: #64b5f6;
  color: #1565c0;
  font-weight: 600;
}

.enrich-status-tab.active {
  background: #f3e5f5;
  border-color: #ce93d8;
  color: #6a1b9a;
  font-weight: 600;
}

.enrich-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.enrich-toolbar-actions .tourapi-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.enrich-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.enrich-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 8px 12px;
  -webkit-overflow-scrolling: touch;
}

.enrich-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fafbfc;
  box-shadow: 0 1px 0 var(--border);
}

.enrich-table .enrich-col-name {
  min-width: 140px;
}

.enrich-name-btn {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--green-dark);
  text-align: left;
  cursor: pointer;
}

.enrich-name-btn:hover {
  text-decoration: underline;
}

.enrich-table .enrich-col-actions .text-btn {
  cursor: pointer;
}

.enrich-row--clickable {
  cursor: pointer;
}

.enrich-row--clickable:hover td {
  background: #f3faf5;
}

.enrich-table .enrich-col-addr {
  min-width: 180px;
  max-width: 280px;
  font-size: 12px;
  color: var(--muted);
}

.enrich-table .enrich-col-date {
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.enrich-table .enrich-col-actions {
  white-space: nowrap;
}

.enrich-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.enrich-status--done {
  background: #e8f5e9;
  color: #2e7d32;
}

.enrich-status--pending {
  background: #fff8e1;
  color: #f57f17;
}

.enrich-status--failed {
  background: #ffebee;
  color: #c62828;
}

.enrich-yes {
  color: #2e7d32;
  font-weight: 700;
}

.enrich-no {
  color: var(--muted);
}

.enrich-error {
  margin-top: 4px;
  font-size: 11px;
  color: #c62828;
}

.enrich-review-panel {
  max-width: 720px;
  width: calc(100vw - 32px);
  max-height: 90vh;
}

.enrich-review-body {
  overflow: auto;
  padding: 16px 20px 24px;
  max-height: calc(90vh - 56px);
}

.enrich-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.enrich-review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.enrich-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.enrich-review-rating {
  color: #f57c00;
  font-weight: 700;
}

.enrich-review-text {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.enrich-review-kw {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.enrich-review-reply {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #90caf9;
  background: #f5f9ff;
  font-size: 13px;
  color: #37474f;
}

/* ── 설정 대시보드 ── */
.dash-intro {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.dash-intro--crawl {
  margin: 0 0 16px;
  padding: 0 4px;
}

.admin-dashboard {
  padding: 4px 0 16px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.dash-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.dash-card--wide {
  grid-column: 1 / -1;
}

.dash-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dash-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.dash-card-meta {
  font-size: 12px;
  color: var(--muted);
}

.dash-card-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.dash-card-sub {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dash-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.dash-progress-label {
  font-size: 13px;
  font-weight: 600;
}

.dash-progress-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
}

.dash-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #eceff1;
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #66bb6a, #2e7d32);
  transition: width 0.3s ease;
}

.dash-progress-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.dash-progress--count .dash-progress-meta {
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dash-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.dash-stat {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f7f6;
  text-align: center;
}

.dash-stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.dash-stat-value {
  font-size: 15px;
  color: var(--text);
}

.dash-loading,
.dash-error,
.dash-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.dash-error {
  color: #c62828;
}

.dash-region-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.dash-region-row {
  display: grid;
  grid-template-columns: 120px 1fr 56px;
  gap: 10px;
  align-items: center;
}

.dash-region-label {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-region-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: #eceff1;
  overflow: hidden;
}

.dash-region-bar {
  height: 100%;
  border-radius: 999px;
  background: #81c784;
  min-width: 2px;
}

.dash-region-count {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.enrich-toolbar--dash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.region-settings-details {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.region-settings-details > summary {
  padding: 14px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.region-settings-details > summary::-webkit-details-marker {
  display: none;
}

.region-settings-details > .settings-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}

#admin-pane-crawls.dashboard-mode.active {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crawl-core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.crawl-extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.crawl-extra-grid::before {
  content: "기타 수집";
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 4px;
}

#admin-pane-crawls.dashboard-mode .crawl-core-grid .crawl-sub-pane {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  min-height: 0;
}

.crawl-progress-panel {
  flex: 1;
  margin: 10px 0 12px;
}

#admin-pane-crawls.dashboard-mode .crawl-core-grid .crawl-progress-panel {
  flex: 0 0 auto;
  min-height: 96px;
}

#admin-pane-crawls.dashboard-mode .crawl-subtabs {
  display: none;
}

#admin-pane-crawls.dashboard-mode .dash-intro--crawl {
  margin: 0;
}

#admin-pane-crawls.dashboard-mode .crawl-extra-grid .crawl-sub-pane {
  display: block;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

@media (max-width: 1100px) {
  .crawl-core-grid {
    grid-template-columns: 1fr;
  }
}

#admin-pane-crawls.dashboard-mode .crawl-hub-table-wrap,
#admin-pane-crawls.dashboard-mode .crawl-table-meta,
#admin-pane-crawls.dashboard-mode [id^="crawlMore-"] {
  display: none !important;
}

#admin-pane-crawls.dashboard-mode .crawl-stage-badges.hidden {
  display: none !important;
}

#admin-pane-crawls.dashboard-mode #crawl-sub-lodging-compare .crawl-run-panel {
  margin-top: 0;
}

#admin-pane-crawls.dashboard-mode .crawl-log {
  max-height: 120px;
  overflow: auto;
  font-size: 11px;
}

.crawl-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 12px 0 16px;
}

.crawl-compare-panel {
  padding: 12px 14px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 10px;
  background: #fafafa;
}

.crawl-compare-panel-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.crawl-hub-table--compare {
  font-size: 12px;
}

#admin-pane-enrich.dashboard-mode .enrich-browse-legacy {
  display: none !important;
}

/* ── 여행 코스 (메인 탭) ── */
#panel-courses {
  overflow: hidden;
}

#panel-courses.active {
  display: flex;
  flex-direction: column;
}

.courses-view-tabs {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 0 12px;
}

.courses-view-tab {
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.courses-view-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.courses-view-pane {
  display: none;
  flex: 1;
  min-height: 0;
}

#coursesViewSpots .list-layout,
#coursesViewSpots.spots-list-layout {
  flex: 1;
  min-height: 0;
}

.spots-sidebar-intro {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.spots-search {
  width: 100%;
}

.spots-table tbody tr.spots-row {
  cursor: pointer;
}

.spots-table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spots-table .col-name strong {
  font-weight: 600;
}

#spotsStatus.error {
  color: var(--danger, #c0392b);
}

#coursesViewRoutes .routes-layout,
#coursesViewFilming .routes-layout {
  flex: 1;
  min-height: 0;
}

.courses-card-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6a1b9a;
  background: #f3e5f5;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-bottom: 0.25rem;
}

.routes-stop-episode {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.75rem;
  color: #6a1b9a;
  font-weight: 600;
}

.routes-stop-addr {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted, #666);
  margin-top: 0.15rem;
}

.routes-detail-link {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.routes-detail-link a {
  color: #1565c0;
}

.routes-pager {
  margin-top: 12px;
  justify-content: center;
}

.routes-card-tags,
.routes-detail-tags {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.routes-plan-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e1;
  font-size: 13px;
  color: #6d4c00;
}

.routes-detail-head h2 {
  margin: 0 0 6px;
}

.routes-detail-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.routes-day-block {
  margin-top: 20px;
}

.routes-day-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.routes-stop-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.routes-stop {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.routes-stop--linked {
  cursor: pointer;
}

.routes-stop--linked:hover {
  background: #f6fcf7;
}

.routes-stop-seq {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.routes-stop-body {
  flex: 1;
  min-width: 0;
}

.routes-stop-type {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f5f5f5;
  font-size: 11px;
  color: var(--muted);
}

.routes-stop-matched {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #2e7d32;
}

.routes-stop-time {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

#routesStatus.error {
  color: var(--danger, #c0392b);
}

.routes-detail-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
  gap: 16px;
  align-items: start;
  margin-top: 8px;
}

.routes-detail-days {
  min-width: 0;
}

.routes-detail-map-wrap {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
}

.routes-detail-map {
  width: 100%;
  height: min(72vh, 720px);
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f4;
}

.routes-map-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.routes-map-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.routes-map-day-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.routes-map-day-select {
  flex: 1;
  min-width: 0;
  max-width: 160px;
  padding: 6px 8px;
  font-size: 13px;
}

.routes-stop-map-badge {
  margin-left: 4px;
  font-size: 12px;
  opacity: 0.85;
}

.routes-popup-matched {
  color: #2e7d32;
  font-size: 12px;
}

.routes-stop--mapped {
  cursor: pointer;
}

.routes-stop--mapped:hover {
  background: #f6fcf7;
}

.routes-stop--active {
  background: #e8f5e9;
  box-shadow: inset 3px 0 0 #2e7d32;
}

.routes-detail-map .route-seq-marker {
  pointer-events: auto;
}

.routes-map-popup {
  padding: 4px 2px;
  font-size: 13px;
  line-height: 1.45;
  min-width: 120px;
}

.route-seq-marker-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 52px;
}

.route-seq-marker-time {
  display: none;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(33, 33, 33, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.route-seq-marker-wrap:hover .route-seq-marker-time:not(:empty) {
  display: block;
}

.route-seq-marker-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.route-seq-marker--active .route-seq-marker-dot {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.35);
}

@media (max-width: 1100px) {
  .routes-detail-split {
    grid-template-columns: 1fr;
  }

  .routes-detail-map-wrap {
    position: static;
    order: -1;
  }

  .routes-detail-map {
    height: 360px;
  }
}

.courses-view-pane.active {
  display: flex;
  flex-direction: column;
}

.spots-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.spots-search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.spots-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.spots-filter-field select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.spots-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.spot-card.active {
  border-color: #9333ea;
  box-shadow: 0 0 0 1px #9333ea;
}

.spot-detail-panel .restaurant-detail-summary {
  margin-bottom: 16px;
}

.courses-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.courses-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 14px 24px;
}

.courses-head h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.courses-intro {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.courses-filter-block {
  margin-bottom: 14px;
}

.courses-filter-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.courses-ms {
  position: relative;
}

.courses-ms-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.courses-ms-trigger.open,
.courses-ms-trigger:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.courses-ms-summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.courses-ms-chevron {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

.courses-ms-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.courses-ms-panel.hidden {
  display: none;
}

.courses-ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.courses-ms-option:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.courses-ms-option input {
  flex-shrink: 0;
}

.courses-ms-empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

.courses-ms-actions {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--border);
  padding: 6px 8px;
  background: var(--card);
}

.course-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.course-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.courses-status {
  margin: 8px 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.courses-status.error {
  color: var(--danger, #c0392b);
}

.courses-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.courses-empty {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.course-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}

.course-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.course-card-title {
  font-size: 14px;
  font-weight: 600;
}

.course-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.course-card-desc {
  font-size: 12px;
  color: var(--text);
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.courses-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 20px 24px 32px;
  background: var(--bg);
}

.courses-detail-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 40px 0;
}

.course-detail-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.course-detail-meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.course-detail-desc {
  margin: 0 0 20px;
  line-height: 1.6;
}

.course-day {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.course-day-head h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.course-day-notes {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.course-stop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-stop {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.course-stop-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-stop-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.course-stop-tags {
  font-size: 11px;
  color: var(--muted);
}

.course-stop-notes {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text);
  opacity: 0.9;
}

.course-stop-place {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

/* ── 여행 코스 (설정 탭) ── */
.tc-admin-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tc-admin-title {
  margin: 0 0 4px;
  font-size: 16px;
}

.tc-admin-intro {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 640px;
}

.tc-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tc-admin-status {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.tc-admin-status.error {
  color: var(--danger, #c0392b);
}

.tc-admin-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 16px;
  min-height: 420px;
}

.tc-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  padding-right: 4px;
}

.tc-admin-empty {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.tc-admin-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  width: 100%;
}

.tc-admin-card.active {
  border-color: var(--accent);
}

.tc-admin-card-title {
  font-size: 13px;
  font-weight: 600;
}

.tc-admin-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.tc-admin-editor-wrap {
  min-width: 0;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.tc-admin-editor-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.tc-editor-head h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.tc-editor-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.tc-editor-meta label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.tc-editor-meta input,
.tc-editor-meta select,
#tcFieldDesc {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

.tc-published-check {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  align-self: end;
  color: var(--text) !important;
}

.tc-days-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.tc-day-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card);
}

.tc-day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tc-day-num {
  font-weight: 600;
  font-size: 13px;
}

.tc-day-title {
  flex: 1;
  min-width: 120px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

.tc-day-actions {
  display: flex;
  gap: 4px;
}

.tc-day-notes {
  width: 100%;
  margin-bottom: 10px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
  resize: vertical;
}

.tc-stops {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.tc-stop-row {
  display: grid;
  grid-template-columns: 24px 1.2fr 90px 120px 100px 1fr auto;
  gap: 6px;
  align-items: center;
}

.tc-stop-order {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.tc-stop-row input,
.tc-stop-row select {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
}

.tc-stop-actions {
  display: flex;
  gap: 2px;
}

.btn-sm {
  padding: 2px 6px;
  font-size: 11px;
  min-width: 0;
}

@media (max-width: 900px) {
  .courses-layout {
    flex-direction: column;
  }

  .courses-sidebar {
    width: 100%;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .tc-admin-layout {
    grid-template-columns: 1fr;
  }

  .tc-stop-row {
    grid-template-columns: 1fr;
  }

  .tc-stop-order {
    display: none;
  }
}

/* ── 여행 코스 분류·가져오기 (추가) ── */
.courses-tag-filters .courses-filter-block {
  margin-bottom: 12px;
}

.course-card-tags,
.tc-admin-card-tags {
  font-size: 11px;
  color: var(--accent);
}

.course-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.course-tag-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.tc-admin-subtabs {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.tc-admin-subtab {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.tc-admin-subtab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tc-admin-subpane {
  display: none;
}

.tc-admin-subpane.active {
  display: block;
}

.tc-admin-toolbar-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.tc-tag-picker,
.tc-region-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tc-tag-group-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.tc-tag-chip-row,
.tc-region-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tc-tag-chip,
.tc-region-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.tc-tag-chip:has(input:checked),
.tc-region-chip:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.tc-editor-section {
  margin-top: 14px;
}

.tc-editor-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.tc-source-meta {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0;
}

.tc-tag-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.tc-tag-group-add-form {
  margin-bottom: 16px;
}

.tc-tag-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.tc-tag-group-id {
  align-self: center;
  font-size: 11px;
}

.tc-tag-inline-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
}

.tc-tag-inline-label input {
  min-width: 120px;
}

.tc-tag-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tc-tag-admin-table th,
.tc-tag-admin-table td {
  padding: 6px 4px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.tc-tag-admin-table th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

.tc-tag-admin-table input,
.tc-tag-admin-table select {
  width: 100%;
  min-width: 0;
  font-size: 12px;
}

.tc-tag-actions {
  white-space: nowrap;
}

.tc-tag-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.tc-tag-group-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card);
}

.tc-tag-admin-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 12px;
}

.tc-tag-admin-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.tc-tag-kw {
  color: var(--muted);
  font-size: 10px;
}

.tc-tag-add-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  align-items: end;
}

.tc-import-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.tc-import-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.tc-import-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card);
}

.tc-import-addr,
.tc-import-sug {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0;
}

.tc-import-pager {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
