@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-primary: #1246A3;
  --color-primary-light: #084BE7;
  --color-primary-50: #F3F7FD;
  --color-primary-100: #EEF4FF;
  --color-bg: #F7F9FC;
  --color-surface: #ffffff;
  --color-surface-hover: #F8FAFD;
  --color-text-main: #172033;
  --color-text-sub: #4B5565;
  --color-text-muted: #7B8494;
  --color-divider: #E2E7EE;
  --color-border-light: #EEF1F5;
  --color-focus: #084BE7;
  --color-gold: #C9920A;
  --color-gold-bg: #FFF7E8;
  --color-silver: #7B8494;
  --color-silver-bg: #F3F5F8;
  /* 유료 2티어(스페셜) — soft/solid 공통 (실버 대체) */
  --color-special: #C45C26;
  --color-special-bg: #FBF0E8;
  --color-success: #22A06B;
  --color-success-bg: #ECF8F2;
  --color-warning: #E89A17;
  --color-warning-bg: #FFF7E8;
  --color-error: #E5484D;
  --color-error-bg: #FFF0F0;
  --color-status-active: var(--color-success);
  --color-status-active-bg: var(--color-success-bg);
  --color-status-pending: var(--color-warning);
  --color-status-pending-bg: var(--color-warning-bg);
  --color-status-danger: var(--color-error);
  --color-status-danger-bg: var(--color-error-bg);
  --color-status-neutral: var(--color-text-muted);
  --color-status-neutral-bg: var(--color-silver-bg);

  /* 카테고리 칩 (me 관리 화면 SSOT) */
  --cat-life-bg: #F3F7FD;
  --cat-life: #1246A3;
  --cat-re-bg: #ECF8F2;
  --cat-re: #22A06B;
  --cat-job-bg: #FFF7E8;
  --cat-job: #E89A17;
  --cat-car-bg: #F3F5F8;
  --cat-car: #4B5565;

  --font-sans: 'Noto Sans KR', sans-serif;
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-sheet: 20px;
  --shadow-card-hover: 0 1px 3px rgba(17, 32, 51, 0.06);
  --shadow-floating: 0 4px 16px rgba(17, 32, 51, 0.08);

  /* 콘텐츠 열 최대 폭 */
  --layout-max-width: 430px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #e8ecf0;
  margin: 0;
  padding: 0;
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

/* Hide scrollbars by default */
* {
  scrollbar-width: none;
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Safe area simulation */
.safe-top {
  padding-top: 44px;
}
.safe-bottom {
  padding-bottom: 34px;
}

/* 화면 영역 — #root(flex, justify-content:center) 안의 아이템.
     너비: flex 아이템 기본값이 내용 크기라 100% 를 명시한다.
           max-width 는 PC 에서 폰 너비로 가운데 정렬되도록 하는 상한.
     높이: #root 가 min-height:100vh 이므로 stretch 로 그 높이를 그대로 받는다.
           (#root 의 align-items:flex-start 때문에 기본값으론 늘어나지 않음) */
#screenContent {
  width: 100%;
  max-width: var(--layout-max-width);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow-x: hidden;
}

/* 레이아웃이 page-header / bottom-nav 를 페이지 밖에서 감쌀 때 쓰는 래퍼.
     위 #screenContent 의 선언을 그대로 인수해 폰 컬럼 역할을 대신 맡는다. */
#screenContentWrap {
  width: 100%;
  max-width: var(--layout-max-width);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow-x: hidden;
}

/* 래퍼 안의 #screenContent 는 박스를 만들지 않는다.
     자식들이 래퍼의 flex 컬럼 아이템이 되므로, 래퍼가 없을 때와 렌더 결과가 같다.
     (박스가 사라지니 위의 max-width / background / overflow 도 함께 무효가 된다) */
#screenContentWrap > #screenContent {
  display: contents;
}

/* ==========================================================================
   공통 컴포넌트 — ui.tsx 의 컴포넌트를 CSS 클래스로 옮긴 것.
   화면 고유 스타일은 각 페이지의 <style> 블록에 작성한다.
   ========================================================================== */

/* ── 아이콘 ─────────────────────────────────────────────────────────────── */
.icon {
  flex-shrink: 0;
  stroke-width: 1.7;
}
.icon-bold {
  stroke-width: 2.5;
}

/* ── 버튼 기본형 ────────────────────────────────────────────────────────── */
.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--color-text-main);
}
.text-btn {
  padding: 0 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}
.text-btn.is-quiet {
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-sub);
}

.action-soft-btn {
  min-height: 32px;
  border: 1px solid var(--color-divider);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text-sub);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.action-soft-btn:disabled,
.action-soft-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn {
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}
.btn-outline {
  background: var(--color-surface);
  color: var(--color-text-main);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 500;
}
.btn-ghost {
  background: var(--color-bg);
  color: var(--color-text-sub);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 500;
}
.btn-line {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  color: var(--color-text-main);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 500;
}
.btn-gold {
  background: var(--color-gold);
  color: #fff;
}
.btn-disabled {
  background: var(--color-divider);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn.action-soft-btn,
a.action-soft-btn,
button.action-soft-btn {
  min-height: 32px;
  border: 1px solid var(--color-divider);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text-sub);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

/* ── 앱바 / 페이지 헤더 ─────────────────────────────────────────────────── */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 4px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}
.app-bar .title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-main);
  text-align: center;
}
.app-bar .spacer {
  width: 44px;
  flex-shrink: 0;
}
.app-bar .actions {
  display: flex;
  flex-shrink: 0;
}

/* 이미지 위에 얹는 투명 앱바 (상세 화면 갤러리) */
.app-bar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 4px 4px 8px;
  padding-top: calc(4px + env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
  color: #fff;
}
.app-bar-overlay .icon-btn {
  color: #fff;
}
.app-bar-overlay .round-btn {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.app-bar-overlay .round-btn.is-liked {
  color: var(--color-error);
}

/* 뒤로가기 없는 최상위 화면 헤더 */
.page-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding-top: env(safe-area-inset-top);
}
.page-header .page-title {
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-main);
}

/* ── 하단 네비게이션 ────────────────────────────────────────────────────── */
.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  height: 72px;
  display: flex;
  align-items: stretch;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  box-sizing: content-box;
}
.bottom-nav a {
  flex: 1;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--color-text-muted);
}
.bottom-nav a span {
  font-size: 10px;
  font-weight: 400;
}
.bottom-nav a.is-active {
  color: var(--color-primary);
}
.bottom-nav a.is-active .icon {
  stroke-width: 2.2;
}
.bottom-nav a.is-active span {
  font-weight: 600;
}

/* ── 하단 고정 CTA 바 ───────────────────────────────────────────────────── */
.cta-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
}

.cta-bar .btn {
  border-radius: var(--radius-btn);
  padding: 14px 20px;
}

.cta-bar .btn.action-soft-btn {
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ── 구분선 / 섹션 ──────────────────────────────────────────────────────── */
.divider-thick {
  height: 8px;
  background: var(--color-bg);
  flex-shrink: 0;
}
.divider-line {
  height: 1px;
  background: var(--color-divider);
  flex-shrink: 0;
}
.panel {
  background: var(--color-surface);
}
.panel-pad {
  padding: 16px;
}
.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 12px;
}
.block-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 12px;
}
.section-header .title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-main);
}
.section-header .more {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-sub);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── 배지 ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.badge-premium {
  background: var(--color-gold);
  color: #fff;
}
.badge-special {
  background: var(--color-special-bg);
  color: var(--color-special);
}
.badge-recommendation {
  background: var(--color-primary-50);
  color: var(--color-primary);
}
.badge-normal {
  background: var(--color-silver-bg);
  color: var(--color-text-sub);
}
/* 상태 표시용 알약 */
.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.pill-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.pill-primary {
  background: var(--color-primary-50);
  color: var(--color-primary);
  border-radius: 6px;
}
.count-badge {
  background: var(--color-error);
  color: #fff;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* ── 별점 ───────────────────────────────────────────────────────────────── */
.stars {
  display: inline-flex;
  gap: 1px;
  color: #f59e0b;
}

/* ── 칩 / 탭 ────────────────────────────────────────────────────────────── */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.chip {
  background: var(--color-surface);
  color: var(--color-text-sub);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.tab-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
}
.tab {
  background: var(--color-surface);
  color: var(--color-text-sub);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
/* 밑줄형 탭 */
.underline-tabs {
  display: flex;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}
.underline-tabs button {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 12px 0;
  font-size: 14px;
  color: var(--color-text-sub);
  cursor: pointer;
}
.underline-tabs button.is-active {
  color: var(--color-primary);
  font-weight: 600;
  border-bottom-color: var(--color-primary);
}

/* ── 건수 + 필터 줄 ─────────────────────────────────────────────────────── */
.count-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
}
.count-bar .count {
  flex: 1;
  font-size: 13px;
  color: var(--color-text-sub);
}
.count-bar .count strong {
  color: var(--color-text-main);
}
.mini-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-sub);
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.mini-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ── 검색 입력 ──────────────────────────────────────────────────────────── */
.search-box {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--color-text-muted);
}
.search-box .placeholder {
  flex: 1;
  font-size: 14px;
}

.input {
  width: 100%;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-btn);
  padding: 12px;
  font-size: 14px;
  color: var(--color-text-main);
  background: var(--color-surface);
  outline: none;
}
.input:focus {
  border-color: var(--color-focus);
}
textarea.input {
  resize: none;
  min-height: 120px;
}
.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 10px;
}
.field-label .req {
  color: var(--color-error);
}
.char-count {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 4px;
}

/* ── 카드 / 타일 ────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: none;
}
.card-pad {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 16px;
}

/* 2열 썸네일 타일 */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: none;
  cursor: pointer;
}
.tile .thumb {
  position: relative;
}
.tile .thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.tile .thumb .badge-slot {
  position: absolute;
  top: 6px;
  left: 6px;
}
.tile .body {
  padding: 8px 10px 10px;
}
.tile .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-main);
}
.tile .price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}
.tile .sub {
  font-size: 11px;
  color: var(--color-text-sub);
  margin-top: 2px;
}
.tile .muted {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.tile .model {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-main);
}
.tile .rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-sub);
}
/* 썸네일 위 하트 버튼 */
.fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-sub);
}
.fav-btn.is-liked {
  color: var(--color-error);
}
.fav-btn .icon-filled,
.like-toggle .icon-filled {
  display: none;
}
.fav-btn.is-liked .icon-filled,
.like-toggle.is-liked .icon-filled {
  display: block;
}
.fav-btn.is-liked .icon-outline,
.like-toggle.is-liked .icon-outline {
  display: none;
}
.like-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}
.like-toggle.is-liked {
  color: var(--color-error);
}
.like-toggle.is-animating {
  transform: scale(0.9);
  transition: transform 0.15s ease;
}

/* 가로 스크롤 캐러셀 */
.carousel {
  overflow-x: auto;
  padding-left: 16px;
}
.carousel-track {
  display: flex;
  gap: 10px;
  padding-right: 16px;
}

/* 썸네일 + 본문 가로 리스트 행 */
.list-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  align-items: flex-start;
}
.list-row .thumb-wrap {
  position: relative;
  flex-shrink: 0;
}
.list-row .thumb-wrap img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.list-row .thumb-wrap .badge-slot {
  position: absolute;
  top: 4px;
  left: 4px;
}
.list-row .body {
  flex: 1;
  min-width: 0;
}
.list-row .price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}
.list-row .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
}
.list-row .sub {
  font-size: 12px;
  color: var(--color-text-sub);
  margin-top: 2px;
}
.list-row .rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-sub);
}

/* 아이콘 썸네일 (구인공고 등) */
.icon-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* 이모지 카테고리 그리드 */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.emoji-item {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.emoji-item .box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.emoji-item .name {
  font-size: 11px;
  color: var(--color-text-main);
  text-align: center;
  line-height: 1.3;
}
.emoji-item .count {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* 정보 나열 (라벨/값) */
.info-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.info-row .label {
  font-size: 13px;
  color: var(--color-text-sub);
  width: 68px;
  flex-shrink: 0;
}
.info-row .value {
  font-size: 13px;
  color: var(--color-text-main);
  flex: 1;
  line-height: 1.5;
}
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.spec-grid .cell {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
}
.spec-grid .cell .label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.spec-grid .cell .value {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-main);
}
.body-text {
  font-size: 14px;
  color: var(--color-text-sub);
  line-height: 1.7;
}

/* 리뷰 */
.review {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 14px;
  box-shadow: none;
}
.review .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.review .avatar {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.review .author {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
}
.review .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
}
.review .text {
  font-size: 13px;
  color: var(--color-text-sub);
  line-height: 1.7;
}

/* 빈 상태 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 32px;
  gap: 12px;
}
.empty-state[hidden] {
  display: none !important;
}
.empty-state .box {
  width: 72px;
  height: 72px;
  border-radius: 36px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.empty-state .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-main);
}
.empty-state .desc {
  font-size: 13px;
  color: var(--color-text-sub);
  text-align: center;
  line-height: 1.5;
}

/* ── 지도 자리표시 (ui.tsx MapPlaceholder) ──────────────────────────────── */
.map-placeholder {
  position: relative;
  overflow: hidden;
  background: #e5eff8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-placeholder .grid {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    repeating-linear-gradient(0deg, #c8d8e8 0px, #c8d8e8 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, #c8d8e8 0px, #c8d8e8 1px, transparent 1px, transparent 40px);
}
.map-placeholder .road-h {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  height: 3px;
  background: #b8c8d8;
  opacity: 0.6;
}
.map-placeholder .road-v1 {
  position: absolute;
  left: 30%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #b8c8d8;
  opacity: 0.6;
}
.map-placeholder .road-v2 {
  position: absolute;
  left: 65%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #c8d8e8;
  opacity: 0.5;
}
.map-placeholder .cluster {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(18, 70, 163, 0.28);
  border: 2px solid #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.map-placeholder .map-label {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--color-text-sub);
  font-weight: 500;
  z-index: 2;
}
/* 지도 위에 떠 있는 알약 버튼 */
.map-float {
  position: absolute;
  background: var(--color-surface);
  border-radius: 20px;
  padding: 8px 16px;
  box-shadow: var(--shadow-floating);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-border-light);
}

/* ── 바텀시트 ───────────────────────────────────────────────────────────── */
.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.sheet {
  position: relative;
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  max-height: 85vh;
  overflow-y: auto;
}
.sheet .handle {
  width: 36px;
  height: 4px;
  background: var(--color-divider);
  border-radius: 2px;
  margin: 12px auto 0;
}
.sheet .sheet-head {
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet .sheet-head .title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-main);
}

/* ── 스켈레톤 ───────────────────────────────────────────────────────────── */
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #e8ecf0 25%, #f5f7fa 50%, #e8ecf0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* --------------------------------------------------------------------------
   Category/list filter unification
   PC filter language translated for mobile density:
   white surface, light border, compact 32-34px visual height, active brand fill.
   Page-local prototype styles appear after this file, so scoped !important is used
   only for filter controls that diverged across category/list pages.
   -------------------------------------------------------------------------- */
.quick-filter,
.filter-bar,
.list-head,
.cond-bar {
  background: var(--color-surface) !important;
  border-bottom: 1px solid var(--color-divider) !important;
}

.quick-filter,
.filter-bar {
  padding: 8px 16px 10px !important;
}

.qf-bar,
.quick-filters,
.cat-chip-row,
.room-structure-row,
.cond-bar {
  padding: 8px 16px !important;
}

.chip-row,
.qf-bar,
.quick-filters,
.cat-chip-row,
.sheet-chips,
.filter-group .chips,
.room-structure-chip-row,
.cond-chips {
  gap: 6px !important;
}

.quick-filters button,
.quick-filter .chip-row .chip,
.filter-bar .chip-row .chip,
.cat-chip-row .chip,
.filter-group .chips button,
.sheet-chips .chip,
.room-structure-chip-row button,
.cond-chips .cond-btn {
  flex-shrink: 0 !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 16px !important;
  background: var(--color-primary-50) !important;
  color: var(--color-primary) !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease !important;
}

.quick-filters button.is-active,
.quick-filter .chip-row .chip.is-active,
.filter-bar .chip-row .chip.is-active,
.cat-chip-row .chip.is-active,
.filter-group .chips button.is-active,
.sheet-chips .chip.is-active,
.room-structure-chip-row button.is-active,
.cond-chips .cond-btn.is-active {
  border-color: var(--color-primary) !important;
  background: var(--color-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.qf-bar .mini-btn,
.filter-bar .mini-btn,
.count-bar .mini-btn {
  border: 1px solid var(--color-border-light) !important;
  border-radius: 16px !important;
  background: var(--color-primary-50) !important;
  color: var(--color-primary) !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.qf-bar .mini-btn.is-active,
.filter-bar .mini-btn.is-active,
.count-bar .mini-btn.is-active {
  border-color: var(--color-primary) !important;
  background: var(--color-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.deal-tabs {
  gap: 6px !important;
  padding: 8px 16px 0 !important;
  background: var(--color-surface) !important;
  border-bottom: 1px solid var(--color-divider) !important;
}

.deal-tabs button {
  padding: 0 10px 9px !important;
  color: var(--color-text-sub) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.deal-tabs button.is-active {
  color: var(--color-primary) !important;
  font-weight: 600 !important;
  border-bottom-color: var(--color-primary) !important;
}

.region-select-btn {
  border: 1px solid var(--color-divider) !important;
  border-radius: var(--radius-btn) !important;
  background: var(--color-surface) !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
}

.region-selected .chip-sel {
  border: 1px solid var(--color-primary) !important;
  border-radius: 16px !important;
  background: var(--color-primary) !important;
  color: #fff !important;
  padding: 5px 8px 5px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.region-cities button.is-active,
.region-groups button.is-active {
  color: var(--color-primary) !important;
  font-weight: 600 !important;
}

/* --------------------------------------------------------------------------
   Management screen language
   PC management UI translated for mobile: border-first surfaces, semantic
   status badges, compact filters, and primary fill reserved for real CTAs.
   -------------------------------------------------------------------------- */
.management-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  box-shadow: none;
}

.management-card.is-featured {
  border-color: var(--color-primary);
}

.management-row {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}

.management-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
}

.management-summary-cell {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-btn);
}

.status-badge,
.status-pill,
.management-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.is-active,
.status-pill.is-active,
.management-status.is-active {
  background: var(--color-status-active-bg);
  color: var(--color-status-active);
}

.status-badge.is-pending,
.status-badge.is-draft,
.status-badge.is-review,
.status-pill.is-pending,
.status-pill.is-draft,
.status-pill.is-review,
.management-status.is-pending {
  background: var(--color-status-pending-bg);
  color: var(--color-status-pending);
}

.status-badge.is-danger,
.status-badge.is-rejected,
.status-pill.is-danger,
.status-pill.is-rejected,
.management-status.is-danger {
  background: var(--color-status-danger-bg);
  color: var(--color-status-danger);
}

.status-badge.is-neutral,
.status-badge.is-closed,
.status-badge.is-withdrawn,
.status-pill.is-neutral,
.status-pill.is-closed,
.status-pill.is-withdrawn,
.management-status.is-neutral {
  background: var(--color-status-neutral-bg);
  color: var(--color-status-neutral);
}

.management-badge-brand {
  background: var(--color-primary-50);
  color: var(--color-primary);
}

.management-badge-gold {
  background: var(--color-gold-bg);
  color: var(--color-gold);
}

.management-badge-neutral {
  background: var(--color-silver-bg);
  color: var(--color-text-sub);
}

.management-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  justify-content: flex-end;
}

.management-action-row .management-action-secondary {
  flex: 0 1 auto;
}

.management-action-row .management-action-primary {
  flex: 1 1 auto;
}

.management-action-primary,
.management-action-secondary,
.management-action-danger {
  min-width: 0;
  min-height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.25;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    opacity 120ms ease;
}

.management-action-primary {
  border: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 6px 12px;
  gap: 4px;
}

.management-action-secondary {
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text-sub);
  padding: 5px 10px;
}

.management-action-secondary:hover,
.management-action-secondary:focus-visible {
  background: var(--color-surface-hover, var(--color-bg));
  color: var(--color-text-main);
}

.management-action-danger {
  width: 40px;
  height: 34px;
  flex: 0 0 40px;
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-error);
  padding: 0;
}

.management-action-primary:disabled,
.management-action-secondary:disabled,
.management-action-danger:disabled,
.management-action-primary[aria-disabled="true"],
.management-action-secondary[aria-disabled="true"],
.management-action-danger[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.app-bar .actions .management-action-primary,
.app-bar .actions .management-action-secondary {
  margin-right: 8px;
  white-space: nowrap;
}
