/* phase2.css — Phase 2/3 에서 추가된 컴포넌트만 담는 오버레이.
   prototype 의 site.css + tokens.css 는 그대로 로드되므로 중복 정의는 제거.
   여기엔 prototype 에 없는 요소나 페이지별 확장만.
*/

/* ── auth 페이지에서 하단 탭바 숨기기 ── */
body.auth-page .tab-bar { display: none !important; }
body.auth-page { padding-bottom: 0; }

.auth-wrap {
  max-width: 420px; margin: 0 auto;
  padding: var(--space-4);
  padding-top: var(--space-8);
}
.auth-logo { display: inline-block; margin-bottom: var(--space-4); color: var(--color-primary); }
.auth-title { font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-2); }
.auth-sub { color: var(--color-text-muted, #6b7280); margin-bottom: var(--space-6); font-size: var(--text-sm); }
.auth-flash { margin-bottom: var(--space-4); }
.auth-flash .alert { padding: 8px 12px; border-radius: var(--radius-md); font-size: 0.875rem; }
.auth-flash .alert-danger { background: #fee2e2; color: #991b1b; }
.auth-flash .alert-success { background: #dcfce7; color: #166534; }

.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border, #e5e7eb);
  background: #fff; color: var(--color-text, #111827);
  font-weight: 600; font-size: var(--text-base);
  margin-bottom: var(--space-2);
  text-decoration: none;
  transition: transform .1s;
}
.oauth-btn:hover { transform: translateY(-1px); }
.oauth-btn.kakao  { background: #FEE500; border-color: #FEE500; color: #191919; }
.oauth-btn.naver  { background: #03C75A; border-color: #03C75A; color: #fff; }
.oauth-btn.google { background: #fff; }

.divider {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--color-text-muted, #9ca3af);
  font-size: var(--text-xs);
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--color-border, #e5e7eb);
}

.btn-cta { width: 100%; padding: var(--space-3); font-weight: 700; }

/* ── 리스트 페이지 ── */
.results-hero {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-2xl, 16px);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
}
.results-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-accent-soft, #fef3c7);
  color: #92400e;
  border-radius: var(--radius-full, 999px);
  padding: 6px 10px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.results-hero h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tighter, -0.02em);
  margin: var(--space-3) 0 var(--space-2);
}

.case-filter { margin-bottom: var(--space-4); }
.filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.4fr auto auto;
  gap: var(--space-2);
  align-items: center;
}
@media (max-width: 991.98px) {
  .filter-row { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .filter-amt { grid-column: 1 / -1; display: flex; gap: var(--space-2); }
  .filter-amt input { flex: 1; }
  .filter-actions { grid-column: 1 / -1; display: flex; gap: var(--space-2); }
  .filter-actions .btn { flex: 1; }
}
.filter-amt { display: flex; gap: var(--space-2); }
.filter-amt input { flex: 1; min-width: 0; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.input-icon .form-control { padding-left: 36px; }
.filter-check .form-check { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 0.875rem; white-space: nowrap; }

/* ── 상세 페이지 ── */
/* 알약 버튼(좌) + breadcrumb(우) 한 줄 배치 */
.detail-topbar {
  display: flex; align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.detail-topbar .back-pill { margin-bottom: 0; }
.detail-topbar .breadcrumb-wrap {
  margin-left: auto;
  margin-bottom: 0;
}
.breadcrumb-wrap {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: var(--space-2);
  text-align: right;
}
.breadcrumb-wrap a { color: inherit; text-decoration: none; }
.breadcrumb-wrap a:hover { text-decoration: underline; }

.case-head {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  margin-bottom: var(--space-4);
}
.case-head__meta { display: flex; gap: 6px; margin-bottom: var(--space-2); flex-wrap: wrap; }
.case-head__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tighter, -0.02em);
  margin: 0 0 var(--space-2);
}
.case-head__addr { margin: 0; font-size: 0.9375rem; color: var(--color-text-muted, #6b7280); }
.case-head__price { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-3); flex-wrap: wrap; }
.case-head__price .price-main { font-size: 1.5rem; font-weight: 800; color: var(--color-danger, #dc2626); }
.case-head__price .price-label { font-size: 0.8125rem; color: var(--color-text-muted, #6b7280); }
.case-head__price .price-sub { font-size: 0.9375rem; color: var(--color-text-muted, #6b7280); text-decoration: line-through; }
.case-head__price .price-disc {
  background: #fef3c7; color: #92400e;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 1100px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

.case-block {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-2xl, 16px);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.case-block__title {
  font-size: 1rem; font-weight: 700;
  margin: 0 0 var(--space-3);
  display: flex; align-items: center; gap: 6px;
}

.kv-list {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 8px 12px; margin: 0; font-size: 0.875rem;
}
.kv-list dt { color: var(--color-text-muted, #6b7280); font-weight: 500; }
.kv-list dd { margin: 0; }
.aee-list dt { font-weight: 600; color: var(--color-text, #374151); }
.aee-list dd { white-space: pre-wrap; }

.item-row { padding: 8px 0; border-bottom: 1px dashed var(--color-border, #e5e7eb); font-size: 0.875rem; }
.item-row:last-child { border-bottom: 0; }

.schedule-list, .sr-list, .hist-list, .curst-list { list-style: none; padding: 0; margin: 0; }
.schedule-list li, .sr-list li, .hist-list li, .curst-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--color-border, #e5e7eb);
  font-size: 0.875rem;
}
.schedule-list li:last-child, .sr-list li:last-child, .hist-list li:last-child, .curst-list li:last-child { border-bottom: 0; }
.sr-list .sr-sold { color: var(--color-danger, #dc2626); font-weight: 700; }
.sr-list .sr-yuchal { color: var(--color-text-muted, #6b7280); font-weight: 600; }

.sr-list li.sr-round {
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-border, #e5e7eb);
}
.sr-list li.sr-round:last-child { border-bottom: 0; }
.sr-list li.sr-round--sold {
  background: linear-gradient(90deg, rgba(220,38,38,0.05), rgba(220,38,38,0) 60%);
  border-left: 3px solid var(--color-danger, #dc2626);
  padding-left: 12px; margin-left: -12px;
  border-top-right-radius: var(--radius-md, 8px);
  border-bottom-right-radius: var(--radius-md, 8px);
}
.sr-round__head {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem;
}
.sr-round__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-bg-subtle, #f3f4f6);
  color: var(--color-text-muted, #6b7280);
  font-weight: 800; font-size: 0.72rem;
  flex-shrink: 0;
}
.sr-round--sold .sr-round__no {
  background: var(--color-danger, #dc2626); color: #fff;
}
.sr-round__date {
  color: var(--color-text, #374151); font-weight: 600;
}
.sr-round__label {
  margin-left: auto;
  font-size: 0.75rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-full, 999px);
  white-space: nowrap;
}
.sr-round__label.is-yuchal {
  color: var(--color-text-muted, #6b7280);
  background: var(--color-bg-subtle, #f3f4f6);
}
.sr-round__label.is-sold {
  color: #fff;
  background: var(--color-danger, #dc2626);
}
.sr-round__body {
  margin-top: 6px; padding-left: 36px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 0.95rem;
}
.sr-round__amt-big {
  font-weight: 800; color: var(--color-text, #111827);
  font-size: 1.0rem;
}
.sr-round--sold .sr-round__amt-big { color: var(--color-danger, #dc2626); }
.sr-round__sub {
  font-size: 0.78rem; color: var(--color-text-muted, #6b7280);
}
.sr-round__drop {
  font-size: 0.7rem; font-weight: 700;
  color: #92400e; background: #fef3c7;
  padding: 2px 7px; border-radius: var(--radius-full, 999px);
  white-space: nowrap;
}
.sr-round__premium {
  font-size: 0.7rem; font-weight: 700;
  color: #065f46; background: #d1fae5;
  padding: 2px 7px; border-radius: var(--radius-full, 999px);
  white-space: nowrap;
}
.sr-round__bar {
  position: relative; height: 8px;
  background: var(--color-bg-subtle, #f3f4f6);
  border-radius: var(--radius-full, 999px);
  margin-top: 8px; margin-left: 36px; overflow: hidden;
}
.sr-round__bar-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, #cbd5e1, #94a3b8);
  border-radius: var(--radius-full, 999px);
  transition: width 0.4s ease;
}
.sr-round--sold .sr-round__bar-fill {
  background: linear-gradient(90deg, #fca5a5, #dc2626);
}
.sr-round__bar-pct {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 0.65rem; font-weight: 700;
  color: var(--color-text, #374151);
  text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 3px rgba(255,255,255,0.95);
  pointer-events: none;
}
@media (max-width: 480px) {
  .sr-round__body { padding-left: 0; }
  .sr-round__bar { margin-left: 0; }
}

/* 변경이력 — task_id 묶음 카드 */
.hist-list li.hist-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-border, #e5e7eb);
  font-size: 0.875rem;
}
.hist-list li.hist-row:last-child { border-bottom: 0; }
.hist-row__date {
  flex-shrink: 0; width: 84px;
  color: var(--color-text-muted, #6b7280);
  font-weight: 700; font-size: 0.78rem;
  padding-top: 2px;
}
.hist-row__changes {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.hist-change {
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
}
.hist-change__label {
  flex-shrink: 0; min-width: 64px;
  font-weight: 700; color: var(--color-text-muted, #6b7280);
  font-size: 0.78rem;
}
.hist-change__val {
  display: inline-flex; align-items: baseline; gap: 6px;
  flex-wrap: wrap;
  color: var(--color-text, #111827);
}
.hist-change__old {
  color: var(--color-text-muted, #9ca3af);
  text-decoration: line-through;
  text-decoration-color: rgba(156,163,175,0.5);
}
.hist-change__arrow {
  color: var(--color-text-muted, #9ca3af);
  font-size: 0.8rem;
}
.hist-change__new {
  color: var(--color-text, #111827);
  font-weight: 700;
}
@media (max-width: 480px) {
  .hist-list li.hist-row { flex-direction: column; gap: 4px; }
  .hist-row__date { width: auto; padding-top: 0; }
  .hist-change__label { min-width: 50px; }
}

.async-block { font-size: 0.875rem; color: var(--color-text-muted, #6b7280); }

/* 갤러리 */
.case-gallery { margin-bottom: var(--space-3); }
.gal-main img {
  width: 100%; border-radius: var(--radius-2xl, 16px);
  max-height: 480px; object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.gal-thumbs { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.gal-thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-md, 8px); }
.gal-more { align-self: center; padding: 0 8px; color: var(--color-text-muted, #6b7280); font-size: 0.8125rem; }

/* 실거래 요약 */
.realtor-summary { padding: 10px; background: #f9fafb; border-radius: var(--radius-md, 8px); font-size: 0.875rem; }
.realtor-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 0; }
.realtor-row span { color: var(--color-text-muted, #6b7280); }
.realtor-row strong { font-weight: 600; }
.realtor-sub { font-size: 0.75rem; color: var(--color-text-muted, #9ca3af); margin-top: 6px; }
.realtor-same { font-size: 0.875rem; }

/* ── 지도 페이지 ── */
.map-section { padding: 0; }
.map-toolbar {
  padding: var(--space-3) var(--space-4);
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--color-bg, #fff);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  flex-wrap: wrap;
}
.map-layer-toggles { display: flex; gap: var(--space-3); }
.map-layer-toggles label { font-size: 0.875rem; cursor: pointer; display: flex; align-items: center; gap: 4px; margin: 0; }

/* ── 관심매물 하트 버튼 ── */
.card-case-wrap {
  position: relative;
  /* 그리드 자식일 때 stretch 영향이 안 카드까지 전달되도록 column flex */
  display: flex;
  flex-direction: column;
  height: 100%;
}
.heart-btn {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #9ca3af;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform .15s, color .15s, background .15s;
  z-index: 2;
}
.heart-btn:hover { transform: scale(1.08); color: #ef4444; }
.heart-btn.is-on { color: #ef4444; background: #fff; }
.heart-btn.is-on i.bi { animation: heart-pop .3s ease-out; }
@keyframes heart-pop {
  0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); }
}

/* 상세 페이지 인라인 하트 (뱃지와 나란히) */
.heart-btn--inline {
  position: static;
  width: auto; height: auto;
  padding: 4px 12px;
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  font-size: 0.875rem;
  gap: 4px;
}
.heart-btn--inline .heart-label { font-weight: 600; }
.heart-btn--inline:hover { background: #fef2f2; color: #ef4444; border-color: #fecaca; }
.heart-btn--inline.is-on { background: #fef2f2; border-color: #fecaca; color: #ef4444; }

/* ── 카드 썸네일 개수 뱃지 추가 (prototype .card-case 에 이미 있지만 강조) ── */
.card-case .thumb { position: relative; }
.card-case .thumb-count {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.65); color: #fff;
  border-radius: 999px; padding: 2px 8px;
  font-size: 0.75rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  z-index: 2;
}
/* 썸네일 위 오버레이 뱃지 (D-day · 점수 · 유찰 · 낙찰) — 사진 좌상단에 가로 정렬, 가독성 위해 그림자 */
.card-case .thumb-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
  max-width: calc(100% - 56px); /* 우상단 하트(36px) + 여유공간 확보 */
  pointer-events: none;
}
.card-case .thumb-badges > * {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  white-space: nowrap;   /* "D-DAY"/"유찰 3회" 같은 문자가 세로로 깨지는 현상 방지 */
  flex-shrink: 0;        /* 컨테이너가 좁아도 뱃지 자체 폭은 유지 → 줄바꿈으로 wrap */
}

/* 카드 제목 좌측 유형 아이콘 — "[아이콘] 아파트 경매" 식 표시.
   카드 본문 .title 은 폰트 굵음. 아이콘은 살짝 작게 + 색을 muted 톤으로. */
.card-case .title i.bi {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.95em;
  color: var(--color-text-muted, #6b7280);
  vertical-align: -1px;
}

/* 사건번호 클릭 복사 — 카드 anchor 내부 인라인 버튼. 카드 호버와 분리된 호버 상태. */
.listing-cs-copy {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  margin: -1px -2px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color .12s, border-color .12s, color .12s;
}
.listing-cs-copy:hover {
  background: var(--color-bg-subtle, #f1f5f9);
  border-color: var(--color-border, #d1d5db);
  color: var(--color-text, #111827);
}
.listing-cs-copy:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 1px;
}
.listing-cs-copy::after {
  content: "\F4CB"; /* bi-clipboard */
  font-family: "bootstrap-icons";
  font-size: 0.85em;
  opacity: 0;
  transition: opacity .12s;
}
.listing-cs-copy:hover::after { opacity: .7; }

/* 복사 토스트 — 화면 하단 중앙에 잠시 표시 */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 0));
  transform: translate(-50%, 12px);
  z-index: 9999;
  padding: 10px 18px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* 모바일에선 탭바 위로 띄움 */
@media (max-width: 991.98px) {
  .copy-toast {
    bottom: calc(var(--tab-bar-height, 64px) + env(safe-area-inset-bottom, 0) + 12px);
  }
}
.card-case .thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--color-bg-subtle, #f3f4f6);
  color: #9ca3af; font-size: 2rem;
}
/* 이미지 로드 실패 시 placeholder 대체 */
.card-case .thumb.thumb-error::after {
  content: "\F289"; /* bi-image */
  font-family: "bootstrap-icons";
  font-size: 2rem;
  color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--color-bg-subtle, #f3f4f6);
}
.card-case .card-meta {
  display: flex; gap: var(--space-3); font-size: 0.75rem;
  color: var(--color-text-muted, #9ca3af);
  margin-top: 6px;
}
.card-case .card-meta i { margin-right: 2px; }

/* ── placeholder 페이지 ── */
.placeholder-wrap {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted, #6b7280);
}
.placeholder-wrap .placeholder-icon {
  font-size: 3.5rem;
  color: var(--color-text-muted, #9ca3af);
  display: block;
  margin-bottom: var(--space-3);
}
.placeholder-title { font-size: var(--text-xl); font-weight: 800; color: var(--color-text, #111827); margin-bottom: var(--space-2); }
.placeholder-lead { font-size: 0.9375rem; margin-bottom: var(--space-4); }
.placeholder-actions { display: flex; justify-content: center; gap: var(--space-2); flex-wrap: wrap; }

/* ── 빈 상태 일러스트 ── */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted, #6b7280);
}
.empty-state img { max-width: 200px; width: 100%; height: auto; margin-bottom: var(--space-3); opacity: .8; }
.empty-state h3 { font-size: var(--text-lg); font-weight: 700; color: var(--color-text, #111827); margin-bottom: var(--space-2); }
.empty-state p { font-size: 0.9375rem; margin-bottom: var(--space-3); }

/* ── 헤더 사용자 pill ── */
.header-user {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff; text-decoration: none;
  font-size: 0.875rem;
  background: rgba(255,255,255,.08);
  transition: background .15s;
}
.header-user:hover { background: rgba(255,255,255,.16); color: #fff; }
.header-user i.bi { font-size: 1.15rem; }

/* ── 마이 대시보드 ── */
.my-home { max-width: 900px; margin: 0 auto; }
.my-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.my-summary-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2);
  margin: var(--space-4) 0;
}
@media (max-width: 640px) { .my-summary-grid { grid-template-columns: repeat(2, 1fr); } }
.my-summary-card {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-2xl, 16px);
  padding: var(--space-3);
  display: flex; align-items: center; gap: var(--space-2);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
.my-summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.my-summary-card i.bi { font-size: 1.5rem; color: var(--color-primary, #1a365d); }
.my-summary-card strong { font-size: 1.25rem; font-weight: 800; display: block; }
.my-summary-card span { font-size: 0.8125rem; color: var(--color-text-muted, #6b7280); }

.my-section { margin-top: var(--space-5); }
.folder-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
}
.folder-card {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-3);
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
}
.folder-card:hover { border-color: var(--color-primary, #1a365d); }
.folder-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.folder-count { margin-left: auto; color: var(--color-text-muted, #6b7280); font-size: 0.8125rem; }

.my-menu { list-style: none; padding: 0; margin: 0; }
.my-menu li { border-bottom: 1px solid var(--color-border, #e5e7eb); }
.my-menu li:last-child { border-bottom: 0; }
.my-menu a, .my-menu-btn {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3);
  color: inherit; text-decoration: none;
  background: transparent; border: 0; width: 100%; text-align: left; font: inherit;
  cursor: pointer;
}
.my-menu a:hover, .my-menu-btn:hover { background: var(--color-bg-subtle, #f9fafb); }

/* ── 관심매물 리스트 ── */
.fav-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-2xl, 16px);
  margin-bottom: var(--space-3);
}
.fav-summary-bar > div {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; min-width: 0;
}
.fav-summary-bar strong { font-size: 1.125rem; font-weight: 800; }
.fav-summary-bar span { font-size: 0.75rem; color: var(--color-text-muted, #6b7280); }

.folder-tabs {
  display: flex; gap: var(--space-2); overflow-x: auto;
  margin-bottom: var(--space-3); padding-bottom: 4px;
}
.folder-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--color-bg-subtle, #f3f4f6);
  color: var(--color-text, #374151);
  text-decoration: none;
  font-size: 0.875rem; white-space: nowrap;
  border: 1px solid transparent;
}
.folder-tab:hover { background: #e5e7eb; }
.folder-tab.is-active { background: var(--color-primary, #1a365d); color: #fff; }
.folder-tab.is-active .folder-count { color: rgba(255,255,255,.8); }
.folder-tab .folder-count { font-size: 0.75rem; opacity: .7; }

.fav-filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.fav-filter-bar select { width: 100%; max-width: none; min-width: 0; }
.fav-tag-filter { width: 100%; min-width: 0; }
.fav-tag-filter .form-control { height: 31px; }
.fav-filter-bar .fav-filter-search-row {
  grid-column: 1 / -1;
  display: flex; gap: var(--space-2);
}
.fav-filter-bar .fav-filter-search-row .fav-tag-filter { flex: 1; }
@media (min-width: 600px) {
  .fav-filter-bar {
    grid-template-columns: minmax(0, 160px) minmax(0, 180px) minmax(0, 1fr) auto;
  }
  .fav-filter-bar .fav-filter-search-row {
    grid-column: auto;
    display: contents;
  }
}

.fav-list { display: flex; flex-direction: column; gap: var(--space-2); }

/* 모바일 퍼스트: 카드는 세로 스택. 데스크톱(≥768)에서만 좌/우 2열로 펼침. */
.fav-row {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "check main"
    "act   act";
  column-gap: var(--space-2);
  row-gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  transition: border-color .15s, box-shadow .15s;
}
.fav-row.is-swipe-left { border-color: #f59e0b; box-shadow: inset -4px 0 0 #f59e0b; }
.fav-row.is-swipe-right { border-color: #60a5fa; box-shadow: inset 4px 0 0 #60a5fa; }
.fav-row__check { grid-area: check; padding-top: 2px; }
.fav-row__main { grid-area: main; min-width: 0; }
.fav-row__actions { grid-area: act; }
.fav-row__head {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-bottom: 4px; font-size: 0.75rem;
}
.fav-row__title {
  font-weight: 700; color: inherit; text-decoration: none;
  display: block; margin-bottom: 4px;
  font-size: 0.95rem; line-height: 1.35;
  word-break: keep-all; overflow-wrap: anywhere;
}
.fav-row__title:hover { color: var(--color-primary, #1a365d); }
.fav-row__addr {
  font-size: 0.85rem; color: var(--color-text-muted, #6b7280);
  margin-bottom: 6px; line-height: 1.4;
  word-break: keep-all; overflow-wrap: anywhere;
}
.fav-row__meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 0.8rem; color: var(--color-text-muted, #6b7280);
}
.fav-row__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* 모바일: 액션은 컴팩트한 칩 줄로. 토글로 세부 편집 펼침 */
.fav-row__actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.fav-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--color-bg-subtle, #f3f4f6);
  border: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text, #374151);
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
.fav-chip:hover { background: #e5e7eb; }
.fav-chip i { font-size: 0.95em; }
.fav-chip--folder { background: #eff6ff; border-color: #dbeafe; color: #1e40af; }
.fav-chip--folder:hover { background: #dbeafe; }
.fav-chip--more {
  background: transparent; border-style: dashed;
  color: var(--color-text-muted, #6b7280);
}
.fav-chip--remove {
  background: #fff; border-color: #fecaca; color: #b91c1c;
  margin-left: auto;
}
.fav-chip--remove:hover { background: #fee2e2; }
.fav-chip--pinned { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.fav-chip--pinned:hover { background: #fde68a; }

/* 펼침 영역: 태그 편집 */
.fav-extra {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--color-bg-subtle, #f9fafb);
  border-radius: var(--radius-md, 8px);
  margin-top: 2px;
}
.fav-extra.is-open { display: flex; }
.fav-tags-edit { display: flex; gap: 6px; }
.fav-tags-input { min-width: 0; flex: 1; }

/* 데스크톱: 전통적 좌/우 2열 + 우측 액션 칼럼 */
@media (min-width: 768px) {
  .fav-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "check main act";
    column-gap: var(--space-3);
  }
  .fav-row__actions {
    flex-direction: column;
    align-items: stretch;
    width: 220px;
    flex-wrap: nowrap;
  }
  .fav-row__actions .fav-chip {
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius-md, 8px);
    padding: 7px 12px;
  }
  .fav-row__actions .fav-chip--remove { margin-left: 0; }
  .fav-extra { background: transparent; padding: 0; margin-top: 0; }
}

/* 카드 헤드의 작은 부속 뱃지 */
.fav-row__head .badge-type {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  background: #eef2ff; color: #3730a3;
  font-size: 0.7rem; font-weight: 700;
  white-space: nowrap;
}
.fav-row__head .badge-fail {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--color-danger, #dc2626);
  color: var(--color-danger, #dc2626);
  background: #fff;
}

/* 상태 뱃지 */
.fav-status { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.fav-status--watching    { background: #e0e7ff; color: #3730a3; }
.fav-status--interested  { background: #fef3c7; color: #92400e; }
.fav-status--bidding     { background: #fee2e2; color: #991b1b; }
.fav-status--won         { background: #dcfce7; color: #166534; }
.fav-status--lost        { background: #f3f4f6; color: #6b7280; }
.fav-status--dropped     { background: #f9fafb; color: #9ca3af; }
.badge-result-needed {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: #fee2e2; color: #991b1b;
  font-size: 0.7rem; font-weight: 700;
}
.badge-price-drop {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857;
  font-size: 0.7rem; font-weight: 700;
}

/* ── 모바일 스와이프 액션 (fav-row) ── */
.fav-row { position: relative; overflow: hidden; }
.fav-row__main { transition: transform .05s linear; will-change: transform; }

/* 스와이프 중 배경에 힌트 아이콘 */
.fav-row::before, .fav-row::after {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: "bootstrap-icons"; font-size: 1.5rem;
  padding: 6px 12px; border-radius: 999px;
  color: #fff; opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
/* 오른쪽 스와이프 → 왼쪽에 폴더 아이콘 */
.fav-row::before {
  content: "\F39B"; /* bi-folder-fill */
  left: 12px;
  background: #3b82f6;
}
/* 왼쪽 스와이프 → 오른쪽에 상태 아이콘 */
.fav-row::after {
  content: "\F3F1"; /* bi-list-check */
  right: 12px;
  background: #f59e0b;
}
.fav-row.is-swiping-right::before { opacity: 1; }
.fav-row.is-swiping-left::after { opacity: 1; }

/* Action Sheet (바텀시트 스타일) */
.action-sheet {
  position: fixed; inset: 0; z-index: 1050;
  display: flex; align-items: flex-end; justify-content: center;
  animation: sheet-fadein .2s ease-out;
}
.action-sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
}
.action-sheet__panel {
  position: relative;
  width: 100%; max-width: 520px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 32px rgba(0,0,0,.25);
  animation: sheet-slideup .25s cubic-bezier(.2,.9,.3,1);
}
.action-sheet__title {
  font-size: 1rem; font-weight: 700;
  text-align: center; margin-bottom: 12px;
  color: var(--color-text, #111827);
}
.action-sheet__list {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 12px;
  max-height: 60vh; overflow-y: auto;
}
.action-sheet__item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: transparent;
  border: 0; border-radius: 10px;
  font-size: 0.9375rem; color: var(--color-text, #111827);
  text-align: left; cursor: pointer;
  transition: background .15s;
}
.action-sheet__item:hover, .action-sheet__item:active {
  background: var(--color-bg-subtle, #f3f4f6);
}
.action-sheet__item i.bi {
  font-size: 1.2rem; color: var(--color-primary, #1a365d);
  flex-shrink: 0;
}
.action-sheet__cancel {
  width: 100%;
  padding: 14px;
  background: var(--color-bg-subtle, #f3f4f6);
  border: 0; border-radius: 10px;
  font-size: 0.9375rem; font-weight: 600;
  color: var(--color-text, #111827);
  cursor: pointer;
}
.action-sheet__cancel:hover { background: #e5e7eb; }
body.sheet-open { overflow: hidden; }
@keyframes sheet-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* 스와이프 도움말 (리스트 상단 소형 hint, 첫 방문 시만 노출하려면 JS 필요 — 지금은 항상 노출) */
@media (hover: none) and (pointer: coarse) {
  .fav-swipe-hint { display: block !important; }
}
.fav-swipe-hint {
  display: none;
  padding: 8px 12px;
  background: #f0f9ff;
  color: #075985;
  font-size: 0.8125rem;
  border-radius: 8px;
  margin-bottom: 12px;
  text-align: center;
}

/* ── D-day 배지 ── */
.badge-dday {
  padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: #e5e7eb; color: #374151;
}
.badge-dday.hot { background: #ef4444; color: #fff; animation: dday-pulse 1.5s ease-in-out infinite; }
.badge-dday.warn { background: #f59e0b; color: #fff; }
.badge-dday.past { background: #9ca3af; color: #fff; }
@keyframes dday-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

/* ── 알림 뱃지 (헤더) ── */
.notif-btn { position: relative; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #ef4444; color: #fff;
  border-radius: 999px; font-size: 0.625rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ── 알림 목록 ── */
.my-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
.notif-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.notif-row {
  display: flex; gap: var(--space-3);
  padding: var(--space-3); background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  transition: background .2s;
}
.notif-row.is-read { background: var(--color-bg-subtle, #f9fafb); opacity: 0.72; }
.notif-row__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #eff6ff; color: var(--color-primary, #1a365d); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.notif-row__main { flex: 1; min-width: 0; }
.notif-row__head { display: flex; gap: var(--space-2); align-items: center; margin-bottom: 2px; }
.notif-kind { font-size: 0.75rem; font-weight: 700; color: var(--color-primary, #1a365d); }
.notif-time { font-size: 0.75rem; }
.notif-row__title { display: block; font-weight: 600; color: inherit; text-decoration: none; margin-bottom: 2px; }
.notif-row__title:hover { color: var(--color-primary, #1a365d); }
.notif-row__body { margin-top: 6px; font-size: 0.875rem; }
.notif-read-btn { padding: 4px 8px; flex-shrink: 0; }

/* ── 다중 선택 액션 바 ── */
.fav-bulk-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary, #1a365d);
  color: #fff;
  border-radius: var(--radius-md, 8px);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.fav-bulk-bar__count { white-space: nowrap; }
.fav-bulk-bar__count strong { font-size: 1rem; }
.fav-bulk-bar__ops {
  display: flex; gap: 6px; margin-left: auto;
  flex-wrap: wrap; align-items: center;
}
.fav-bulk-bar__ops .form-select { min-width: 0; max-width: 160px; }
@media (max-width: 520px) {
  .fav-bulk-bar__ops { width: 100%; margin-left: 0; }
  .fav-bulk-bar__ops .form-select { flex: 1 1 140px; }
  .fav-bulk-bar__ops .btn { flex: 0 0 auto; }
}

.fav-row__check { cursor: pointer; display: flex; align-items: center; }
.fav-row__check input { width: 18px; height: 18px; cursor: pointer; }

/* ── 비교 테이블 ── */
.compare-wrap { overflow-x: auto; margin-bottom: var(--space-4); }
.compare-table {
  width: 100%; min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  text-align: left;
  vertical-align: top;
  font-size: 0.875rem;
}
.compare-table thead th {
  background: var(--color-bg-subtle, #f9fafb);
  font-weight: 700;
}
.compare-table tbody th {
  width: 120px;
  background: #fafbfc;
  color: var(--color-text-muted, #6b7280);
  font-weight: 600;
}
.compare-table a { color: var(--color-primary, #1a365d); text-decoration: none; font-weight: 600; }
.compare-table a:hover { text-decoration: underline; }

/* ── CTA 블록 (홈 하단) ── */
.cta-block {
  margin-top: var(--space-6);
  padding: var(--space-8) var(--space-5);
  background: var(--color-bg-subtle, #f9fafb);
  border-radius: var(--radius-2xl, 16px);
  text-align: center;
}
.cta-inner h2 { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-2); }
.cta-inner p { color: var(--color-text-muted, #6b7280); margin-bottom: var(--space-4); }

/* ── 법적 문서 ── */
.legal-wrap {
  max-width: 820px; margin: 0 auto;
  font-size: 0.9375rem; line-height: 1.7;
}
.legal-wrap h1 {
  font-size: 1.75rem; font-weight: 800;
  letter-spacing: var(--tracking-tighter, -0.02em);
  margin-bottom: var(--space-2);
}
.legal-wrap h2 { font-size: 1.125rem; font-weight: 700; margin-top: var(--space-5); margin-bottom: var(--space-2); }
.legal-wrap section { margin-bottom: var(--space-3); }
.legal-wrap code {
  background: var(--color-bg-subtle, #f3f4f6);
  padding: 1px 6px; border-radius: 4px;
  font-size: 0.875em;
}

/* ── 페이지네이션 ── */
.pagination-wrap { display: flex; justify-content: center; margin-top: var(--space-5); margin-bottom: var(--space-4); }

/* text-muted-custom (prototype 의 클래스명 호환) */
.text-muted-custom { color: var(--color-text-muted, #6b7280); }

/* fs-xs / fs-sm 유틸 (Bootstrap 에 없는 custom) */
.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.875rem; }

/* ── Phase 5a: 매력지수 배지 ── */
.badge-score {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
  background: #e5e7eb; color: #374151;
  border: 1px solid #d1d5db;
}
.badge-score.gold  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.badge-score.green { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.badge-score.gray  { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }

/* ── Phase 5a: 매력지수 상세 블록 ── */
.score-block {
  background: var(--color-bg-subtle, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
  padding: var(--space-3, 12px);
  margin-top: var(--space-4, 16px);
}
.score-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2, 8px); }
.score-block-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.score-block-value { font-weight: 800; font-size: 1.25rem; color: #b45309; }
.score-breakdown { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.score-breakdown li { display: grid; grid-template-columns: 1fr auto; align-items: center; font-size: 0.875rem; }
.score-bar {
  grid-column: 1 / -1;
  height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden;
}
.score-bar-fill { height: 100%; background: #60a5fa; }
.score-bar--na {
  background: repeating-linear-gradient(
    -45deg,
    #f3f4f6 0,
    #f3f4f6 4px,
    #e5e7eb 4px,
    #e5e7eb 8px
  );
}
.score-na { font-size: 0.75rem; color: var(--color-text-muted, #9ca3af); font-weight: 600; }
.score-disclaimer { margin-top: var(--space-2, 8px); font-size: 0.75rem; color: var(--color-text-muted, #6b7280); }

/* ── 상세 → 검색결과 복귀 알약 버튼 ──
   브레드크럼 위에 자리잡는 단정한 알약 버튼. 검색에서 들어왔을 때만 노출.
   - 흰 배경 + 두 톤 그림자 (가까운 + 먼) 로 부드러운 부유감
   - hover 시 화살표가 좌로 미끄러지며 흰→인디고 그라디언트 글로우
   - 페이지 카드들과 같은 둥근모서리/그림자 어휘로 통일감 */
.back-pill {
  display: inline-flex; align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 8px;
  margin: 0 0 var(--space-3, 12px);
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 999px;
  color: var(--color-text, #1f2937);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 4px 12px rgba(15,23,42,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  position: relative;
  overflow: hidden;
}
.back-pill::before {
  /* 호버 시 좌측에서 살며시 들어오는 그라디언트 글로우 */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(99,102,241,.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.back-pill:hover {
  transform: translateY(-1px);
  border-color: #c7d2fe;
  box-shadow:
    0 2px 4px rgba(15,23,42,.06),
    0 10px 24px rgba(99,102,241,.18);
  color: var(--color-primary, #1a365d);
}
.back-pill:hover::before { opacity: 1; }
.back-pill:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}

.back-pill__icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .18s ease;
  position: relative; z-index: 1;
}
.back-pill:hover .back-pill__icon {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  transform: translateX(-3px);
}
.back-pill__icon svg {
  display: block;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.back-pill:hover .back-pill__icon svg {
  transform: translateX(-1px);
}

.back-pill__text {
  position: relative; z-index: 1;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .back-pill {
    padding: 6px 14px 6px 6px;
    font-size: 0.78rem;
  }
  .back-pill__icon { width: 24px; height: 24px; }
}

/* ── 내 메모 위젯 (상세 사이드바) ── */
.notes-card .note-add textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.notes-card .note-add__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.notes-card .note-add__row small { font-size: 0.7rem; }
.notes-card .note-list {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 360px; overflow-y: auto;
}
.notes-card .note-empty { padding: 12px 4px; text-align: center; }
.notes-card .note-item {
  background: var(--color-bg-subtle, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.notes-card .note-item__body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text, #111827);
  word-break: break-word;
  white-space: pre-wrap;
}
.notes-card .note-item__meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-muted, #6b7280);
}
.notes-card .note-del {
  background: transparent; border: 0; padding: 2px 6px;
  color: var(--color-text-muted, #9ca3af);
  cursor: pointer; border-radius: 4px;
  line-height: 1;
}
.notes-card .note-del:hover { color: #dc2626; background: #fee2e2; }

/* ── Phase 5a: 최근 본 물건 ── */
.recent-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-2, 8px);
}
.recent-item {
  display: flex; gap: 10px; padding: 10px;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: box-shadow 0.15s;
}
.recent-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.recent-thumb {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--color-bg-subtle, #f3f4f6); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 1.25rem;
}
.recent-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.recent-body strong { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-addr { font-size: 0.75rem; color: var(--color-text-muted, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-price { font-size: 0.8125rem; font-weight: 700; color: #1f2937; }

/* ── Phase 5a: 저장한 검색 ── */
.saved-search-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.saved-search-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 10px;
}
.saved-search-link {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit; flex: 1; min-width: 0;
}
.saved-search-link i { color: #6b7280; }
.saved-search-link strong { font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-search-actions { display: flex; gap: 4px; flex-shrink: 0; }
.saved-alert-toggle, .saved-delete-btn {
  background: transparent; border: none; padding: 6px 8px; cursor: pointer;
  border-radius: 6px; color: #6b7280;
}
.saved-alert-toggle:hover, .saved-delete-btn:hover { background: var(--color-bg-subtle, #f3f4f6); }
.saved-alert-toggle.is-on { color: #d97706; }
.saved-delete-btn:hover { color: #dc2626; }

/* ── Phase 5b: 관리자 페이지 ── */
.admin-wrap { max-width: 1100px; margin: 0 auto; }
.admin-header { margin-bottom: var(--space-4, 16px); }
.admin-header h1 { font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }

.admin-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-2, 8px); margin-bottom: var(--space-4, 16px);
}
.admin-summary-card {
  display: flex; gap: 10px; padding: 14px;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 12px;
  text-decoration: none; color: inherit; align-items: center;
}
.admin-summary-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.admin-summary-card i { font-size: 1.5rem; color: #4b5563; }
.admin-summary-card strong { font-size: 1.25rem; display: block; }
.admin-summary-card span { font-size: 0.75rem; color: var(--color-text-muted, #6b7280); }

.admin-section { margin: var(--space-4, 16px) 0; }
.admin-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: var(--space-2, 8px); }
.admin-menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.admin-menu a {
  display: flex; gap: 8px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 10px;
  text-decoration: none; color: inherit;
}
.admin-menu a:hover { background: var(--color-bg-subtle, #f9fafb); }

.admin-filter {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--space-3, 12px);
}
.admin-filter input[type="search"] { flex: 1; min-width: 200px; }

.admin-table {
  width: 100%; border-collapse: collapse; font-size: 0.875rem;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 10px; overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.admin-table th { background: var(--color-bg-subtle, #f9fafb); font-weight: 700; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .cell-body { max-width: 280px; }
.admin-table .badge { padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.admin-table .badge-active    { background: #d1fae5; color: #065f46; }
.admin-table .badge-suspended { background: #fee2e2; color: #991b1b; }
.admin-table .badge-dormant   { background: #e5e7eb; color: #4b5563; }
.admin-table .badge-deleted   { background: #f3f4f6; color: #9ca3af; }
.admin-table .badge-pending   { background: #fef3c7; color: #92400e; }
.admin-table .badge-resolved  { background: #d1fae5; color: #065f46; }
.admin-table .badge-rejected  { background: #f3f4f6; color: #6b7280; }

/* ── Phase 5b: 신고 모달 ── */
.report-dialog {
  border: 1px solid var(--color-border, #e5e7eb); border-radius: 12px;
  padding: 0; max-width: 480px; width: 90%;
}
.report-dialog::backdrop { background: rgba(0,0,0,0.4); }
.report-form { padding: 20px; display: grid; gap: 12px; }
.report-form h3 { margin: 0; font-weight: 800; font-size: 1.125rem; }
.report-form .form-label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 600; font-size: 0.875rem; }
.report-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.case-block--report { text-align: center; }

/* ── 예시 데이터 배지 (프로토타입에 있지만 DB 에 없는 필드 표시) ── */
.stub-example {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.stub-example::before { content: "예시"; }

/* ── 하단 탭바: 모바일 전용 (≤ 767px) ──
   태블릿/데스크톱(≥768px)에서는 헤더의 메뉴(드로어)만 사용. */
@media (min-width: 768px) {
  .tab-bar { display: none !important; }
  /* body padding-bottom 도 비-모바일에선 제거 — site.css 의 14행 override */
  body { padding-bottom: 0 !important; }
  /* heart-btn / install banner 등 bottom 기준 정리 */
  .install-banner { bottom: var(--space-3) !important; }
}

/* ── 관리자 페이지 보강 (대시보드/상세/감사로그/시스템/공지) ── */
.admin-nav {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: var(--space-4, 16px);
  padding: 4px;
  background: #f9fafb; border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
}
.admin-nav-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none; color: #4b5563;
  font-size: 0.875rem; font-weight: 600;
}
.admin-nav-item:hover { background: #fff; color: #111827; }
.admin-nav-item.is-active { background: #111827; color: #fff; }
.admin-nav-item i { font-size: 1rem; }

.admin-section-title {
  font-size: 0.875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #6b7280;
  margin: var(--space-4, 16px) 0 var(--space-2, 8px);
}

.admin-card {
  background: #fff; border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px; padding: var(--space-3, 12px) var(--space-4, 16px);
  margin-bottom: var(--space-3, 12px);
}
.admin-card h3 {
  font-size: 1rem; font-weight: 700; margin: 0 0 var(--space-2, 8px);
}

.admin-row-2col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3, 12px); margin-bottom: var(--space-3, 12px);
}
@media (max-width: 767px) {
  .admin-row-2col { grid-template-columns: 1fr; }
}

.admin-table-compact { font-size: 0.8125rem; }
.admin-table-compact th, .admin-table-compact td { padding: 6px 8px; }
.admin-table .ar { text-align: right; }

.admin-spark {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: flex-end; gap: 6px; height: 80px;
}
.admin-spark li {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.admin-spark .bar {
  width: 100%; background: linear-gradient(180deg, #6366f1, #4338ca);
  border-radius: 4px 4px 0 0; min-height: 2px;
}
.admin-spark .lbl { font-size: 0.6875rem; color: #6b7280; }
.admin-spark .num { font-size: 0.75rem; font-weight: 700; color: #111827; }

.admin-actions {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--space-2, 8px);
}

.admin-providers { list-style: none; padding: 0; margin: 0; }
.admin-providers li {
  padding: 6px 10px; border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center;
}

.admin-form { display: grid; gap: var(--space-3, 12px); }
.admin-form .form-label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.admin-form .form-check { display: flex; gap: 6px; align-items: center; }

.audit-ts { white-space: nowrap; font-family: var(--font-mono, monospace); font-size: 0.75rem; color: #6b7280; }
.audit-event { background: #e0e7ff; color: #3730a3; }
.audit-req { font-family: var(--font-mono, monospace); font-size: 0.7rem; color: #9ca3af; }
.audit-payload .kv {
  display: inline-block; padding: 1px 6px; margin: 1px 3px 1px 0;
  background: #f3f4f6; border-radius: 4px; font-size: 0.7rem;
}
.audit-payload .kv b { color: #6b7280; font-weight: 600; }

.report-body-full {
  margin-top: 6px; padding: 8px; background: #f9fafb;
  border-left: 3px solid #f59e0b; white-space: pre-wrap;
  font-size: 0.875rem;
}

.admin-pagination {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: var(--space-3, 12px);
  justify-content: center; align-items: center;
}
.admin-pagination .pg-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; padding: 6px 10px;
  border: 1px solid var(--color-border, #e5e7eb); border-radius: 6px;
  background: #fff; color: #374151; text-decoration: none;
  font-size: 0.8125rem; font-weight: 600;
}
.admin-pagination .pg-link:hover { background: var(--color-bg-subtle, #f9fafb); }
.admin-pagination .pg-link.is-active { background: #111827; color: #fff; border-color: #111827; }
.admin-pagination .pg-link.disabled { color: #d1d5db; pointer-events: none; background: #fafafa; }
.admin-pagination .pg-ellipsis { padding: 6px 4px; color: #9ca3af; }
