/* ═══════════════════════════════════════
   썸메이트 — 관리자 도구 스타일
   팔레트: 에어비앤비 화이트 캔버스 — 캔버스 #FFFFFF / 잉크 #222222
           메인 포인트 #FD1569 (성사=잉크) / 보조 블루 #E3EBFC·#33549E
           서피스 #F7F7F7·#F2F2F2 / 헤어라인 #EBEBEB
   폰트: Pretendard (프리텐다드)
═══════════════════════════════════════ */

@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2'); font-weight:100; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2'); font-weight:200; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2'); font-weight:300; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2'); font-weight:500; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2'); font-weight:700; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2'); font-weight:800; font-display:swap; }
@font-face { font-family:'Pretendard'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2'); font-weight:900; font-display:swap; }

:root {
  --pink: #FFD6E4;
  --pink-soft: #FFE9F1;
  --pink-dark: #FD1569;
  --pink-mid: #FD1569;
  --blue: #C7D8F9;
  --blue-soft: #E3EBFC;
  --blue-dark: #33549E;
  --blue-mid: #4A70C8;
  --orange: #FD1569;
  --orange-soft: #FFE9F1;
  --cream: #F7F7F7;
  --cream-dark: #6A6A6A;
  --white: #FFFFFF;
  --ink: #222222;
  --gray: #6A6A6A;
  --gray-mid: #929292;
  --gray-bg: #F7F7F7;
  --line: #EBEBEB;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  /* ── 간격 ──
     예전에는 8·10·12·14px 스페이서가 자리마다 뒤섞여 있어서 위아래 리듬이 들쭉날쭉했습니다.
     이제 아래 다섯 단계만 씁니다.
       1 라벨↔입력처럼 붙어 있는 것   2 버튼끼리   3 문구↔박스(기본)
       4 덩어리 사이                  5 큰 구획 */
  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
}

/* 사이를 벌리는 빈 칸. 예전의 <div style="height:8px"> 들을 이걸로 통일했습니다 */
.gap-sm { height:var(--sp-2); }
.gap    { height:var(--sp-3); }
.gap-lg { height:var(--sp-4); }

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { font-size:18px; }
body {
  font-family:'Pretendard','Noto Sans KR',-apple-system,sans-serif;
  background:#FFFFFF;
  color:var(--ink);
  min-height:100vh;
  line-height:1.5;
  letter-spacing:-0.70px;
  word-break:keep-all;       /* 한글이 한 글자씩 떨어져 줄바꿈되는 것 방지 */
  overflow-wrap:break-word;
}
/* 모달이 열려 있는 동안 뒤 배경이 따라 움직이지 않게 함 (app.js 가 붙였다 뗍니다) */
body.modal-open { overflow:hidden; }
button { font-family:inherit; cursor:pointer; border:none; background:none; }

/* 입력칸 글씨는 16px 아래로 내리지 않습니다.
   아이폰 사파리는 16px 미만 입력칸에 커서가 들어가면 화면을 제멋대로 확대해서,
   칸이 스무 개쯤 되는 등록 화면에서는 확대·축소가 계속 반복됩니다. */
input, textarea, select { font-family:inherit; font-size:16px; color:var(--ink); }

/* ── 포커스 ──
   예전에는 모든 요소(*)에 걸어둬서, 크롬이 스크롤되는 상자에도 초점을 주는 바람에
   사진 캐러셀·목록·모달 같은 '누르지도 않은 곳'에 분홍 테두리가 잔뜩 생겼습니다.
   이제 실제로 누를 수 있는 것들만 지정합니다. */
:focus { outline:none; }
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline:2.5px solid var(--pink-dark);
  outline-offset:2px;
  border-radius:6px;
}

/* 글씨를 쓰는 칸은 테두리 색으로 알려줍니다.
   (글자칸은 마우스로 눌러도 :focus-visible 이 켜지는 규칙이라, 아웃라인을 쓰면
    칸을 누를 때마다 굵은 테두리가 튀어나옵니다. 신청 폼과 같은 방식으로 맞췄어요) */
.f-field input:focus, .f-field textarea:focus, .f-field select:focus,
.paste-area:focus, .admin-memo-input:focus,
.promo-link-row input:focus, .rvm-stat-row input:focus,
.mini-select:focus, .gate-box input:focus {
  outline:none;
  border-color:var(--pink-dark);
}

/* 초점을 코드로 옮겨주는 자리(모달 본문)나 스크롤되는 상자에는 테두리를 그리지 않습니다 */
.modal-sheet:focus, .modal-sheet:focus-visible,
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible,
.d-track:focus, .d-track:focus-visible,
.pick-list:focus, .pick-list:focus-visible,
.trail-path:focus, .trail-path:focus-visible,
#purgeList:focus, #purgeList:focus-visible,
.chip-row:focus, .chip-row:focus-visible { outline:none; }

/* 움직임을 줄이도록 설정한 분에게는 애니메이션을 끕니다 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}

#app { max-width:520px; margin:0 auto; min-height:100vh; background:var(--white); position:relative; padding-bottom:88px; }
@media (min-width:560px){ #app { box-shadow:0 0 40px rgba(0,0,0,.06); } }

.hidden { display:none !important; }

/* ── 헤더 ── */
.app-header { background:var(--white); padding:20px 20px 16px; border-bottom:1px solid var(--line); }
.header-top { display:flex; align-items:center; gap:10px; }
.header-top .logo-svg { flex-shrink:0; }
.header-title { font-size:21px; font-weight:800; color:var(--pink-dark); letter-spacing:-.7px; }
.header-date { font-size:13.5px; color:var(--cream-dark); margin-top:1px; }
.header-actions { margin-left:auto; display:flex; gap:6px; }
.icon-btn { width:36px; height:36px; border-radius:50%; background:#F2F2F2; color:var(--ink); font-size:18px; display:flex; align-items:center; justify-content:center; transition:transform .12s; }
.icon-btn:active { transform:scale(.92); }

/* ── 통계 ──
   왼쪽 한 칸은 '사람 수', 오른쪽 세 칸은 '매칭 건수'로 세는 단위가 다릅니다.
   그냥 네 칸을 나란히 두면 '전체 12명 중 3명 성사'처럼 잘못 읽히기 때문에,
   가운데에 선을 넣고 오른쪽 묶음에 '진행 중인 매칭'이라는 이름을 붙여 갈라놨습니다. */
.stats-row { display:flex; align-items:stretch; gap:7px; margin-top:15px; }
.stat-box {
  flex:1; min-width:0; background:var(--white); border-radius:var(--radius-sm);
  padding:9px 4px; text-align:center; cursor:pointer;
  border:1.5px solid var(--line); transition:border-color .15s, background .15s;
}
.stat-box.active { border-color:var(--pink-dark); background:#FFF3F8; }
.stat-num { font-size:21px; font-weight:800; color:var(--pink-dark); line-height:1.2; }
.stat-box[data-stat="exchanging"] .stat-num { color:var(--blue-mid); }
.stat-box[data-stat="some"] .stat-num { color:var(--orange); }
.stat-label { display:block; font-size:12.5px; color:var(--gray); }

.stat-side { flex:3; min-width:0; }
.stat-side-label {
  font-size:11.5px; font-weight:700; color:var(--gray-mid);
  text-align:center; margin-bottom:3px; letter-spacing:-.3px;
}
.stat-side-boxes { display:flex; gap:7px; }
.stat-side-boxes .stat-box { padding:6px 4px; }
.stat-solo { display:flex; flex-direction:column; justify-content:center; }
/* 왼쪽(사람)과 오른쪽(매칭)을 가르는 선 */
.stat-divider { width:1px; background:var(--line); margin:2px 3px; flex-shrink:0; }

/* ── 뷰 공통 ── */
.view { display:none; padding:14px 18px 20px; }
.view.active { display:block; }
.view-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:var(--sp-4); }
.view-title { font-size:19px; font-weight:800; color:var(--pink-dark); }

/* ── 검색 & 필터 ── */
/* 검색창은 눌렀을 때 테두리가 생기지 않습니다 — 회색 바탕만으로 충분히 보이고,
   글자를 칠 때마다 분홍 테두리가 켜지면 화면이 시끄러워집니다. */
.search-bar { display:flex; align-items:center; gap:8px; background:var(--gray-bg); border-radius:var(--radius-sm); padding:0 14px; margin-bottom:var(--sp-3); }
.search-bar input { flex:1; border:none; background:none; padding:12px 0; font-size:16px; }
.search-bar input:focus, .search-bar input:focus-visible { outline:none; box-shadow:none; }
.search-bar i { color:var(--gray); font-size:18px; }
.filter-row { display:flex; gap:6px; align-items:center; margin-bottom:8px; flex-wrap:wrap; }
.chip { border-radius:20px; padding:8px 14px; min-height:38px; display:inline-flex; align-items:center; font-size:14px; font-weight:500; background:var(--gray-bg); color:#6A6A6A; transition:all .15s; white-space:nowrap; }
.chip.active { background:var(--pink-dark); color:var(--white); font-weight:600; }
/* 칩 안에 붙는 건수 (대기 3 · 승인 12 처럼) */
.chip-num {
  margin-left:6px; padding:1px 6px; border-radius:20px;
  background:rgba(0,0,0,.06); color:var(--gray);
  font-size:12px; font-weight:700; line-height:1.5;
}
.chip.active .chip-num { background:rgba(255,255,255,.24); color:var(--white); }
.chip-num.zero { opacity:.45; }

/* ── 후보 목록의 필터 ──
   성별(하나만 고름)과 상태(여러 성격의 토글)는 성격이 다른 조건인데
   예전에는 똑같이 생긴 알약 버튼 여덟 개가 한 줄에 섞여 있었습니다.
   이제 성별은 붙어 있는 세그먼트, 상태는 테두리형 토글로 모양을 갈라놓고
   '상태'라는 이름표를 붙여, 무엇을 고르는 자리인지 한눈에 보이게 합니다. */
.filter-bar { display:flex; gap:6px; align-items:center; margin-bottom:10px; }
.seg { display:flex; background:var(--gray-bg); border-radius:10px; padding:3px; gap:2px; flex-shrink:0; }
.seg-btn {
  padding:7px 13px; min-height:34px; border-radius:8px;
  font-size:14px; font-weight:600; color:var(--gray); white-space:nowrap;
  transition:background .15s, color .15s;
}
.seg-btn.active { background:var(--white); color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.10); }
.mini-select { border:1.5px solid var(--line); border-radius:10px; padding:6px 8px; font-size:16px; background:var(--white); color:#6A6A6A; flex:1; min-width:0; }
.view-toggle { width:38px; height:38px; border-radius:10px; border:1.5px solid var(--line); color:var(--pink-dark); font-size:18px; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:var(--white); }

.filter-block { display:flex; align-items:center; gap:8px; margin-bottom:var(--sp-3); }
.filter-label { flex-shrink:0; font-size:12.5px; font-weight:700; color:var(--gray-mid); }
.chip-row { display:flex; gap:6px; flex-wrap:wrap; min-width:0; }
.chip.toggle { background:var(--white); border:1.5px solid var(--line); color:var(--gray); padding:6px 12px; }
.chip.toggle.active { background:var(--pink-soft); border-color:var(--pink-dark); color:var(--pink-dark); font-weight:700; }
.chip.toggle.danger.active { background:#FDECE7; border-color:#C13515; color:#C13515; }
/* 켜진 칩 앞에 체크를 붙여, 여러 개를 함께 걸 수 있다는 걸 보이게 합니다 */
.chip.toggle.active::before {
  content:'\2713'; font-weight:700; margin-right:5px; font-size:12.5px; line-height:1;
}

/* 지금 무엇으로 걸러 보고 있는지 + 한 번에 푸는 버튼 */
.filter-summary {
  display:flex; align-items:center; gap:8px;
  background:var(--gray-bg); border-radius:var(--radius-sm);
  padding:8px 8px 8px 12px; margin-bottom:10px;
}
.filter-summary-text { flex:1; min-width:0; font-size:13.5px; color:var(--gray); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.filter-summary-text b { color:var(--ink); font-weight:700; }
.filter-reset {
  flex-shrink:0; display:inline-flex; align-items:center; gap:4px;
  background:var(--white); border:1.5px solid var(--line); border-radius:20px;
  padding:6px 12px; font-size:13px; font-weight:700; color:var(--pink-dark);
}

/* ── 후보 카드 (리스트뷰) ── */
.c-card { border:1.5px solid var(--line); border-radius:var(--radius-md); padding:13px 14px; margin-bottom:9px; cursor:pointer; transition:border-color .15s; position:relative; background:var(--white); }
.c-card:active { border-color:var(--pink); }
.c-card.pinned { border-color:var(--pink); background:#FFF3F8; }
.c-row { display:flex; align-items:center; gap:11px; }
.c-avatar { width:44px; height:44px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:22px; overflow:hidden; background:var(--pink-soft); color:var(--pink-mid); }
.c-avatar img { width:100%; height:100%; object-fit:cover; }
.c-avatar.male { background:#F2F2F2; color:var(--gray); }
.c-info { flex:1; min-width:0; }
.c-name { font-size:17px; font-weight:700; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.c-name .pin-star { color:#E9B949; font-size:14.5px; }
.c-meta { font-size:13.5px; color:var(--gray); font-weight:400; }
.c-sub { font-size:13px; color:var(--gray-mid); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.badge { border-radius:20px; padding:4px 11px; font-size:12.5px; font-weight:700; flex-shrink:0; }
.badge.candidate { background:var(--pink); color:var(--pink-dark); }
.badge.exchanging { background:var(--blue); color:var(--blue-dark); }
.badge.some { background:var(--orange); color:var(--white); }
.badge.success { background:var(--ink); color:var(--white); }
.badge.archived { background:var(--gray-bg); color:var(--gray); }
.badge.ended { background:var(--gray-bg); color:var(--gray); }
.badge.blacklist { background:#C13515; color:var(--white); }

/* ── 앨범뷰 ── */
.album-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.a-card { border:1.5px solid var(--line); border-radius:var(--radius-md); overflow:hidden; cursor:pointer; background:var(--white); position:relative; }
.a-card.pinned { border-color:var(--pink); }
.a-photo { aspect-ratio:3/3.4; background:var(--pink-soft); display:flex; align-items:center; justify-content:center; font-size:38px; color:var(--pink-mid); position:relative; }
.a-photo.male { background:#F2F2F2; color:var(--gray); }
.a-photo img { width:100%; height:100%; object-fit:cover; }
.a-photo .badge { position:absolute; top:8px; left:8px; }
.a-photo .pin-star { position:absolute; top:8px; right:10px; color:#E9B949; font-size:17px; text-shadow:0 1px 3px rgba(0,0,0,.25); }
.a-body { padding:9px 11px 11px; }
.a-name { font-size:15.5px; font-weight:700; }
.a-meta { font-size:13px; color:var(--gray); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── 빈 상태 ── */
.empty { text-align:center; padding:52px 20px; }
.empty svg { margin-bottom:12px; opacity:.9; }
.empty-text { font-size:16px; font-weight:600; color:#6A6A6A; }
.empty-sub { font-size:14px; color:var(--gray); margin-top:4px; }
/* 필터 때문에 비어 있는 경우에는 여기서 바로 풀 수 있게 */
.empty-action {
  display:inline-flex; align-items:center; gap:5px; margin-top:14px;
  background:var(--pink-soft); color:var(--pink-dark);
  border-radius:20px; padding:9px 16px; font-size:14px; font-weight:700;
}

/* ── 등록 뷰 ── */
.seg-tabs { display:flex; gap:6px; margin-bottom:16px; }
.seg-tab { flex:1; border-radius:var(--radius-sm); padding:9px 4px; font-size:14.5px; font-weight:600; background:var(--gray-bg); color:#6A6A6A; text-align:center; }
.seg-tab.active { background:var(--pink-dark); color:var(--white); }
.paste-area { width:100%; min-height:170px; border:1.5px solid var(--line); border-radius:var(--radius-md); padding:13px 15px; font-size:16px; line-height:1.8; resize:vertical; background:var(--gray-bg); font-family:inherit; }
.hint-text { font-size:13.5px; color:var(--gray); line-height:1.6; margin-bottom:var(--sp-3); }
.btn { width:100%; border-radius:var(--radius-md); padding:13px; font-size:16px; font-weight:700; transition:transform .12s, opacity .15s; display:flex; align-items:center; justify-content:center; gap:7px; }
.btn:active { transform:scale(.98); }
.btn:disabled { opacity:.5; }
.btn.primary { background:var(--orange); color:var(--white); }
.btn.dark { background:var(--ink); color:var(--white); }
.btn.soft { background:var(--pink-soft); color:var(--pink-dark); }
.btn.ghost { background:var(--white); border:1.5px solid #DDDDDD; color:var(--ink); padding:11.5px 13px; }
.btn.danger-soft { background:#FDECE7; color:#C13515; }
.btn.danger-solid { background:#C13515; color:var(--white); }
.btn-row { display:flex; gap:var(--sp-2); }
.btn-row .btn { flex:1; }

/* ── 폼 ── */
.form-section { margin-bottom:var(--sp-5); }
.form-section-title { font-size:15.5px; font-weight:800; color:var(--pink-dark); margin-bottom:var(--sp-3); display:flex; align-items:center; gap:6px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.form-grid .full { grid-column:1/-1; }
.f-field label, .f-field .f-label { display:block; font-size:13.5px; color:var(--gray); margin-bottom:var(--sp-1); font-weight:500; }
/* 눈에는 안 보이지만 스크린리더는 읽는 이름표 */
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.f-field input, .f-field select, .f-field textarea {
  width:100%; border:1.5px solid var(--line); border-radius:10px; padding:10px 11px; font-size:16px; background:var(--white);
}
.f-field textarea { resize:vertical; min-height:64px; line-height:1.6; }
.gender-toggle { display:flex; gap:8px; }
.g-btn { flex:1; border-radius:10px; padding:10px; font-size:15px; font-weight:600; border:1.5px solid var(--line); background:var(--white); color:var(--gray); }
.g-btn.active.m { background:#F2F2F2; border-color:var(--ink); color:var(--ink); }
.g-btn.active.f { background:var(--pink-soft); border-color:var(--pink-mid); color:var(--pink-dark); }
.photo-add-row { display:flex; gap:8px; flex-wrap:wrap; }
.photo-thumb { width:64px; height:64px; border-radius:var(--radius-sm); object-fit:cover; }
.photo-thumb-wrap { position:relative; }
.photo-del { position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%; background:var(--ink); color:#fff; font-size:12.5px; display:flex; align-items:center; justify-content:center; }
.photo-add-btn { width:64px; height:64px; border-radius:var(--radius-sm); border:1.5px dashed var(--gray-mid); color:var(--gray); font-size:22px; display:flex; align-items:center; justify-content:center; background:var(--gray-bg); }
.photo-thumb-wrap.main .photo-thumb { outline:2px solid var(--pink-dark); outline-offset:1px; }
.photo-main-tag { position:absolute; bottom:3px; left:50%; transform:translateX(-50%); background:var(--pink-dark); color:#fff; font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:6px; white-space:nowrap; pointer-events:none; }
/* 사진 순서 화살표 — 17px 짜리는 손가락으로 누르기 어려워서 눌리는 범위를 넓혔습니다
   (보이는 크기는 그대로 두고, 투명한 여백으로만 넓힙니다) */
.photo-move { position:absolute; top:0; bottom:0; width:26px; background:none; color:#fff; font-size:15px; display:flex; align-items:center; justify-content:center; }
.photo-move::before {
  content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:22px; height:32px; background:rgba(0,0,0,.55); border-radius:5px;
}
.photo-move i { position:relative; z-index:1; }
.photo-move.l { left:-2px; }
.photo-move.r { right:-2px; }
.photo-move[disabled] { display:none; }
.photo-del { width:24px; height:24px; }

/* ── 파싱 결과 ── */
.parse-result { margin-top:16px; }
.parse-head { display:flex; align-items:center; gap:7px; margin-bottom:9px; }
.parse-head .title { font-size:15.5px; font-weight:800; color:var(--pink-dark); }
.count-pill { background:var(--pink); color:var(--pink-dark); border-radius:20px; padding:2px 10px; font-size:13px; font-weight:700; }
.parse-table { width:100%; font-size:14.5px; border-collapse:collapse; }
.parse-table td { padding:5px 0; vertical-align:top; }
.parse-table td:first-child { color:var(--gray); width:32%; }
.parse-table td:last-child { font-weight:500; }
.parse-table .ok { color:var(--pink-mid); font-size:14.5px; margin-left:4px; }
.parse-table .warn { color:var(--blue-mid); }

/* ── 매칭 뷰 ── */
.m-card { border:1.5px solid var(--line); border-radius:var(--radius-md); padding:14px; margin-bottom:10px; background:var(--white); cursor:pointer; }
.m-pair { display:flex; align-items:center; gap:8px; }
.m-person { flex:1; display:flex; align-items:center; gap:8px; min-width:0; }
.m-person.right { flex-direction:row-reverse; text-align:right; }
.m-avatar { width:38px; height:38px; border-radius:50%; background:#F2F2F2; color:var(--gray); display:flex; align-items:center; justify-content:center; font-size:19px; overflow:hidden; flex-shrink:0; }
.m-avatar.f { background:var(--pink-soft); color:var(--pink-mid); }
.m-avatar img { width:100%; height:100%; object-fit:cover; }
.m-name { font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-meta { font-size:12.5px; color:var(--gray-mid); }
.m-heart { color:var(--orange); font-size:19px; flex-shrink:0; }
.m-foot { display:flex; align-items:center; justify-content:space-between; margin-top:11px; padding-top:10px; border-top:1px solid var(--gray-bg); }
.m-date { font-size:13px; color:var(--gray-mid); }
.m-memo-preview { font-size:13.5px; color:var(--gray); margin-top:var(--sp-3); background:var(--gray-bg); border-radius:10px; padding:10px 12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── 끝난 매칭 카드 ──
   진행 중인 카드와 일부러 다르게 생겼습니다. 여기서 궁금한 건 두 사람의 얼굴이 아니라
   '누가 왜 접었는지'라서, 이름은 한 줄로 눕히고 사유에 자리를 내줍니다. */
/* 끝난 매칭은 지나간 일이라, 진행 중인 카드보다 자리를 덜 차지하게 눌러 담습니다 */
.m-card.ended { background:#FCFCFC; padding:12px 13px; }
.me-top { display:flex; align-items:center; gap:10px; }
.me-names { display:flex; align-items:center; gap:8px; min-width:0; flex:1; }
.me-face {
  width:30px; height:30px; border-radius:50%; overflow:hidden; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:#F2F2F2; color:var(--gray); font-size:15px;
  filter:grayscale(1); opacity:.75;
}
.me-face.f { background:var(--pink-soft); color:var(--pink-mid); margin-left:-14px; }
.me-face img { width:100%; height:100%; object-fit:cover; }
.me-name { font-size:15px; font-weight:700; color:var(--gray); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.me-x { color:var(--gray-mid); font-weight:500; margin:0 2px; }

.me-body { margin-top:var(--sp-2); display:flex; flex-direction:column; gap:6px; }
.me-reason { background:var(--orange-soft); border-radius:10px; padding:8px 11px; }
/* 사유를 안 적은 기록은 한 줄짜리라 위아래를 더 얇게 */
.me-reason.bare { padding:6px 11px; }
.me-reason-head { font-size:13px; color:var(--cream-dark); display:flex; align-items:center; gap:6px; flex-wrap:wrap; line-height:1.5; }
.me-reason-head b { color:var(--pink-dark); font-weight:700; }
.me-stage { font-size:11px; font-weight:700; background:var(--white); color:var(--cream-dark); border-radius:20px; padding:1px 7px; }
.me-reason-text { font-size:13.5px; line-height:1.5; color:#3F3F3F; margin-top:3px; white-space:pre-wrap; }
.me-reason.none-box {
  display:flex; align-items:center; gap:6px; padding:6px 11px;
  background:var(--gray-bg); color:var(--gray-mid); font-size:12.5px;
}
.me-reason.none-box i { font-size:14px; }

.me-foot { margin-top:var(--sp-2); font-size:12px; color:var(--gray-mid); }

/* ── 설정 뷰 ── */
.set-card { border:1.5px solid var(--line); border-radius:var(--radius-md); padding:var(--sp-4) 20px; margin-bottom:var(--sp-3); }
.set-title { font-size:15.5px; font-weight:800; color:var(--pink-dark); margin-bottom:var(--sp-3); display:flex; align-items:center; gap:6px; }
.set-desc { font-size:13.5px; color:var(--gray); line-height:1.6; margin:0 0 var(--sp-3); }

/* ── 스레드 홍보 표시 ── */
.promo-tag {
  display:inline-flex; align-items:center; gap:3px;
  border-radius:20px; padding:3px 9px; font-size:11.5px; font-weight:700; flex-shrink:0;
  background:var(--blue-soft); color:var(--blue-dark);
}
.promo-tag i { font-size:12px; }
.a-photo .promo-tag { position:absolute; left:6px; bottom:6px; }
/* 스레드 아이디 — 눌러서 바로 그 사람 프로필로 */
.threads-link { color:var(--pink-dark); font-weight:700; text-decoration:none; }
.threads-link i { font-size:14px; vertical-align:-1px; opacity:.65; }
.threads-link:hover { text-decoration:underline; }

.promo-link-row { display:flex; align-items:center; gap:8px; margin-top:4px; }
.promo-link-row input { flex:1; border:1.5px solid var(--line); border-radius:10px; padding:10px 12px; font-size:16px; min-width:0; }
.promo-open {
  flex-shrink:0; display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:10px; background:var(--blue-soft); color:var(--blue-dark); font-size:17px;
}

/* ── 선택 모드 / 일괄 작업 ── */
.view-toggle.on { background:var(--pink-dark); border-color:var(--pink-dark); color:var(--white); }
.c-card .sel-tick, .a-card .sel-tick {
  position:absolute; top:10px; right:10px; width:22px; height:22px; border-radius:7px;
  border:1.5px solid var(--gray-mid); background:var(--white); color:transparent;
  font-size:14px; display:flex; align-items:center; justify-content:center; z-index:2;
}
.a-card .sel-tick { top:8px; right:8px; }
.c-card.selected, .a-card.selected { border-color:var(--pink-dark); background:#FFF3F8; }
.c-card.selected .sel-tick, .a-card.selected .sel-tick { background:var(--pink-dark); border-color:var(--pink-dark); color:var(--white); }

.bulk-bar {
  position:fixed; bottom:76px; left:50%; transform:translateX(-50%);
  width:calc(100% - 24px); max-width:496px; background:var(--ink); color:var(--white);
  border-radius:var(--radius-md); padding:10px 12px; z-index:49;
  display:flex; align-items:center; gap:8px; box-shadow:0 6px 20px rgba(0,0,0,.25);
}
.bulk-check { color:#fff; font-size:13.5px; font-weight:600; padding:7px 10px; border-radius:9px; background:rgba(255,255,255,.14); }
.bulk-count { flex:1; font-size:14px; font-weight:600; }
.bulk-btn { display:flex; align-items:center; gap:4px; font-size:13.5px; font-weight:700; padding:8px 12px; border-radius:9px; color:#fff; }
.bulk-btn i { font-size:15px; }
.bulk-btn.black { background:#555; }
.bulk-btn.danger { background:#C13515; }
.bulk-btn:disabled { opacity:.4; cursor:not-allowed; }

/* ── 하단 네비 ── */
.bottom-nav {
  position:fixed; bottom:0; left:50%; transform:translateX(-50%);
  width:100%; max-width:520px; background:var(--white);
  border-top:1px solid var(--gray-bg); display:flex; padding:8px 0 max(14px, env(safe-area-inset-bottom)); z-index:50;
}
.nav-item { flex:1; text-align:center; color:var(--gray-mid); font-size:22px; padding-top:2px; }
.nav-item p { font-size:12px; margin-top:1px; font-weight:500; }
.nav-item.active { color:var(--pink-dark); }
.nav-item.active p { font-weight:700; }
.nav-fab { flex:1; text-align:center; }
.nav-fab .fab {
  width:48px; height:48px; border-radius:50%; background:var(--orange); color:var(--white);
  display:flex; align-items:center; justify-content:center; font-size:23px; margin:-22px auto 0;
  box-shadow:0 4px 14px rgba(253,21,105,.35); transition:transform .12s;
}
.nav-fab .fab:active { transform:scale(.92); }
.nav-fab p { font-size:12px; margin-top:2px; color:var(--gray-mid); font-weight:500; }
/* 등록 화면에 있을 때도 '여기 있다'는 표시가 남아 있어야 합니다 */
.nav-fab.active p { color:var(--pink-dark); font-weight:700; }
.nav-fab.active .fab { box-shadow:0 0 0 4px var(--pink-soft), 0 4px 14px rgba(253,21,105,.35); }
.nav-ic { position:relative; display:inline-block; line-height:1; }
.nav-badge {
  position:absolute; top:-4px; right:-9px; min-width:16px; height:16px; padding:0 4px;
  border-radius:20px; background:var(--orange); color:#fff; font-size:11.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center; line-height:1;
}

/* ── 신청 관리 ── */
.app-card { border:1.5px solid var(--line); border-radius:var(--radius-md); padding:13px 14px; margin-bottom:9px; cursor:pointer; background:var(--white); }
.app-card.pending { border-color:var(--blue); background:#F7FAFE; }
.app-top { display:flex; align-items:center; gap:9px; margin-bottom:5px; }
.app-name { font-size:17px; font-weight:700; color:var(--ink); }
.app-meta { font-size:13.5px; color:var(--gray); }
.app-when { margin-left:auto; font-size:12.5px; color:var(--gray-mid); flex-shrink:0; }
.app-sub { font-size:13.5px; color:var(--gray); }
.app-thumbs { display:flex; gap:5px; margin-top:8px; }
.app-thumbs img { width:44px; height:44px; border-radius:9px; object-fit:cover; }
.badge.pending { background:var(--blue-soft); color:var(--blue-dark); }
.badge.approved { background:var(--pink-soft); color:var(--pink-dark); }
.badge.rejected { background:var(--gray-bg); color:var(--gray); }
.consent-view { display:flex; flex-wrap:wrap; gap:5px; margin:2px 0 4px; }
.consent-view span { font-size:12.5px; font-weight:600; padding:3px 8px; border-radius:20px; background:var(--pink-soft); color:var(--pink-dark); }
.consent-view span.no { background:var(--gray-bg); color:var(--gray-mid); }
.apply-url { background:var(--gray-bg); border-radius:var(--radius-sm); padding:11px 13px; font-size:14px; color:var(--ink); word-break:break-all; margin-bottom:10px; font-weight:600; }

/* ── 오래된 신청서 정리 ── */
.purge-bar { display:flex; align-items:center; gap:10px; background:var(--orange-soft); border-radius:var(--radius-md); padding:11px 13px; margin-bottom:10px; }
.purge-bar > i { font-size:21px; color:var(--cream-dark); flex-shrink:0; }
.purge-text { min-width:0; flex:1; line-height:1.35; }
.purge-text b { display:block; font-size:14.5px; font-weight:700; color:var(--blue-dark); }
.purge-text span { font-size:13px; color:var(--cream-dark); }
.purge-go { flex-shrink:0; background:var(--blue-dark); color:#fff; font-size:13.5px; font-weight:700; border-radius:20px; padding:7px 13px; }
.purge-tools { display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.purge-sel { margin-left:auto; font-size:13.5px; font-weight:700; color:var(--pink-dark); }
.purge-item { display:flex; align-items:center; gap:10px; border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px; margin-bottom:7px; cursor:pointer; background:var(--white); }
.purge-item.on { border-color:var(--orange); background:#FFF3F8; }
.purge-tick { flex-shrink:0; width:20px; height:20px; border-radius:6px; border:1.5px solid var(--gray-mid); color:transparent; font-size:13.5px; display:flex; align-items:center; justify-content:center; }
.purge-item.on .purge-tick { background:var(--orange); border-color:var(--orange); color:#fff; }
.purge-body { min-width:0; flex:1; }
.purge-name { font-size:15px; font-weight:700; color:var(--ink); }
.purge-name .badge { margin-left:5px; }
.purge-meta { font-size:13px; color:var(--gray); margin-top:1px; }
.purge-keep { font-size:12.5px; color:var(--pink-mid); font-weight:600; margin-top:2px; }

/* ── 모달 (바텀시트) ── */
.modal-bg {
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:100;
  display:flex; align-items:flex-end; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .2s;
}
.modal-bg.open { opacity:1; pointer-events:auto; }
.modal-sheet {
  width:100%; max-width:520px; background:var(--white); border-radius:26px 26px 0 0;
  max-height:92vh; overflow-y:auto;
  /* 아이폰 홈 인디케이터에 맨 아래 버튼이 가리지 않게 여백을 더 줍니다 */
  padding:10px 20px calc(34px + env(safe-area-inset-bottom));
  transform:translateY(40px); transition:transform .22s;
  overscroll-behavior-y:contain;
}
.modal-bg.open .modal-sheet { transform:translateY(0); }
.modal-sheet.dragging { transition:none; }
.sheet-handle { width:40px; height:4px; border-radius:4px; background:var(--gray-mid); margin:6px auto 14px; }

/* ── 상세 모달 ── */
/* ── 사진 캐러셀 (상세 모달) ── */
.d-gallery { position:relative; margin-bottom:14px; }
.d-track { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; border-radius:var(--radius-md); background:var(--cream); scrollbar-width:none; touch-action:pan-y pinch-zoom; }
.d-track::-webkit-scrollbar { display:none; }
.d-track img { flex:0 0 100%; width:100%; height:clamp(240px, 56vh, 390px); object-fit:cover; scroll-snap-align:center; cursor:zoom-in; user-select:none; -webkit-user-drag:none; }
.d-track.dragging { scroll-snap-type:none; }
.d-track.dragging img { cursor:grabbing; }
.gal-nav { position:absolute; top:50%; transform:translateY(-50%); width:36px; height:36px; border-radius:50%; background:rgba(0,0,0,.5); color:#fff; font-size:22px; display:flex; align-items:center; justify-content:center; z-index:2; transition:background .15s, opacity .15s; }
.gal-nav.prev { left:8px; }
.gal-nav.next { right:8px; }
.gal-nav:hover { background:rgba(0,0,0,.78); }
.gal-nav[disabled] { opacity:.22; pointer-events:none; }
.gal-count { position:absolute; top:10px; right:10px; background:rgba(0,0,0,.55); color:#fff; font-size:13px; font-weight:600; padding:3px 9px; border-radius:20px; z-index:2; }
.gal-dots { display:flex; justify-content:center; gap:6px; margin-top:9px; }
.gal-dot { width:6px; height:6px; border-radius:50%; background:var(--gray-mid); transition:all .2s; }
.gal-dot.on { width:18px; border-radius:3px; background:var(--pink-dark); }
.d-gallery.single .gal-nav,
.d-gallery.single .gal-count,
.d-gallery.single .gal-dots { display:none; }
.d-nophoto { width:100%; height:130px; border-radius:var(--radius-md); background:var(--cream); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:var(--cream-dark); font-size:14px; margin-bottom:14px; }
.d-nophoto i { font-size:30px; color:var(--orange); }
.d-head { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.d-name { font-size:22px; font-weight:800; color:var(--pink-dark); }
.d-headline { font-size:14.5px; color:var(--gray); margin-bottom:var(--sp-4); }
.d-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-bottom:var(--sp-5); }
.d-act { border-radius:var(--radius-sm); padding:10px 2px; font-size:13px; font-weight:600; background:var(--gray-bg); color:#6A6A6A; display:flex; flex-direction:column; align-items:center; gap:4px; }
.d-act i { font-size:19px; }
.d-act.accent { background:var(--cream); color:var(--cream-dark); }
.info-table { width:100%; font-size:15px; border-collapse:collapse; margin-bottom:var(--sp-2); }
.info-table td { padding:var(--sp-1) 0; vertical-align:top; }
/* 라벨 칸은 글자 폭만큼만 차지하게 해서 값 쪽에 자리를 더 줌 */
.info-table td:first-child { color:var(--gray); width:1%; white-space:nowrap; padding-right:14px; }
.info-table td:first-child i { font-size:15.5px; vertical-align:-2px; margin-right:6px; }
.info-table td:last-child { font-weight:500; line-height:1.55; }
.tag-row { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 var(--sp-4); }
.tag { border-radius:20px; padding:5px 12px; font-size:13.5px; font-weight:500; }
.tag:nth-child(3n+1){ background:var(--cream); color:var(--cream-dark); }
.tag:nth-child(3n+2){ background:var(--pink-soft); color:var(--pink-dark); }
.tag:nth-child(3n){ background:var(--blue-soft); color:var(--blue-dark); }
.ideal-card { background:var(--cream); border-radius:var(--radius-md); padding:var(--sp-4) 20px; margin:var(--sp-4) 0; }
.ideal-title { font-size:15px; font-weight:800; color:var(--cream-dark); margin-bottom:8px; }
.ideal-card .info-table td:first-child { color:#6A6A6A; }
.ideal-card .info-table td:last-child { color:#3F3F3F; }
.d-section-title { font-size:15.5px; font-weight:800; color:var(--pink-dark); margin:var(--sp-5) 0 var(--sp-2); }
.d-desc { font-size:15px; line-height:1.7; color:#3F3F3F; white-space:pre-wrap; margin-bottom:var(--sp-3); }
.d-memo { background:var(--gray-bg); border-radius:var(--radius-sm); padding:11px 13px; font-size:14.5px; color:#6A6A6A; white-space:pre-wrap; }

/* ── 상세 모달 레이아웃 ──
   내용을 네 덩어리로 나눠서, 휴대폰에서는 A(사진)→B(추천·매칭)→C(프로필)→D(관리) 순으로 쌓고
   PC에서는 왼쪽 A+C / 오른쪽 B+D 두 칸으로 펼칩니다. 추천 상대가 항상 위쪽에 보이게 하는 게 목적이에요. */
#detailBody { display:flex; flex-direction:column; }
#detailBody > .d-main, #detailBody > .d-side { display:contents; }
.d-blk-a { order:1; } .d-blk-b { order:2; } .d-blk-c { order:3; } .d-blk-d { order:4; }

/* 지금 할 일(추천 상대 · 매칭 맺기)을 눈에 띄게 감싸는 카드 */
.d-nextup { border:2px solid var(--pink); background:#FFF8FB; border-radius:var(--radius-md); padding:var(--sp-3) var(--sp-3) var(--sp-4); margin:0 0 var(--sp-4); }
/* 덩어리 맨 위에 오는 제목은 위 여백을 없앱니다 (박스 안이 위만 뜨는 것 방지) */
.d-section-title:first-child { margin-top:0; }
.d-nextup > .d-section-title:first-child { margin-top:0; }
/* 버튼 바로 뒤에 오는 제목은 충분히 띄웁니다 */
.btn + .d-section-title { margin-top:var(--sp-5); }

/* 입력칸을 block 으로 둡니다.
   inline 요소로 두면 글꼴의 baseline 때문에 아래에 4~5px 짜리 유령 여백이 붙어서,
   같은 간격을 줘도 칸마다 미묘하게 달라 보입니다. */
.f-field input, .f-field textarea, .f-field select,
.paste-area, .admin-memo-input, .tl-edit-input,
.rvm-stat-row input, .promo-link-row input, .gate-box input { display:block; }
.d-nextup .reco-item { background:var(--white); }
.d-nextup .d-desc { margin-bottom:0; }

/* ═══════════════════════════════════════
   PC에서 넓게 보기

   휴대폰에서는 모든 창이 아래에서 올라오는 바텀시트지만,
   PC에서는 화면 한가운데 뜨는 넓은 창으로 바뀝니다.
   예전에는 후보·매칭·매칭맺기 세 개만 넓어지고 신청서·후기·거절기록은
   520px 짜리 시트 그대로여서, 같은 앱 안에서 창 폭이 제각각이었습니다.
   이제 여덟 개 창이 모두 같은 규칙으로 넓어집니다.
═══════════════════════════════════════ */
@media (min-width:900px) {
  .modal-bg { align-items:center; padding:24px; }
  .modal-sheet {
    border-radius:24px; max-height:88vh; transform:none;
    padding:22px 28px 28px;
    box-shadow:0 18px 60px rgba(0,0,0,.22);
  }
  .modal-bg.open .modal-sheet { animation:sheet-pop .18s cubic-bezier(0,0,.2,1); }
  @keyframes sheet-pop { from { opacity:0; transform:translateY(8px) scale(.99); } to { opacity:1; transform:none; } }

  /* 창마다 담는 내용의 양이 달라서 폭도 따로 줍니다 */
  #detailModal .modal-sheet      { max-width:1080px; }
  #createMatchModal .modal-sheet { max-width:920px;  }
  #appModal .modal-sheet         { max-width:940px;  }
  #reviewModal .modal-sheet      { max-width:960px;  }
  #matchModal .modal-sheet       { max-width:720px;  }
  #purgeModal .modal-sheet       { max-width:760px;  }
  #rejectModal .modal-sheet      { max-width:720px;  }
  #confirmModal .modal-sheet     { max-width:440px;  }

  /* PC에서는 아래로 끌어내려 닫는 손잡이가 필요 없음 */
  .sheet-handle { display:none; }

  /* 후보 상세: 왼쪽 사진+프로필 / 오른쪽 할 일+관리 */
  #detailBody { flex-direction:row; align-items:flex-start; gap:32px; }
  #detailBody > .d-main { display:block; flex:1 1 0; min-width:0; }
  #detailBody > .d-side { display:block; flex:0 0 360px; min-width:0; }
  #detailBody .d-track img { height:clamp(240px, 46vh, 380px); }

  /* 신청서 상세도 같은 방식으로 두 칸 */
  #appBody { display:flex; flex-direction:row; align-items:flex-start; gap:32px; }
  #appBody > .a-main { flex:1 1 0; min-width:0; }
  #appBody > .a-side { flex:0 0 320px; min-width:0; }
  #appBody .d-track img { height:clamp(240px, 42vh, 340px); }

  /* 후기 관리: 왼쪽에서 올리고 오른쪽에서 확인 */
  #reviewBody { display:flex; flex-direction:row; align-items:flex-start; gap:28px; }
  #reviewBody > .rv-left  { flex:0 0 380px; min-width:0; }
  #reviewBody > .rv-right { flex:1 1 0; min-width:0; }
  #reviewBody > .rv-right > .d-section-title:first-child { margin-top:0; }

  /* 매칭 맺기 · 거절 기록: 목록을 길게 보여줘서 스크롤을 줄임 */
  #createMatchModal .pick-list { max-height:52vh; }
  #rejectModal .pick-list { max-height:40vh; }

  /* 정리할 신청서가 많을 때 한눈에 */
  #purgeList { max-height:52vh; overflow-y:auto; }
}

/* 큰 모니터에서는 한 번 더 시원하게 */
@media (min-width:1360px) {
  #detailModal .modal-sheet      { max-width:1240px; }
  #createMatchModal .modal-sheet { max-width:1040px; }
  #appModal .modal-sheet         { max-width:1040px; }
  #reviewModal .modal-sheet      { max-width:1100px; }
  #detailBody > .d-side { flex:0 0 400px; }
  #detailBody .d-actions { grid-template-columns:repeat(4, minmax(0,1fr)); }
  /* 넓어진 만큼 후기 목록은 두 줄로 흘려보냅니다 */
  #reviewBody > .rv-right #rvList { display:grid; grid-template-columns:1fr 1fr; gap:0 10px; align-content:start; }
  #reviewBody > .rv-right #rvList .rvm-item.editing { grid-column:1/-1; }
}

/* ── 후기 관리 ── */
/* 숫자 스트립 — 평소엔 요약 한 줄만 보여서 공간을 덜 차지하게 함 */
.rvm-stats-toggle {
  display:flex; align-items:center; gap:8px; width:100%;
  border:1.5px solid var(--line); border-radius:var(--radius-md);
  padding:12px 14px; margin-bottom:10px; background:var(--white); text-align:left;
}
.rvm-stats-toggle > i:first-child { font-size:17px; color:var(--pink-dark); flex-shrink:0; }
.rvm-stats-toggle span { flex:1; min-width:0; font-size:13.5px; font-weight:600; color:var(--gray); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rvm-caret { flex-shrink:0; font-size:17px; color:var(--gray-mid); transition:transform .15s; }
.rvm-stats-toggle.open .rvm-caret { transform:rotate(180deg); }

/* '누구인지 · 날짜' 선택 항목 펼치기 */
.rvm-more-toggle { display:inline-flex; align-items:center; gap:5px; font-size:13.5px; font-weight:600; color:var(--gray); padding:6px 2px; }
.rvm-more-toggle i { font-size:14px; }

.rvm-box { border:1.5px solid var(--line); border-radius:var(--radius-md); padding:var(--sp-4) 20px; margin-bottom:var(--sp-4); }
.rvm-stat-grid { display:flex; flex-direction:column; gap:7px; }
.rvm-stat-row { display:flex; gap:7px; }
.rvm-stat-row input { border:1.5px solid var(--line); border-radius:10px; padding:10px 11px; font-size:16px; min-width:0; background:var(--white); }
.rvm-stat-num { flex:0 0 84px; text-align:center; font-weight:700; }
.rvm-stat-label { flex:1; }

/* 캡처 고르는 자리 */
.rvm-drop {
  border:1.5px dashed var(--gray-mid); border-radius:var(--radius-md); background:var(--gray-bg);
  min-height:150px; display:flex; align-items:center; justify-content:center;
  cursor:pointer; overflow:hidden; padding:10px; transition:border-color .15s, background .15s;
}
.rvm-drop:hover { border-color:var(--pink-dark); background:#FFF8FB; }
.rvm-drop #rvDropHint { display:flex; flex-direction:column; align-items:center; gap:6px; color:var(--gray); font-size:14px; }
.rvm-drop #rvDropHint i { font-size:30px; color:var(--pink-dark); }
.rvm-drop img { max-width:100%; max-height:280px; border-radius:var(--radius-sm); display:block; }

/* 올린 후기 한 줄 */
.rvm-item { display:flex; gap:11px; border:1.5px solid var(--line); border-radius:var(--radius-md); padding:11px; margin-bottom:8px; background:var(--white); }
.rvm-item.off { background:var(--gray-bg); opacity:.72; }
.rvm-item.editing { border-color:var(--pink-dark); background:#FFF8FB; }
.rvm-thumb { width:64px; height:84px; flex-shrink:0; border-radius:10px; object-fit:cover; background:var(--gray-bg); cursor:zoom-in; }
.rvm-body { flex:1; min-width:0; }
.rvm-head { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:4px; }
/* 네 단계 모두 눈에 띄게 — 옅은 색은 화면 캡처·사진으로 보면 아예 안 보일 수 있어서 진하게 씀.
   수식 클래스에 rvm- 을 붙여, 다른 곳의 흔한 클래스 이름과 겹치지 않게 합니다. */
.rvm-stage { font-size:11.5px; font-weight:700; border-radius:20px; padding:2px 8px; background:var(--gray-bg); color:var(--gray); }
.rvm-stage.rvm-success { background:var(--pink-dark); color:var(--white); }
.rvm-stage.rvm-meet { background:var(--ink); color:var(--white); }
.rvm-stage.rvm-progress { background:#6A6A6A; color:var(--white); }
.rvm-stage.rvm-etc { background:var(--white); color:var(--gray); border:1.5px solid var(--gray-mid); }
.rvm-who { font-size:13px; color:var(--gray); }
.rvm-date { margin-left:auto; font-size:12.5px; color:var(--gray-mid); }
.rvm-note { font-size:14px; color:#3F3F3F; line-height:1.5; margin-bottom:8px; }
.rvm-tools { display:flex; gap:5px; flex-wrap:wrap; }
.rvm-btn {
  display:flex; align-items:center; gap:3px; min-height:34px;
  font-size:12.5px; font-weight:600; color:var(--gray);
  background:var(--gray-bg); border-radius:8px; padding:5px 10px;
}
.rvm-btn i { font-size:14.5px; }
.rvm-btn:disabled { opacity:.35; cursor:not-allowed; }
.rvm-btn.danger { background:#FDECE7; color:#C13515; }

/* ── 지나온 길 (뒤로가기) ──
   후보 → 거절 기록 → 다른 후보처럼 타고 들어갔을 때, 상세 모달 맨 위에 붙습니다.
   ← 를 누르면 한 칸 뒤로, 이름을 누르면 그 지점으로 한 번에 돌아갑니다. */
.trail {
  display:flex; align-items:center; gap:8px;
  background:var(--gray-bg); border-radius:var(--radius-sm);
  padding:6px 10px 6px 6px; margin-bottom:12px;
}
.trail-back {
  flex-shrink:0; width:32px; height:32px; border-radius:9px;
  background:var(--white); color:var(--pink-dark); font-size:18px;
  display:flex; align-items:center; justify-content:center; border:1.5px solid var(--line);
}
.trail-back:active { transform:scale(.92); }
.trail-path {
  flex:1; min-width:0; display:flex; align-items:center; gap:4px;
  overflow-x:auto; white-space:nowrap; scrollbar-width:none;
}
.trail-path::-webkit-scrollbar { display:none; }
.trail-item {
  flex-shrink:0; font-size:13px; font-weight:700; color:var(--pink-dark);
  background:var(--white); border:1.5px solid var(--line);
  border-radius:20px; padding:3px 11px; max-width:150px;
  overflow:hidden; text-overflow:ellipsis;
}
.trail-item:active { background:var(--pink-soft); }
.trail-sep { flex-shrink:0; font-size:13px; color:var(--gray-mid); }
.trail-now { flex-shrink:0; font-size:12.5px; font-weight:600; color:var(--gray-mid); padding-right:2px; }

/* ── 매칭 상세 ── */
.status-steps { display:flex; gap:6px; margin:var(--sp-4) 0; }

/* 매칭 상세 위쪽의 두 사람 카드 — 얼굴이나 이름을 누르면 프로필이 열립니다 */
.m-pair.big { gap:10px; margin-bottom:4px; align-items:stretch; }
.m-pair.big .m-person {
  flex:1; min-width:0; flex-direction:column; justify-content:flex-start; gap:8px;
  text-align:center; padding:16px 10px 14px;
  border:1.5px solid var(--line); border-radius:var(--radius-md); background:var(--white);
  transition:border-color .15s, background .15s, transform .12s;
}
.m-pair.big .m-person:not([disabled]):hover { border-color:var(--pink); background:#FFF8FB; }
.m-pair.big .m-person:not([disabled]):active { transform:scale(.97); }
.m-pair.big .m-person[disabled] { opacity:.5; cursor:default; }
.m-pair.big .m-heart { align-self:center; font-size:24px; }
.m-pair.big .m-avatar { width:96px; height:96px; font-size:42px; }
.m-pair.big .m-person-body { min-width:0; width:100%; }
.m-pair.big .m-name { font-size:18px; }
/* 좁은 화면에서는 '99년생 · 호텔리어 · 경북'이 잘리지 않게 두 줄로 흘려보냄 */
.m-pair.big .m-meta { font-size:13px; white-space:normal; line-height:1.4; }
.m-tap-hint {
  display:inline-flex; align-items:center; gap:3px; margin-top:8px;
  font-size:12px; font-weight:700; color:var(--pink-dark);
  background:var(--pink-soft); border-radius:20px; padding:3px 10px;
}
.m-tap-hint i { font-size:13px; }
@media (min-width:900px) {
  .m-pair.big .m-avatar { width:112px; height:112px; font-size:48px; }
}
.step { flex:1; text-align:center; border-radius:var(--radius-sm); padding:10px 2px; font-size:13.5px; font-weight:600; background:var(--gray-bg); color:var(--gray); border:2px solid transparent; }
.step.on.exchanging { background:var(--blue); color:var(--blue-dark); }
.step.on.some { background:var(--orange); color:var(--white); }
.step.on.success { background:var(--ink); color:var(--white); }
.step.on.ended { background:#6A6A6A; color:var(--white); }

/* ── 매칭 맺기 ── */
.pick-cols { display:flex; gap:10px; margin-bottom:14px; }
.pick-col { flex:1; min-width:0; }
.pick-label { font-size:14px; font-weight:700; margin-bottom:6px; text-align:center; }
.pick-label.m { color:var(--ink); }
.pick-label.f { color:var(--pink-mid); }
.pick-list { border:1.5px solid var(--line); border-radius:var(--radius-sm); max-height:230px; overflow-y:auto; }
.pick-item { padding:11px; min-height:46px; font-size:14.5px; border-bottom:1px solid var(--gray-bg); cursor:pointer; }
.pick-item:last-child { border-bottom:none; }
.pick-item .sub { font-size:12.5px; color:var(--gray-mid); display:block; }
.pick-item.sel { background:#F2F2F2; font-weight:700; }
.pick-item.sel.f-side { background:var(--pink-soft); }

/* ── 거절 기록 ── */
.rej-who { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.rej-who-btn { border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:11px 8px; font-size:14.5px; font-weight:600; color:#6A6A6A; background:var(--white); text-align:center; line-height:1.35; }
.rej-who-btn .sub { display:block; font-size:12px; font-weight:500; color:var(--gray-mid); margin-top:2px; }
.rej-who-btn.on { border-color:var(--orange); background:var(--orange-soft); color:var(--cream-dark); }
.rej-item { display:flex; align-items:center; gap:9px; padding:11px; border:1.5px solid var(--line); border-radius:var(--radius-sm); margin-bottom:var(--sp-2); cursor:pointer; background:var(--white); }
.rej-item .rej-name { font-size:15px; font-weight:700; color:var(--ink); flex-shrink:0; }
.rej-item .rej-meta { font-size:12.5px; color:var(--gray-mid); }
.rej-item .rej-reason { font-size:13px; color:var(--gray); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rej-item .rej-body { min-width:0; flex:1; }
.rej-del { width:32px; height:32px; border-radius:50%; background:var(--gray-bg); color:var(--gray-mid); font-size:14.5px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.rej-dir { font-size:11.5px; font-weight:700; padding:2px 7px; border-radius:20px; flex-shrink:0; }
.rej-dir.out { background:var(--orange-soft); color:var(--cream-dark); }
.rej-dir.in { background:var(--gray-bg); color:var(--gray); }
.rej-warn { display:flex; align-items:flex-start; gap:7px; background:var(--orange-soft); color:var(--cream-dark); border-radius:var(--radius-sm); padding:10px 12px; font-size:14px; line-height:1.5; margin-bottom:10px; }
.rej-warn i { font-size:17px; flex-shrink:0; margin-top:1px; }
.pick-item .rej-tag { display:inline-block; font-size:11.5px; font-weight:700; color:#C13515; background:#FDECE7; padding:1px 6px; border-radius:20px; margin-left:4px; }
/* 반대편에서 고른 사람과의 궁합 표시 */
.pick-item .fit-tag { display:inline-block; font-size:11.5px; font-weight:700; padding:1px 6px; border-radius:20px; margin-left:4px; }
.pick-item .fit-tag.best { background:var(--pink-dark); color:var(--white); }
.pick-item .fit-tag.ok { background:var(--pink-soft); color:var(--pink-dark); }
.pick-item .fit-tag.bad { background:var(--gray-bg); color:var(--gray-mid); }

/* ── 매칭 타임라인 ── */
.tl { margin:var(--sp-2) 0 0; padding-left:4px; }
.tl-item { display:flex; align-items:flex-start; gap:11px; position:relative; padding-bottom:var(--sp-3); }
.tl-item:last-child { padding-bottom:2px; }
.tl-item:not(:last-child)::before { content:''; position:absolute; left:4px; top:15px; bottom:0; width:1.5px; background:var(--line); }
.tl-dot { width:9px; height:9px; border-radius:50%; background:var(--pink); margin-top:5px; flex-shrink:0; position:relative; z-index:1; }
.tl-dot.exchanging { background:var(--blue); }
.tl-dot.some { background:var(--orange); }
.tl-dot.success { background:var(--ink); }
.tl-dot.ended { background:var(--gray-mid); }
.tl-body { min-width:0; flex:1; }
.tl-date { font-size:12.5px; color:var(--gray-mid); }
.tl-text { font-size:14px; color:#6A6A6A; white-space:pre-wrap; line-height:1.5; }

/* 기록 고치기 · 지우기 — 평소에는 옅게 있다가, 그 줄에 손이 가면 또렷해집니다 */
.tl-tools { display:flex; gap:4px; flex-shrink:0; opacity:.35; transition:opacity .15s; }
.tl-item:hover .tl-tools, .tl-tools:focus-within { opacity:1; }
@media (pointer:coarse) { .tl-tools { opacity:.7; } }
.tl-btn {
  width:32px; height:32px; border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  background:var(--gray-bg); color:var(--gray); font-size:15px;
}
.tl-btn.danger:hover { background:#FDECE7; color:#C13515; }
.tl-note { margin:var(--sp-2) 0 0; font-size:12.5px; }
.tl-edit { margin-top:var(--sp-2); }
.tl-edit-input {
  width:100%; min-height:64px; resize:vertical; line-height:1.6;
  border:1.5px solid var(--pink-dark); border-radius:10px; padding:10px 11px;
  font-size:16px; background:var(--white); margin-bottom:var(--sp-2);
}

/* ── 추천 상대 ──
   접혀 있을 때(3명)는 그냥 쌓이고, [더 보기]로 펼치면 목록 안에서 스크롤됩니다.
   접힌 상태까지 스크롤 상자로 만들면, 세 줄짜리 목록 위에서 손가락이 헛돌아요. */
/* 지역 때문에 빠진 사람이 있으면 알려줍니다.
   말없이 빼버리면 '왜 저 사람이 안 보이지?' 하고 헤매게 돼요. */
.reco-dropped {
  display:flex; align-items:center; gap:5px;
  font-size:12.5px; color:var(--gray-mid); margin:0 0 var(--sp-2);
}
.reco-dropped i { font-size:14px; }
.reco-none { font-size:14px; color:var(--gray); line-height:1.6; margin:0; }
.reco-none b { color:var(--pink-dark); font-weight:700; }

.reco-list { display:flex; flex-direction:column; gap:6px; }
/* 이름 줄은 한 줄로 붙잡아 둡니다. 지역까지 길어지면 줄이 늘어나 카드가 들쭉날쭉해져요 */
.reco-name { font-size:14.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reco-name .c-meta { font-size:12.5px; }
.reco-list.scroll {
  max-height:min(46vh, 380px);
  overflow-y:auto;
  overscroll-behavior:contain;      /* 끝에 닿아도 뒤 화면이 따라 움직이지 않게 */
  padding-right:4px;
  -webkit-overflow-scrolling:touch;
  /* 위아래로 더 있다는 걸 옅은 그림자로 알려줍니다 */
  background:
    linear-gradient(var(--white) 30%, rgba(255,255,255,0)) top / 100% 24px no-repeat,
    linear-gradient(rgba(255,255,255,0), var(--white) 70%) bottom / 100% 24px no-repeat,
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.10), rgba(0,0,0,0)) top / 100% 8px no-repeat,
    radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.10), rgba(0,0,0,0)) bottom / 100% 8px no-repeat;
  background-attachment:local, local, scroll, scroll;
}
.reco-item { display:flex; align-items:center; gap:9px; border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:9px 10px; cursor:pointer; background:var(--white); }
.reco-item:active { border-color:var(--pink); }
/* 추천 목록 안에서는 얼굴을 조금 작게 — 한 화면에 더 많이 보이게 */
.reco-item .c-avatar { width:38px; height:38px; font-size:19px; }
.reco-tags { display:flex; flex-wrap:wrap; gap:3px; margin-top:3px; }
.reco-tag { font-size:11.5px; background:var(--pink-soft); color:var(--pink-dark); border-radius:8px; padding:1px 7px; font-weight:600; line-height:1.55; }
.reco-tag.bad { background:#FDECE7; color:#C13515; }
/* 추천 상대 더 보기 / 접기 */
.reco-more {
  display:flex; align-items:center; justify-content:center; gap:5px;
  width:100%; min-height:42px; margin-top:var(--sp-1);
  border:1.5px dashed var(--line); border-radius:var(--radius-md);
  background:var(--white); color:var(--gray); font-size:13.5px; font-weight:700;
}
.reco-more:hover { border-color:var(--pink); color:var(--pink-dark); }
.reco-more i { font-size:16px; }

/* ── 후보 매칭 기록 ── */
.cand-hist { display:flex; align-items:center; gap:8px; border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:11px 12px; margin-bottom:var(--sp-2); cursor:pointer; font-size:14.5px; }
.cand-hist:active { border-color:var(--pink); }
.cand-hist-name { font-weight:700; }
.cand-hist-date { margin-left:auto; font-size:12.5px; color:var(--gray-mid); flex-shrink:0; }

/* ── 관리자 메모 ── */
.admin-memo-input { width:100%; border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:11px 13px; font-size:16px; min-height:76px; resize:vertical; line-height:1.6; background:#FFFFFF; }

/* ═══════════════════════════════════════
   확인 창 (브라우저 기본 confirm 대신 쓰는 바텀시트)

   삭제·블랙리스트·매칭 종료처럼 되돌리기 어려운 순간에 뜹니다.
   예전에는 브라우저 기본 팝업이라 앱 분위기와 따로 놀았고,
   줄바꿈이 섞인 긴 문장이 그대로 노출됐습니다.
═══════════════════════════════════════ */
#confirmModal { z-index:150; }              /* 다른 모달 위에 떠야 함 */
#confirmModal .modal-sheet { max-width:460px; padding-top:22px; }
.cf-title { font-size:19px; font-weight:800; color:var(--ink); margin-bottom:8px; }
.cf-desc { font-size:15px; line-height:1.65; color:#3F3F3F; white-space:pre-wrap; }
.cf-list {
  background:var(--gray-bg); border-radius:var(--radius-sm);
  padding:11px 13px; margin-top:10px;
  font-size:14px; line-height:1.6; color:#3F3F3F; white-space:pre-wrap;
  max-height:180px; overflow-y:auto;
}
.cf-warn { display:flex; gap:7px; align-items:flex-start; margin-top:12px; font-size:13.5px; color:#C13515; font-weight:600; line-height:1.5; }
.cf-warn i { font-size:16px; flex-shrink:0; margin-top:1px; }
.cf-actions { display:flex; gap:8px; margin-top:20px; }
.cf-actions .btn { flex:1; }

/* ── 토스트 ── */
#toast {
  position:fixed; bottom:104px; left:50%; transform:translateX(-50%) translateY(16px);
  background:var(--pink-dark); color:var(--white); border-radius:14px; padding:11px 20px;
  font-size:15px; font-weight:600; z-index:300; opacity:0; pointer-events:none;
  transition:all .25s; max-width:86%; text-align:center;
}
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── 사진 라이트박스 ── */
#lightbox { position:fixed; inset:0; background:rgba(0,0,0,.92); z-index:200; display:none; align-items:center; justify-content:center; }
#lightbox.open { display:flex; }
.lb-stage { display:flex; align-items:center; justify-content:center; padding:58px 14px 66px; max-width:100%; max-height:100%; }
#lightbox img { max-width:min(94vw, 900px); max-height:76vh; border-radius:8px; user-select:none; -webkit-user-drag:none; }
.lb-nav { position:absolute; top:50%; transform:translateY(-50%); width:48px; height:48px; border-radius:50%; background:rgba(255,255,255,.14); color:#fff; font-size:26px; display:flex; align-items:center; justify-content:center; z-index:2; transition:background .15s, opacity .15s; }
.lb-nav.prev { left:14px; }
.lb-nav.next { right:14px; }
.lb-nav:hover { background:rgba(255,255,255,.3); }
.lb-nav[disabled] { opacity:.18; pointer-events:none; }
.lb-close { position:absolute; top:14px; right:14px; width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.14); color:#fff; font-size:22px; display:flex; align-items:center; justify-content:center; z-index:3; }
.lb-close:hover { background:rgba(255,255,255,.3); }
.lb-count { position:absolute; top:24px; left:50%; transform:translateX(-50%); color:#fff; font-size:14.5px; font-weight:600; z-index:3; }
.lb-dots { position:absolute; bottom:28px; left:50%; transform:translateX(-50%); display:flex; gap:7px; z-index:3; }
.lb-dot { width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.35); transition:all .2s; }
.lb-dot.on { width:20px; border-radius:4px; background:#fff; }
.lb-hint { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); color:rgba(255,255,255,.38); font-size:12.5px; z-index:3; }
#lightbox.single .lb-nav,
#lightbox.single .lb-count,
#lightbox.single .lb-dots,
#lightbox.single .lb-hint { display:none; }
@media (pointer:coarse) {
  .lb-hint { display:none; }
  .lb-nav { width:40px; height:40px; font-size:24px; }
}

/* ── 로그인 게이트 ── */
#gate { position:fixed; inset:0; background:var(--white); z-index:400; display:flex; align-items:center; justify-content:center; }
.gate-box { text-align:center; padding:30px; width:100%; max-width:340px; }
.gate-title { font-size:26px; font-weight:800; color:var(--pink-dark); margin:14px 0 3px; }
.gate-sub { font-size:14.5px; color:var(--cream-dark); margin-bottom:22px; }
.gate-box input { width:100%; border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:13px 15px; font-size:17px; text-align:center; margin-bottom:10px; background:var(--white); }
/* 세션을 확인하는 아주 짧은 순간에 로그인 상자가 번쩍이지 않게, 확인이 끝나면 켭니다 */
#gate.checking .gate-box { visibility:hidden; }
.gate-pw { position:relative; }
.gate-pw input { margin-bottom:0; padding-right:46px; }
.gate-pw-toggle {
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:10px; color:var(--gray);
  font-size:19px; display:flex; align-items:center; justify-content:center;
}

/* 스크롤바 — 휴대폰에서는 숨기고, 마우스를 쓰는 화면에서는 보여줍니다.
   전부 숨겨두면 PC에서 긴 창에 스크롤이 더 있는지 알 수가 없습니다. */
::-webkit-scrollbar { width:0; height:0; }
@media (pointer:fine) {
  .modal-sheet::-webkit-scrollbar, .pick-list::-webkit-scrollbar,
  #purgeList::-webkit-scrollbar, .cf-list::-webkit-scrollbar { width:10px; height:10px; }
  .modal-sheet::-webkit-scrollbar-thumb, .pick-list::-webkit-scrollbar-thumb,
  #purgeList::-webkit-scrollbar-thumb, .cf-list::-webkit-scrollbar-thumb {
    background:#D6D6D6; border-radius:8px; border:3px solid var(--white);
  }
  .modal-sheet::-webkit-scrollbar-thumb:hover, .pick-list::-webkit-scrollbar-thumb:hover,
  #purgeList::-webkit-scrollbar-thumb:hover { background:#BDBDBD; }
}