/* 여행지 뽑기 */
.tr-wrap { max-width: 720px; margin: 0 auto; }
.tr-scopebar .seg { display: flex; width: 100%; flex-wrap: nowrap; }
.tr-scopebar .seg button { flex: 1 1 0; min-height: 44px; font-size: 15px; }

/* 카드 테이블 */
.tr-table {
  position: relative; height: 250px; border-radius: var(--radius-lg); overflow: hidden;
  background:
    radial-gradient(420px 200px at 50% 110%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--border); perspective: 900px;
}
.tr-card {
  position: absolute; left: 50%; top: 50%; width: 116px; height: 164px;
  transform: translate(-50%, -50%); transition: transform .22s cubic-bezier(.3, .7, .3, 1);
  will-change: transform;
}
.tr-card-inner {
  position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.tr-card.is-flipped .tr-card-inner { transform: rotateY(180deg); }
.tr-face {
  position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}
.tr-back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .12) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #2F80ED, #8B5CF6);
  border: 4px solid #fff; font-size: 38px;
}
.tr-front { background: var(--surface); border: 3px solid var(--primary); transform: rotateY(180deg); text-align: center; }
.tr-front-emoji { font-size: 40px; line-height: 1.1; }
.tr-front-name { font-weight: 900; font-size: 15px; line-height: 1.25; color: var(--text); word-break: keep-all; }
.tr-front-sub { font-size: 11.5px; font-weight: 700; color: var(--text-3); }

/* 결과 */
.tr-result {
  background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-lg);
  padding: 18px 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.tr-result-name { margin: 0; font-size: clamp(22px, 6vw, 30px); font-weight: 900; letter-spacing: -0.03em; word-break: keep-all; }
.tr-result-desc { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.55; word-break: keep-all; }
.tr-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tr-tag-main { background: var(--primary); color: var(--primary-ink); }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.tr-actions .btn { flex: 1 1 auto; }

/* 필터 */
.tr-filters { display: flex; flex-direction: column; gap: 14px; }
.tr-fgroup { display: flex; flex-direction: column; gap: 8px; }
.tr-flabel { font-weight: 800; font-size: 14px; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn.tr-chip { height: auto; min-height: 44px; padding: 0 14px; font-size: 14px; background: var(--surface); }
.chip-btn.tr-chip[aria-pressed="true"] { background: var(--primary-soft); }
.tr-count { margin: 0; font-size: 14.5px; color: var(--text-2); }
.tr-count b { color: var(--primary); font-family: var(--font-num); }
.tr-excl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--border-strong); }
.tr-excl-text { font-size: 13.5px; color: var(--text-2); flex: 1 1 200px; }

/* 투표 */
.tr-vote-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tr-vote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tr-vote {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border-radius: var(--radius-lg); background: var(--surface); border: 2px solid var(--border);
  animation: tr-flip-in .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: var(--d, 0ms);
  transition: border-color .2s ease, opacity .3s ease, box-shadow .2s ease;
}
.tr-vote > * { position: relative; z-index: 1; }
.tr-vote > .tr-vote-bar {
  position: absolute; left: 0; bottom: 0; top: 0; width: 0; z-index: 0;
  background: color-mix(in srgb, var(--primary) 12%, transparent); transition: width .35s ease;
}
.tr-vote-head { display: flex; align-items: center; gap: 10px; }
.tr-vote-emoji { font-size: 38px; line-height: 1; flex: none; }
.tr-vote-title { display: flex; flex-direction: column; min-width: 0; }
.tr-vote-name { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; word-break: keep-all; }
.tr-vote-sub { font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.tr-vote-desc { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.5; word-break: keep-all; flex: 1; }
.tr-vote-ctrl { display: flex; align-items: center; gap: 8px; }
.tr-vote-minus { width: 44px; padding: 0; font-size: 20px; flex: none; }
.tr-vote-plus { flex: 1; }
.tr-vote-count { min-width: 3.2em; text-align: center; font-weight: 900; font-size: 18px; font-family: var(--font-num); }
.tr-vote.is-win { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent); }
.tr-vote.is-lose { opacity: .5; }
@keyframes tr-flip-in {
  0% { transform: perspective(700px) rotateY(80deg); opacity: 0; }
  100% { transform: perspective(700px) rotateY(0); opacity: 1; }
}
@media (max-width: 380px) {
  .tr-table { height: 230px; }
  .tr-card { width: 104px; height: 148px; }
  .tr-front-name { font-size: 14px; }
}
