/* 타겟팅 메세지 — 전공 선택 (wireframe 좌측 패널) */
.preview-viewport.is-targeting {
  overflow-y: auto;
  height: min(680px, 72vh);
  max-height: min(680px, 72vh);
  border: none;
  border-radius: 0;
  background: #fff;
}

.targeting-panel {
  padding: 20px 22px 28px;
}

.targeting-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.targeting-panel__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.targeting-panel__subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.targeting-panel__bulk {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.targeting-panel__bulk-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.targeting-panel__bulk-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--selected-bg);
}

.targeting-panel__bulk-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.targeting-panel__selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.targeting-panel__selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--selected-bg);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.targeting-panel__selected-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.targeting-panel__selected-chip button:hover {
  background: rgba(43, 135, 236, 0.12);
}

.targeting-panel__group {
  margin-bottom: 18px;
}

.targeting-panel__group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}

.targeting-panel__chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 768px) {
  .targeting-panel__chip-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.targeting-panel__chip {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.targeting-panel__chip:hover {
  border-color: #cbd5e1;
}

.targeting-panel__chip.is-selected {
  border-color: var(--accent);
  background: var(--selected-bg);
  color: var(--accent);
}

.targeting-panel__reach {
  margin: 16px 0 6px;
  font-size: 14px;
  color: var(--text);
}

.targeting-panel__reach strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

.targeting-panel__reach-note {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

.targeting-panel__hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.targeting-panel__hint--muted {
  font-size: 12px;
}

.targeting-panel__hint--loading {
  color: var(--accent);
}

.targeting-panel__error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 14px 16px;
  color: #991b1b;
  font-size: 13px;
  margin-top: 12px;
}

.targeting-panel__retry {
  display: block;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fff;
  color: #991b1b;
  cursor: pointer;
  font-size: 13px;
}

.targeting-panel__skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.targeting-panel__skeleton {
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: targeting-shimmer 1.2s infinite;
}

@keyframes targeting-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 견적 패널 — 타겟팅 전용 */
.unit-count-readonly {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafb;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-height: 42px;
}

.unit-count-readonly.is-empty {
  color: var(--muted);
  font-weight: 500;
}
