/*
  홈의 '입맛 궁합' — 방문자가 입맛 네 가지를 고르면 샘플 공개 지도마다 궁합 % 가 붙고
  궁합 높은 순으로 다시 줄을 선다. 질문·지도 카드는 taste-match.js 가 그린다.
  궁합 스티커(겹친 두 하트)는 앱 TasteMatchSticker 와 같은 색·모양이라 다크 모드에서도 그대로 둔다.
*/

.taste-match .tm-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ── 왼쪽: 입맛 질문 ─────────────────────────────────── */

.tm-questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tm-q-label {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.tm-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tm-opt {
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.tm-opt:hover { border-color: var(--brand); }
.tm-opt:active { transform: scale(0.97); }

.tm-opt:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.tm-opt[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tm-hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ── 오른쪽: 앱의 '나랑 입맛 맞는 새로운 지도' 줄 ──────── */

.tm-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tm-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
}

.tm-status {
  min-height: 1.6em; /* 문구가 바뀌어도 아래 목록이 들썩이지 않게 */
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.tm-maps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-map {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-alt);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}

/* 궁합이 추천 기준(50%) 아래인 지도 — 앱에서는 이 줄에 안 나온다 */
.tm-map.is-below { opacity: 0.45; }

.tm-photo {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.tm-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.tm-owner {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.tm-owner img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.tm-verdict {
  min-height: 1.5em;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
}

.tm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tm-sticker {
  flex: none;
  width: 20px;
  height: 17px; /* 앱 스티커 비율 40:34 */
}

.tm-panel-head .tm-sticker { width: 22px; height: 19px; }

.tm-foot {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* ── 모바일 ─────────────────────────────────────────── */

@media (max-width: 860px) {
  .taste-match .tm-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .tm-panel { padding: 14px; }
  .tm-map { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; }
  .tm-photo { width: 52px; height: 52px; }
  .tm-badge { padding: 5px 8px 5px 6px; font-size: 14px; }
}

@media (max-width: 380px) {
  .tm-opt { padding: 6px 4px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-map { transition: opacity 0.3s; }
  .tm-opt:active { transform: none; }
}
