/* 소개팅 (/match — templates/match.html · static/js/match.js)
   사장님 디자인 규칙: 색은 #1a1a1a(바탕) · #2b2b2e(면) · #FFA178(강조)만, 각진 모서리(프로필 사진만 원형),
   그라데이션·빛·반투명 흐림·세로 강조 바·영문 대문자 라벨 없음. 글자는 흰색과 그 투명도만.
   테마와 상관없이 이 화면은 어두운 바탕 그대로 (3D 화면과 같음). */

.match-body { background: #1a1a1a; color: #fff; overflow: hidden; overscroll-behavior: none; }

.mt-header.ds-header { background: #1a1a1a; border-bottom: 1px solid #2b2b2e; }
.mt-header .ds-header-title, .mt-header .ds-icon-btn { color: #fff; }
.mt-header .ds-icon-btn { border-radius: 0; }
.mt-header .ds-icon-btn:hover { background: #2b2b2e; }
.mt-header .ds-icon-btn:disabled { opacity: .3; cursor: default; background: transparent; }
.mt-count { font-size: 12px; color: rgba(255, 255, 255, .45); font-variant-numeric: tabular-nums; white-space: nowrap; }

.mt-page {
  position: fixed;
  top: var(--nav-total);
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 37.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 10px;
  box-sizing: border-box;
}

/* ---------- 나 · 상대 ---------- */
.mt-bar { display: flex; gap: 6px; height: 38px; flex: none; }
.mt-persona {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #2b2b2e;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mt-persona-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-persona-sex { flex: none; font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, .55); }
.mt-persona-sex[hidden] { display: none; }
.mt-caret { flex: none; margin-left: auto; color: #FFA178; }

.mt-want { flex: none; display: flex; background: #2b2b2e; }
.mt-want-btn {
  min-width: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, .6);
  font-size: 13px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.mt-want-btn.is-active { background: #FFA178; color: #1a1a1a; font-weight: 700; }

.mt-hint { flex: none; margin: 0; font-size: 12px; line-height: 1.4; color: rgba(255, 255, 255, .45); }
.mt-hint[hidden] { display: none; }

/* ---------- 카드 ---------- */
.mt-stage { position: relative; flex: 1 1 auto; min-height: 0; }

.mt-card {
  position: absolute;
  inset: 0;
  background: #2b2b2e;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transform-origin: 50% 120%;
  transition: transform .42s cubic-bezier(.2, .9, .25, 1.06), opacity .3s ease;
}
.mt-card.is-dragging { transition: none; cursor: grabbing; }
/* 뒤 카드: 아래로 조금, 위 카드를 끄는 만큼 올라옴 (match.js --lift 0~1) */
.mt-card.is-next {
  --lift: 0;
  transform: translateY(calc(10px * (1 - var(--lift))));
  opacity: calc(.4 + .6 * var(--lift));
  pointer-events: none;
}
.mt-card.is-next.is-following { transition: none; }
.mt-card.is-entering { transform: translateY(16px); opacity: 0; }

.mt-card-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.mt-card-scroll::-webkit-scrollbar { display: none; }

.mt-photo { position: relative; height: calc(100% - 112px); min-height: 260px; background: #1a1a1a; }
.mt-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  pointer-events: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.mt-photo img.is-loaded { opacity: 1; }
.mt-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }

/* 사진 아래 첫 줄 (스크롤 전에도 보임) */
.mt-head { height: 112px; box-sizing: border-box; padding: 14px 16px 0; overflow: hidden; }  /* 카드 첫 화면은 사진 + 이 줄까지, 소개는 스크롤해서 */
.mt-card .mt-name { margin: 0; display: flex; align-items: baseline; gap: 8px; color: #fff; font-size: 21px; font-weight: 700; line-height: 1.25; }
.mt-card .mt-age { color: #FFA178; font-size: 16px; font-weight: 700; }
.mt-card .mt-job { margin: 4px 0 0; color: rgba(255, 255, 255, .55); font-size: 13px; }
.mt-card .mt-teaser {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-body { padding: 20px 16px 24px; display: flex; flex-direction: column; gap: 22px; }
.mt-card .mt-section-title { margin: 0 0 8px; color: #FFA178; font-size: 13px; font-weight: 700; }
.mt-card .mt-intro { margin: 0; color: #fff; font-size: 14px; line-height: 1.7; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.mt-card .mt-situation { margin: 0; color: rgba(255, 255, 255, .62); font-size: 14px; line-height: 1.7; font-style: italic; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.mt-card .mt-line { margin: 12px 0 0; padding: 12px 14px; background: #1a1a1a; color: #fff; font-size: 14px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.mt-line-who { display: block; margin-bottom: 4px; color: #FFA178; font-size: 12px; font-weight: 700; }
.mt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-card .mt-tag { padding: 6px 8px; background: #1a1a1a; color: rgba(255, 255, 255, .75); font-size: 12px; line-height: 1; }
.mt-card .mt-profile-link { align-self: flex-start; color: #FFA178; font-size: 13px; font-weight: 700; text-decoration: none; }

/* 카드를 끄는 동안 해당 버튼이 강조색으로 */
.mt-btn--pass.is-hot { background: #FFA178; color: #1a1a1a; }
.mt-btn--like.is-hot { background: #FFA178; color: #1a1a1a; }

/* 불러오는 중 · 빈 화면 */
.mt-skeleton { position: absolute; inset: 0; background: #2b2b2e; }
.mt-skeleton span { position: absolute; left: 16px; background: #1a1a1a; animation: mt-pulse 1.4s ease-in-out infinite; }
.mt-skeleton .mt-skeleton-photo { left: 0; top: 0; right: 0; bottom: 112px; }
.mt-skeleton .mt-skeleton-line { bottom: 70px; height: 20px; width: 46%; }
.mt-skeleton .mt-skeleton-line.short { bottom: 42px; height: 14px; width: 30%; }
@keyframes mt-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.mt-stage[aria-busy="false"] .mt-skeleton { display: none; }

.mt-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: #2b2b2e; text-align: center; }
.mt-empty[hidden] { display: none; }
.mt-empty-title { margin: 0; color: #fff; font-size: 16px; font-weight: 700; }
.mt-empty-desc { margin: 0 0 10px; color: rgba(255, 255, 255, .55); font-size: 13px; }

/* ---------- 버튼 ---------- */
.mt-actions { flex: none; display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 6px; }
.mt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: #2b2b2e;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.mt-btn:active { transform: scale(.97); }
.mt-btn:disabled, .mt-btn.is-disabled { opacity: .35; pointer-events: none; }
.mt-btn--like svg { color: #FFA178; }
.mt-btn--like.is-hot svg { color: #1a1a1a; }
.mt-btn--chat { background: #FFA178; color: #1a1a1a; }
.mt-btn--block { display: flex; width: 100%; }

/* ---------- 찜했어요 ---------- */
.mt-matched { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; background: #1a1a1a; opacity: 0; transition: opacity .25s ease; }
.mt-matched[hidden] { display: none; }
.mt-matched.is-open { opacity: 1; }
.mt-matched-inner { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mt-matched-pics { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.mt-matched-pics img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 50%; /* 프로필 사진만 원형 */
  border: 3px solid #2b2b2e;
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.12), opacity .35s ease;
  opacity: 0;
}
.mt-matched-me { transform: translateX(-40px); }
.mt-matched-char { transform: translateX(40px); }
.mt-matched.is-open .mt-matched-pics img { opacity: 1; transform: none; }
.mt-matched.is-open .mt-matched-char { transition-delay: .06s; border-color: #FFA178; }
.mt-matched-heart { color: #FFA178; transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1) .3s; }
.mt-matched.is-open .mt-matched-heart { transform: scale(1); }
.mt-matched .mt-matched-title { margin: 0; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.4; word-break: keep-all; }
.mt-matched .mt-matched-scene {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .6);
  font-size: 13px;
  line-height: 1.6;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mt-matched-scene:empty { display: none; }
.mt-matched-inner > :not(.mt-matched-pics) { transform: translateY(8px); opacity: 0; transition: transform .35s ease .15s, opacity .35s ease .15s; }
.mt-matched.is-open .mt-matched-inner > :not(.mt-matched-pics) { transform: none; opacity: 1; }

/* ---------- 페르소나 고르기 ---------- */
.mt-sheet-overlay { position: fixed; inset: 0; z-index: 1100; background: #1a1a1a; opacity: 0; transition: opacity .22s ease; }
.mt-sheet-overlay.is-open { opacity: .7; }
.mt-sheet-overlay[hidden], .mt-sheet[hidden] { display: none; }
.mt-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1101;
  width: 100%;
  max-width: 37.5rem;
  max-height: 70vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  background: #2b2b2e;
  transform: translate(-50%, 100%);
  transition: transform .3s cubic-bezier(.2, .9, .25, 1);
}
.mt-sheet.is-open { transform: translate(-50%, 0); }
.mt-sheet .mt-sheet-title { margin: 0; color: #fff; font-size: 16px; font-weight: 700; }
.mt-sheet .mt-sheet-desc { margin: 4px 0 14px; color: rgba(255, 255, 255, .5); font-size: 12px; }
.mt-sheet-list { display: flex; flex-direction: column; gap: 4px; }
.mt-sheet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 0;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.mt-sheet-item.is-active { background: #FFA178; color: #1a1a1a; font-weight: 700; }
.mt-sheet-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-sheet-item-sex { flex: none; font-size: 12px; opacity: .7; }
.mt-sheet .mt-sheet-manage { display: inline-block; margin-top: 14px; color: #FFA178; font-size: 13px; font-weight: 700; text-decoration: none; }

@media (max-height: 660px) {
  .mt-photo { height: calc(100% - 112px); min-height: 200px; }
  .mt-btn { height: 46px; }
}
