/* 플레이스 순위 추적 · 키워드별 알림·보고서 */

.dp-track {
  display: grid;
  gap: 0.85rem;
  max-width: none;
  width: 100%;
}

.dp-track--soon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(42vh, 20rem);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.dp-track__soon-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

.dp-track__head {
  margin-bottom: 0.1rem;
}

.dp-track__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.dp-track__title {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dp-track__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.dp-track__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.dp-track__summary-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #131313;
  padding: 0.75rem 0.85rem;
  text-align: center;
}

.dp-track__summary-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dp-track__summary-val--up { color: #4ade80; }
.dp-track__summary-val--down { color: #f87171; }

.dp-track__summary-lbl {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dp-track__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.dp-track__toolbar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.dp-track__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dp-track__add-btn,
.dp-track__link-btn {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #141414;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dp-track__add-btn {
  border-color: rgba(255, 107, 53, 0.45);
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent);
}

.dp-track__add-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.dp-track__add-form[hidden] {
  display: none !important;
}

.dp-track__input {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #101010;
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.55rem 0.7rem;
}

.dp-track__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.dp-track__item {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #131313;
  overflow: hidden;
}

.dp-track__item-btn {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.dp-track__item-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

.dp-track__item-btn[aria-expanded="true"] {
  background: rgba(255, 107, 53, 0.06);
}

.dp-track__kw {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
}

.dp-track__target {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-track__rank-num {
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.dp-track__rank-delta {
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 0.25rem;
}

.dp-track__rank-delta--up { color: #4ade80; }
.dp-track__rank-delta--down { color: #f87171; }
.dp-track__rank-delta--flat { color: var(--text-muted); }

.dp-track__alert {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.dp-track__alert--on {
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}

.dp-track__alert--off {
  color: var(--text-muted);
}

.dp-track__detail {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}

.dp-track__detail[hidden] {
  display: none !important;
}

.dp-track__detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.dp-track__detail-box {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #101010;
  padding: 0.65rem 0.75rem;
}

.dp-track__detail-box h4 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.dp-track__detail-box p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.dp-track__settings {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.dp-track__setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #101010;
}

.dp-track__setting-label {
  font-size: 0.84rem;
  font-weight: 700;
}

.dp-track__setting-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.1rem;
}

.dp-track__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.dp-track__reports-mini {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.dp-track__reports-mini li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.dp-track__reports-mini a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.dp-track__note {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.dp-track__empty {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border);
  border-radius: 11px;
}

@media (max-width: 720px) {
  .dp-track__summary {
    grid-template-columns: 1fr;
  }

  .dp-track__add-form {
    grid-template-columns: 1fr;
  }

  .dp-track__item-btn {
    grid-template-columns: 1fr;
  }

  .dp-track__detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 플레이스 순위 분석 페이지 */

.dp-place-shell {
  max-width: 920px;
}

.dp-place-form {
  display: grid;
  gap: 0.75rem;
}

.dp-place-textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.5;
}

.dp-place-select {
  width: 100%;
  cursor: pointer;
}

.dp-place-region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.dp-place-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.dp-place-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
}

.dp-place-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1200;
  max-width: min(92vw, 28rem);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(19, 19, 19, 0.96);
  color: #4ade80;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.dp-place-toast--error {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.dp-place-results {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.dp-place-result-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.dp-place-result-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.place-keyword-block + .place-keyword-block {
  margin-top: 0;
}

.place-keyword-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.place-keyword-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.place-keyword-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-keyword-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.place-map-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.place-map-link:hover {
  text-decoration: underline;
}

.place-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.place-rank-item {
  display: grid;
  grid-template-columns: 2rem 52px 1fr;
  gap: 0.5rem 0.65rem;
  align-items: start;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.place-rank-item:first-child {
  border-top: none;
  padding-top: 0.25rem;
}

.place-rank-item[hidden] {
  display: none;
}

.place-thumb-wrap {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.place-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.place-thumb {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #1a1a1a;
}

.place-thumb--empty {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #1a1a1a;
}

.place-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  background: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
}

.place-rank-content {
  min-width: 0;
}

.place-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex-wrap: wrap;
}

.place-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

a.place-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.place-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 800;
  white-space: nowrap;
}

.place-tag--new {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.place-tag--ad {
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent);
}

.place-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.place-extra {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.place-extra-sep {
  color: var(--border);
}

.place-phone {
  color: var(--accent);
  text-decoration: none;
}

.place-address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-menus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.place-menu-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: #1a1a1a;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.place-ad-notice {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #fbbf24;
  font-size: 0.8rem;
  line-height: 1.45;
}

.place-more-btn {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #101010;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.place-more-btn:hover {
  border-color: rgba(255, 107, 53, 0.45);
  color: var(--accent);
}

.place-more-btn[hidden] {
  display: none;
}

.place-empty {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .dp-place-region-grid {
    grid-template-columns: 1fr;
  }
}
