/* ============================================================
 * 유용서비스 포털 — 공통 디자인 시스템
 * 글래스모피즘 + 보라/핑크 그라디언트 + 다크모드 자동 대응
 * ============================================================ */

:root {
  /* sheslab 컨셉 — 부드러운 로즈 + 라일락 + 크림 (대장님 명령: 여성 매력 + 심플 우아) */
  --primary: #B5739E;         /* 라일락 (보라보다 부드러움) */
  --primary-dark: #8E5878;    /* 진한 라일락 */
  --secondary: #E8A4B8;       /* 부드러운 로즈 (강한 핑크 대신) */
  --accent: #D4A574;          /* 따뜻한 골드 (절제) */
  --rose-soft: #FFE5EC;       /* 매우 부드러운 로즈 */
  --lilac-soft: #F2EBF5;      /* 매우 부드러운 라일락 */
  --cream: #FFF9F4;           /* 크림 */

  --bg: #FEFCFA;              /* 거의 흰 크림 */
  --bg-grad: linear-gradient(135deg, #FEFCFA 0%, #FFF5F0 50%, #FAF0F5 100%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(232, 164, 184, 0.18);

  --text: #2D2D3F;            /* 차콜 (검정 대신) */
  --text-muted: #6E6B7E;
  --text-light: #A89FB2;

  --shadow: 0 4px 20px rgba(232, 164, 184, 0.10);
  --shadow-lg: 0 12px 40px rgba(181, 115, 158, 0.16);

  --radius: 20px;             /* 18 → 20 더 부드럽게 */
  --radius-sm: 12px;
  --radius-lg: 28px;

  --ease: cubic-bezier(0.33, 1, 0.68, 1);  /* ease-out-cubic (우아한 transition) */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1B2E;
    --bg-grad: linear-gradient(135deg, #1F1B2E 0%, #2A1E2E 50%, #1E1B2E 100%);
    --card-bg: rgba(45, 35, 55, 0.7);
    --card-border: rgba(232, 164, 184, 0.18);
    --text: #F5F0F8;
    --text-muted: #C8B8D0;
    --text-light: #908090;
    --rose-soft: rgba(232, 164, 184, 0.10);
    --lilac-soft: rgba(181, 115, 158, 0.10);
    --cream: rgba(255, 249, 244, 0.05);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 20px 60px 0 rgba(181, 115, 158, 0.25);
  }
}

/* 🚫 광고 영역 전체 숨김 (대장님 명령: sheslab 컨셉, 사용자 신뢰 우선) */
/* HTML 코드는 보존 — 1만 MAU 도달 후 affiliate 또는 AdSense 재활성화 가능 */
.ad-slot,
.ad-slot--display,
.ad-slot--top,
.ad-slot--bottom,
.ad-slot--in-article,
.ad-slot--infeed,
.split-ad-banner,
.matched-card--ad,
#announcements-section .ad-slot {
  display: none !important;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui,
               'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: var(--bg-grad);
  color: var(--text);
  min-height: 100vh;
  /* sheslab 컨셉: 텍스트 중심 + 신비감 + 상상력 — 읽기 좋은 본문 */
  font-size: 15.5px;
  line-height: 1.7;            /* 1.55 → 1.7 (글이 숨쉬도록) */
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* sheslab 헤드라인용 우아한 세리프 (Cormorant Garamond) */
.sheslab-serif,
.hero-title,
.section-title,
.love-hero-title,
.saju-hero-title {
  font-family: 'Cormorant Garamond', 'Pretendard', 'Noto Serif KR', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* 강조 이탤릭 — 시적 분위기 */
.sheslab-italic {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--primary-dark);
}

a { color: inherit; text-decoration: none; }

/* ===== Layout ===== */
.portal {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 14px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Header / Brand ===== */
.portal-header {
  text-align: center;
  padding: 24px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-mark { font-size: 1.45rem; }

.brand-tagline {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* ===== 트렌디 마이크로 인터랙션 ===== */
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes glow-soft {
  0%, 100% { box-shadow: 0 8px 28px rgba(99, 102, 241, 0.18); }
  50% { box-shadow: 0 12px 40px rgba(236, 72, 153, 0.28); }
}
@keyframes shimmer-bg {
  0% { background-position: -200% 50%; }
  100% { background-position: 200% 50%; }
}

/* sheslab 컨셉 — 강한 애니메이션 절제, 텍스트 중심 (대장님 명령) */
.service-card {
  /* 3D tilt 제거 — 산만함 줄이기 */
}
.service-card:hover {
  transform: translateY(-2px);  /* 6 → 2 (가볍게) */
  box-shadow: var(--shadow-lg);
  border-color: rgba(181, 115, 158, 0.30);
}

/* 호흡 글로우 제거 — 텍스트가 주인공 */
.service-card--ready {
  /* animation 제거 */
}

/* 아이콘 둥둥 제거 — 정적 우아함 */
.service-card .service-icon {
  /* animation 제거 */
  display: inline-block;
}

/* 부드러운 hover — 색상 미세 변화만 */
.service-card::before {
  background: linear-gradient(135deg, rgba(232, 164, 184, 0.05), rgba(181, 115, 158, 0.03));
}
.service-card:hover::before { opacity: 1; }

/* sheslab 텍스트 중심 Hero — 여백 + 우아한 세리프 + 신비감 */
.hero {
  text-align: center;
  padding: 56px 16px 40px;       /* 24 → 56 (글이 숨쉬도록) */
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(232, 164, 184, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-title {
  font-family: 'Cormorant Garamond', 'Pretendard', 'Noto Serif KR', Georgia, serif;
  font-size: clamp(1.85rem, 6vw, 2.8rem);   /* 살짝 더 크게 (텍스트가 주인공) */
  font-weight: 600;                          /* 900 → 600 (우아) */
  line-height: 1.25;
  letter-spacing: -0.015em;
  word-break: keep-all;
  background: transparent;
  color: var(--text);
}

.hero-accent {
  font-style: italic;                        /* 시적 강조 */
  font-weight: 500;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

/* shimmer 라인 제거 — 텍스트가 주인공 */
.hero-accent::after { display: none; }

.hero-desc {
  margin-top: 22px;                          /* 12 → 22 (여백 확보) */
  font-size: 1rem;
  color: var(--text-muted);
  word-break: keep-all;
  line-height: 1.65;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 20px;
  background: var(--lilac-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  text-transform: uppercase;
}

/* ===== Section ===== */
.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ===== Service Grid ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.service-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(236, 72, 153, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.4);
}

.service-card:hover::before { opacity: 1; }

.service-card--locked { cursor: default; opacity: 0.85; }
.service-card--locked:hover { transform: none; }

/* "서비스 가능" 배지는 카드 자체가 클릭 가능한 상태로 표시되니 굳이 텍스트로 안 알림 */
.service-card--ready .service-tag:not(.service-tag--soon) {
  display: none;
}
.service-card--ready .service-meta:empty,
.service-card--ready .service-meta:has(.service-tag:not(.service-tag--soon):only-child) {
  display: none;
}

.service-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}
.service-card.completed::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
}

.service-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.service-meta { margin-top: 4px; }

.service-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.service-tag--soon {
  background: rgba(156, 163, 175, 0.25);
  color: var(--text-muted);
}

/* ===== 옵션 B 변형: 메인 카드(연애 툴킷) 강조 + 입구 카드(MBTI/사주) 차별 ===== */
/* Featured 카드 — 연애 툴킷 (메인 락인) */
.service-card--featured {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.10), rgba(99, 102, 241, 0.06), rgba(251, 191, 36, 0.05));
  border: 2px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 12px 32px rgba(236, 72, 153, 0.18), 0 4px 12px rgba(99, 102, 241, 0.10);
  grid-column: 1 / -1; /* 전체 너비 */
  position: relative;
}
.service-card--featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), transparent);
  pointer-events: none;
}
.service-card--featured .service-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 4px 8px rgba(236, 72, 153, 0.30));
}
.service-card--featured .service-title {
  font-size: 1.25rem;
  background: linear-gradient(135deg, #be185d, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.service-tag--main {
  background: linear-gradient(135deg, #ec4899, #f59e0b) !important;
  color: white !important;
  font-weight: 800;
  letter-spacing: 0.3px;
}
/* Gateway 카드 — MBTI/사주 (트래픽 입구) */
.service-card--gateway {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(167, 139, 250, 0.04));
  border: 1px dashed rgba(99, 102, 241, 0.30);
}
.service-card--gateway .service-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
  font-weight: 700;
}
@media (max-width: 600px) {
  .service-card--featured { grid-column: 1; }
  .service-card--featured .service-icon { font-size: 2.2rem; }
  .service-card--featured .service-title { font-size: 1.15rem; }
}

.service-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  flex-grow: 1;
  word-break: keep-all;
}

.service-cta {
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.service-card--ready:hover .service-cta {
  gap: 8px;
}

.service-cta--soon { color: var(--text-light); }

/* ===== Ad Slots ===== */
.ad-slot {
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-light);
  font-size: 0.85rem;
}

@media (prefers-color-scheme: dark) {
  .ad-slot {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.ad-label {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 1px;
  font-weight: 600;
  opacity: 0.6;
}

.ad-slot::after {
  content: '';
}

.ad-slot:has(ins) { background: transparent; border: none; }
.ad-slot:has(ins)::after { display: none; }

/* ===== Footer ===== */
.portal-footer {
  margin-top: 24px;
  padding: 24px 0 12px;
  text-align: center;
  border-top: 1px solid var(--card-border);
}

.footer-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a:hover { color: var(--primary); }

.footer-nav .dot { color: var(--text-light); }

.footer-copy {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ===== Coming Soon (saju) ===== */
.soon-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.soon-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.soon-icon {
  font-size: 4.5rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.soon-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.soon-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.soon-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 28px;
  word-break: keep-all;
}

.soon-back {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}

.soon-back:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* ===== Responsive — 대장님 통찰: 누적 padding 폐단 방지 ===== */
@media (max-width: 600px) {
  /* 외곽 컨테이너 좌우 padding 0 — 카드 자체에만 padding 부여 (중첩 누적 방지) */
  .portal { padding: 12px 0 24px; gap: 16px; }
  .portal > .hero,
  .portal > .portal-header,
  .portal > .portal-stats,
  .portal > .global-feed-section,
  .portal > .top-liked-section,
  .portal > .services,
  .portal > .announcements,
  .portal > .portal-footer { padding-left: 12px; padding-right: 12px; }
  .portal > .global-feed-section .global-feed,
  .portal > .top-liked-section .top-liked-grid { margin-left: -12px; margin-right: -12px; border-radius: 0; }
  .service-grid { grid-template-columns: 1fr; gap: 10px; }
  .service-card { padding: 16px 14px; }
  .tips-widget { padding: 12px 10px; margin-left: -12px; margin-right: -12px; border-radius: 0; }
  .tips-mini-widget { margin-left: 0; margin-right: 0; }
  .tips-mini-body { padding: 10px 8px 12px; }
  .feed-card, .top-card { padding-left: 12px; padding-right: 12px; }
  .top-card { padding-left: 13px; }
  .tips-item { padding-left: 12px; padding-right: 12px; }
  .tips-mini-item { padding-left: 10px; padding-right: 10px; }
  .soon-card { padding: 32px 18px; }
  .soon-icon { font-size: 3.5rem; }
  .soon-title { font-size: 1.5rem; }
  .hero { padding: 40px 12px 32px; }
}

/* ============================================================
 * 언어 스위처 (native <select> — 컴팩트)
 * ============================================================ */

/* 옛 커스텀 드롭다운 잔재 강제 숨김 (캐시된 옛 i18n.js 대비) */
.lang-list,
.lang-list.open,
.lang-item,
.lang-btn:not(.lang-select),
ul.lang-list { display: none !important; }

.lang-switcher-mount {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
}

.lang-switcher--select {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  height: 34px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.lang-switcher--select:hover {
  background: rgba(0, 0, 0, 0.75);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 28px 6px 14px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white' opacity='0.85'><path d='M4 6l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

/* native select option은 OS가 그리므로 스타일 제한적 — 색상만 */
.lang-select option {
  background: #1f2937;
  color: #fff;
  font-size: 0.9rem;
  padding: 6px;
}

@media (prefers-color-scheme: light) {
  .lang-select option {
    background: #ffffff;
    color: #1f2937;
  }
}

@media (max-width: 480px) {
  .lang-switcher-mount {
    top: 12px;
    right: 12px;
  }
  .lang-switcher--select {
    height: 28px;
    padding: 3px 3px 3px 8px;
  }
  .lang-select {
    max-width: 60px; /* 모바일에선 깃발 + 코드만 보일 정도 */
    font-size: 0.72rem;
  }
}

/* RTL 처리 (아랍어) */
html[dir="rtl"] .lang-switcher-mount {
  right: auto;
  left: 16px;
}

html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-desc,
html[dir="rtl"] .section-title,
html[dir="rtl"] .service-card,
html[dir="rtl"] .soon-card { text-align: right; }

/* ============================================================
 * Trendy UI v2 — 메인 허브 / MBTI 결과 / 푸터 임팩트 강화
 * ============================================================ */

/* HERO 그라데이션 + 배경 라이브 효과 */
.portal .hero {
  position: relative;
  overflow: hidden;
}
.portal .hero::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 15% 30%, rgba(99, 102, 241, 0.18), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(236, 72, 153, 0.18), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.14), transparent 50%);
  animation: hero-bg-float 14s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes hero-bg-float {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  33% { transform: translate(10px, -8px) scale(1.05); opacity: 1; }
  66% { transform: translate(-12px, 6px) scale(0.98); opacity: 0.85; }
}
.portal .hero > * { position: relative; z-index: 1; }

/* HERO 타이틀 그라데이션 텍스트 + 애니메이션 */
.hero-accent.hero-accent--gradient,
.hero-title .hero-accent {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s ease infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Service-card 3D tilt + shimmer 보강 */
.service-card {
  perspective: 1200px;
  transform-style: preserve-3d;
}
.service-card--ready::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(236, 72, 153, 0.4), rgba(99, 102, 241, 0.4), transparent 70%);
  background-size: 300% 100%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
  animation: shimmer-bg 4s linear infinite;
}
.service-card--ready:hover::after { opacity: 1; }
.service-card--ready:hover {
  transform: translateY(-8px) scale(1.015);
}

/* MBTI 결과 페이지 트렌디 강화 (mbti/result.html 가정) */
.result-hero,
.result-card {
  position: relative;
  overflow: hidden;
}
.result-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.16), transparent 60%);
  animation: hero-pulse 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hero-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.result-type-name {
  background: linear-gradient(135deg, #ec4899, #a855f7, #6366f1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}

/* 푸터 트렌디 강화 */
.portal-footer {
  position: relative;
  padding-top: 32px;
  margin-top: 40px;
}
.portal-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ec4899, #a855f7, #6366f1, transparent);
  border-radius: 2px;
}
.portal-footer .footer-nav a {
  position: relative;
  transition: color 0.2s;
}
.portal-footer .footer-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.portal-footer .footer-nav a:hover::after { width: 100%; }
.portal-footer .footer-nav a:hover { color: #ec4899; }

/* Reduced motion 존중 */
@media (prefers-reduced-motion: reduce) {
  .portal .hero::before,
  .hero-accent,
  .service-card--ready::after,
  .result-hero::after,
  .result-type-name {
    animation: none !important;
  }
}

/* ============================================================
 * 다국어 overflow 방지 (일본어/중국어/태국어 — 공백 없는 언어)
 * word-break: keep-all + overflow-wrap: anywhere = W3C 권장 조합
 * 한글: keep-all 우선 → 단어 단위 끊기 유지
 * CJK: box 넘으면 anywhere로 강제 줄바꿈
 * ============================================================ */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}
.portal, .saju-wrap, .love-wrap, .game-wrap, .app-container,
.portal *, .saju-wrap *, .love-wrap *, .game-wrap *, .app-container * {
    overflow-wrap: anywhere;
    min-width: 0; /* flex/grid 자식 강제 축소 가능 */
}
/* select option 등은 native이므로 제외 */
select, option, input { overflow-wrap: normal; }

/* ============================================================
 * 컨텍스트 배지 (.ctx-bar) — 모든 페이지 공통 스타일
 * 박정원 후기: 사주 페이지 하단에 raw 텍스트로 노출됨 (스타일 미적용)
 * 원인: mbti/style.css에만 정의되어 있어 다른 페이지는 디자인 누락
 * 시정: portal.css로 이전 — 모든 페이지에서 일관 표시
 * ============================================================ */
.ctx-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.92);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.32);
  max-width: calc(100vw - 200px);
  flex-wrap: wrap;
}
.ctx-bar.active { display: inline-flex; }
.ctx-bar .ctx-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
}
.ctx-bar .ctx-clear {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-family: inherit;
}
.ctx-bar .ctx-clear:hover { background: rgba(255,255,255,0.18); }
/* 모바일에서는 우측 lang switcher 자리 피해 좌측으로 살짝 이동 */
@media (max-width: 480px) {
  .ctx-bar {
    left: 12px;
    transform: none;
    max-width: calc(100vw - 80px);
    font-size: 0.72rem;
  }
}
/* 사주 페이지에서 헤더 라이브러리 버튼과 겹치지 않도록 더 위로 (top:16 그대로 OK, 헤더 자체가 padding-right 110px) */

/* ============================================================
 * 좋아요 위젯 — 결과 카드 끝에 부착, 국가별 통계 노출
 * ============================================================ */
.likes-widget {
  margin: 18px 0 8px;
  padding: 14px 16px;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 14px;
  display: grid;
  gap: 10px;
}
.likes-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.10), rgba(167, 139, 250, 0.08));
  border: 1px solid rgba(236, 72, 153, 0.30);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #be185d;
  transition: transform 0.15s, background 0.15s;
  width: fit-content;
}
.likes-btn:hover { transform: translateY(-1px); background: rgba(236, 72, 153, 0.15); }
.likes-btn.liked {
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  border-color: #be185d;
}
.likes-heart { font-size: 1.1rem; }
.likes-count { font-weight: 800; }
.likes-label {
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  word-break: keep-all;
}
.likes-countries {
  border-top: 1px dashed rgba(167, 139, 250, 0.20);
  padding-top: 10px;
  margin-top: 4px;
}
.likes-countries:empty { display: none; }
.likes-countries-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6d28d9;
  margin-bottom: 6px;
}
.likes-countries-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.likes-country-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
}
.likes-flag { font-size: 0.95rem; }
.likes-pct { color: #ec4899; font-weight: 800; }
.likes-cnt { color: #6b7280; }

@media (prefers-color-scheme: dark) {
  .likes-widget { background: rgba(255,255,255,0.04); border-color: rgba(167,139,250,0.25); }
  .likes-country-item { background: rgba(255,255,255,0.06); }
  .likes-label { color: rgba(255,255,255,0.7); }
}

/* ============================================================
 * 사용자 팁 위젯 — 국가별 추천 + 자동 심사
 * ============================================================ */
.tips-widget {
  margin: 16px 0 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.04));
  border: 1px solid rgba(99, 102, 241, 0.20);
  border-radius: 14px;
}
.tips-head { margin-bottom: 10px; }
.tips-title {
  margin: 0 0 3px;
  font-size: 0.96rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tips-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  word-break: keep-all;
}
/* tips 위젯 — 리스트뷰 + 가느다란 구분선 */
.tips-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.10);
  border-radius: 10px;
  overflow: hidden;
}
.tips-empty {
  text-align: center;
  color: var(--text-muted, #9ca3af);
  font-size: 0.82rem;
  padding: 12px;
  margin: 0;
}
.tips-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.10);
  font-size: 0.84rem;
  line-height: 1.5;
}
.tips-item:last-child { border-bottom: none; }
.tips-flag {
  font-size: 1rem;
  flex-shrink: 0;
}
.tips-text {
  word-break: keep-all;
  color: #2d2d4a;
}
.tips-form {
  display: grid;
  gap: 8px;
  border-top: 1px dashed rgba(99, 102, 241, 0.20);
  padding-top: 14px;
}
.tips-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(99, 102, 241, 0.30);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.95);
  color: #2d2d4a;
  resize: vertical;
  min-height: 60px;
}
.tips-textarea:focus { outline: none; border-color: #6366f1; }
.tips-counter {
  font-size: 0.78rem;
  color: var(--text-muted, #9ca3af);
  text-align: right;
}
.tips-submit-btn {
  width: 100%;
  padding: 10px 18px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  transition: transform 0.15s;
}
.tips-submit-btn:hover { transform: translateY(-1px); }
.tips-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tips-status {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.2em;
  word-break: keep-all;
}
.tips-status.ok { color: #10b981; }
.tips-status.err { color: #ef4444; }
.tips-status.info { color: #f59e0b; }
.tips-rules {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin: 8px 0 0;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 8px;
  word-break: keep-all;
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  .tips-widget { background: rgba(255,255,255,0.04); border-color: rgba(99,102,241,0.25); }
  .tips-item { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); }
  .tips-item .tips-text { color: rgba(255,255,255,0.92); }
  .tips-textarea { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); }
}

/* 사용자 추천 위젯 — 컨텍스트 칩 (어떤 항목에 대한 추천인지 명시) */
.tips-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  word-break: keep-all;
  max-width: 100%;
}
.tips-context-icon { font-size: 1rem; line-height: 1; }
.tips-context-label { color: white; }

/* 사용자 추천 — 닉네임 + 식별 (꾸준한 기여자 뱃지) */
.tips-nickname-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.95);
  color: #2d2d4a;
  margin-bottom: 6px;
}
.tips-nickname-input:focus { outline: none; border-color: #6366f1; }
.tips-item {
  flex-direction: column;
  align-items: stretch;
}
.tips-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.tips-nick {
  font-weight: 800;
  color: #6d28d9;
  font-size: 0.88rem;
}
.tips-nick-anon { color: #9ca3af; font-weight: 600; font-style: italic; }
.tips-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.tips-badge-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.tips-badge-silver { background: linear-gradient(135deg, #d1d5db, #9ca3af); color: white; }
.tips-badge-bronze { background: linear-gradient(135deg, #f59e0b, #b45309); color: white; }

/* ============================================================
 * 🚀 글로벌 커뮤니티 포털 (메인 페이지)
 * ============================================================ */

/* HERO 강화 */
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ec4899, #a855f7, #6366f1);
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.25);
}

/* 신규 출시 배너 */
.announcements { display: grid; gap: 10px; }
.announcement-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(236, 72, 153, 0.06));
  border: 1px solid rgba(251, 191, 36, 0.30);
  transition: transform 0.2s;
}
.announcement-card:hover { transform: translateY(-2px); }
.announcement-card.type-update {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(167, 139, 250, 0.06));
  border-color: rgba(99, 102, 241, 0.30);
}
.announcement-icon { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.announcement-body { flex: 1; }
.announcement-title { font-size: 0.96rem; font-weight: 800; color: #b45309; margin-bottom: 3px; }
.announcement-text { color: var(--text-muted); font-size: 0.84rem; margin: 0 0 6px; line-height: 1.5; }
.announcement-cta {
  display: inline-block;
  padding: 5px 12px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: white !important;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

/* 통계 카드 */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
}
@media (max-width: 540px) {
  .portal-stats { grid-template-columns: repeat(2, 1fr); }
}
.stat-item { text-align: center; padding: 8px; }
.stat-num {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-label { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; font-weight: 600; }

/* 인기 추천 (Top) */
.top-liked-section { margin: 8px 0; }
.section-sub {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin: -6px 0 14px;
  word-break: keep-all;
}
/* Top liked — 리스트뷰 + 가느다란 구분선 (랭크 강조는 좌측 컬러 보더로) */
.top-liked-grid {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}
.top-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 11px 14px 11px 16px;
  position: relative;
  box-shadow: none;
  transition: background-color 0.15s;
  border-bottom: 1px solid rgba(236, 72, 153, 0.12);
  border-left: 3px solid transparent;
}
.top-card:last-child { border-bottom: none; }
.top-card:hover { background: rgba(236, 72, 153, 0.04); transform: none; box-shadow: none; }
.top-card.rank-1 { border-left-color: #fbbf24; }
.top-card.rank-2 { border-left-color: #d1d5db; }
.top-card.rank-3 { border-left-color: #f59e0b; }
.top-rank {
  display: inline-flex;
  align-items: center;
  position: static;
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 900;
  font-size: 0.92rem;
  margin-right: 6px;
}
.top-card.rank-1 .top-rank { background: transparent; border: none; }
.top-likes {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: static;
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  margin-left: auto;
}
.top-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 4px; }
.top-flag { font-size: 1.1rem; }
.top-nick { font-weight: 800; color: #6d28d9; font-size: 0.92rem; }
.top-nick.anon { color: #9ca3af; font-style: italic; }
.top-badge {
  background: rgba(251, 191, 36, 0.18);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
}
.top-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  word-break: keep-all;
  margin: 0 0 8px;
}
.top-translate-btn,
.feed-translate-btn {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #6366f1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}
.top-translate-btn:hover,
.feed-translate-btn:hover { background: rgba(99, 102, 241, 0.15); }
.top-translated,
.feed-translated {
  margin-top: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(236, 72, 153, 0.04));
  border-left: 3px solid #6366f1;
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
}
.top-translated[hidden],
.feed-translated[hidden] { display: none; }
.feed-translated-src { font-size: 0.72rem; color: var(--text-muted); display: block; margin-top: 6px; }

/* 글로벌 피드 */
.global-feed-section { margin: 8px 0; }
.feed-live-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: #ef4444;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  animation: feed-pulse 1.5s ease-in-out infinite;
}
@keyframes feed-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
/* 대장님 명령: 카드형 → 리스트뷰 + 가느다란 수평선 (트위터 스타일, 공간 효율 ↑↑) */
.global-feed {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}
.feed-loading, .feed-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.feed-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background-color 0.15s;
  position: relative;
  border-bottom: 1px solid rgba(99, 102, 241, 0.10);
}
.feed-card:last-child { border-bottom: none; }
.feed-card:hover { background: rgba(99, 102, 241, 0.04); transform: none; }
.feed-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.78rem; }
.feed-flag { font-size: 1rem; }
.feed-nick { font-weight: 800; color: #6d28d9; }
.feed-nick.anon { color: #9ca3af; font-style: italic; font-weight: 600; }
.feed-cat { margin-left: auto; font-size: 0.95rem; }
.feed-badge {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
}
.feed-badge.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.feed-badge.silver { background: linear-gradient(135deg, #d1d5db, #9ca3af); color: white; }
.feed-badge.bronze { background: linear-gradient(135deg, #f59e0b, #b45309); color: white; }
/* 컨텍스트 칩 — 어떤 분야 추천인지 본문 위에 명확히 표시 */
.feed-context-chip {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(236, 72, 153, 0.07));
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #4f46e5;
  word-break: keep-all;
  line-height: 1.4;
  max-width: 100%;
}
.top-context-chip {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 11px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.30);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #b45309;
  word-break: keep-all;
  line-height: 1.4;
}
@media (prefers-color-scheme: dark) {
  .feed-context-chip {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.20), rgba(236, 72, 153, 0.12));
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.35);
  }
  .top-context-chip {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.20), rgba(236, 72, 153, 0.14));
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.40);
  }
}
.feed-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
  word-break: keep-all;
  margin: 0;
}
.feed-actions { display: flex; gap: 8px; }
.feed-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(99, 102, 241, 0.10);
  padding-top: 8px;
  flex-wrap: wrap;
}
.feed-source { color: var(--text-light); }
.feed-like-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #be185d;
  cursor: pointer;
  font-family: inherit;
}
.feed-like-btn.liked {
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  border-color: #be185d;
}
.feed-more-btn {
  margin: 14px auto 0;
  display: block;
  padding: 10px 24px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.30);
  color: #6366f1;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.feed-more-btn:hover { background: rgba(99, 102, 241, 0.15); }

/* 미출시 서비스 카드 — 대장님 명령: 보이지 않게, 출시 시 announcements 배너로 노출 */
.service-card--soon,
.service-card--locked,
.service-card--soon.service-card,
.service-card.service-card--locked {
  display: none !important;
}

/* ============================================================
 * 미니 추천 위젯 (세부 섹션별, 컴팩트)
 * 좋아요 정렬 → 상위 랭킹 메달 표시
 * ============================================================ */
.tips-mini-widget {
  margin-top: 12px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.04);
  overflow: hidden;
}
.tips-mini-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  text-align: left;
}
.tips-mini-widget.collapsed .tips-mini-toggle:hover {
  background: rgba(99, 102, 241, 0.08);
}
.tips-mini-icon { font-size: 1rem; }
.tips-mini-label { flex: 1; word-break: keep-all; }
.tips-mini-count { color: #ec4899; font-weight: 800; font-size: 0.78rem; }
.tips-mini-toggle::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.tips-mini-widget:not(.collapsed) .tips-mini-toggle::after { transform: rotate(180deg); }

.tips-mini-body {
  padding: 12px 14px;
  border-top: 1px dashed rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.5);
}
.tips-mini-chip {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  word-break: keep-all;
}
.tips-mini-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.10);
  border-radius: 8px;
  overflow: hidden;
}
.tips-mini-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.10);
  font-size: 0.84rem;
  line-height: 1.55;
}
.tips-mini-item:last-child { border-bottom: none; }
.tips-mini-rank { font-size: 1rem; }
.tips-mini-nick { color: #6d28d9; font-weight: 800; font-size: 0.78rem; }
.tips-mini-text { flex: 1; min-width: 0; word-break: keep-all; color: #2d2d4a; }

/* 모바일 시정 — tips-mini-item에서 본문이 닉/좋아요와 같은 줄에서 좁아져 잘리던 문제 */
@media (max-width: 600px) {
  .tips-mini-item {
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    padding: 9px 12px !important;
  }
  .tips-mini-nick {
    font-size: 0.84rem !important;
  }
  /* 본문을 자기 줄에 100% 너비로 강제 */
  .tips-mini-text {
    flex: 1 0 100% !important;
    width: 100% !important;
    font-size: 0.94rem !important;
    line-height: 1.55 !important;
    margin-top: 2px !important;
    color: #2d2d4a !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    display: block !important;
  }
  /* 일반 tips-item도 동일하게 본문 강제 표시 */
  .tips-item .tips-text {
    flex: 1 0 100% !important;
    width: 100% !important;
    display: block !important;
    color: #2d2d4a !important;
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
}
.tips-mini-like {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: rgba(236, 72, 153, 0.06);
  border: 1px solid rgba(236, 72, 153, 0.20);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #be185d;
  cursor: pointer;
  font-family: inherit;
}
.tips-mini-like.liked {
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  border-color: #be185d;
}
.tips-mini-like-heart { font-size: 0.82rem; }
.tips-mini-form {
  display: grid;
  gap: 6px;
  border-top: 1px dashed rgba(99, 102, 241, 0.10);
  padding-top: 10px;
}
.tips-mini-form .tips-textarea { font-size: 0.85rem; min-height: 50px; }
.tips-mini-form .tips-submit-btn { padding: 8px 14px; font-size: 0.85rem; }

@media (prefers-color-scheme: dark) {
  .tips-mini-widget { background: rgba(255,255,255,0.04); border-color: rgba(99,102,241,0.25); }
  .tips-mini-body { background: rgba(255,255,255,0.04); }
  .tips-mini-item { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); }
  .tips-mini-text { color: rgba(255,255,255,0.92); }
}

/* ============================================================
 * 옵션 B 변형 — love-megacta (MBTI/사주 결과 → 연인 콘텐츠 락인)
 * ============================================================ */
.love-megacta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  padding: 18px 22px;
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #6366f1 100%);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(236, 72, 153, 0.30), 0 4px 12px rgba(99, 102, 241, 0.20);
  text-decoration: none !important;
  color: white !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.love-megacta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: love-shine 4s linear infinite;
  pointer-events: none;
}
@keyframes love-shine {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
.love-megacta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(236, 72, 153, 0.40), 0 6px 16px rgba(99, 102, 241, 0.25);
}
.love-megacta .lmc-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.20));
  flex-shrink: 0;
  animation: lmc-pulse 2.5s ease-in-out infinite;
}
@keyframes lmc-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.love-megacta .lmc-body { flex: 1; min-width: 0; }
.love-megacta .lmc-headline {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  word-break: keep-all;
  line-height: 1.35;
}
.love-megacta .lmc-sub {
  font-size: 0.8rem;
  opacity: 0.92;
  word-break: keep-all;
  line-height: 1.4;
}
.love-megacta .lmc-cta {
  background: rgba(255,255,255,0.20);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.30);
}
@media (max-width: 600px) {
  .love-megacta { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
  .love-megacta .lmc-cta { align-self: stretch; text-align: center; }
}

/* love 페이지 진입 시 컨텍스트 환영 배너 */
.love-context-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(236,72,153,0.10), rgba(99,102,241,0.08));
  border: 1px solid rgba(236,72,153,0.25);
  border-radius: 12px;
  font-size: 0.86rem;
  color: var(--text);
}
.love-context-banner .lcb-icon { font-size: 1.2rem; }
.love-context-banner .lcb-tag {
  background: linear-gradient(135deg, #ec4899, #6366f1);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
}

/* 신선도 바 — 랜딩 피드 기간 표시 + 토글 (대장님 명령) */
.feed-freshness-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(236, 72, 153, 0.04));
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 10px;
  font-size: 0.78rem;
  flex-wrap: wrap;
}
.feed-window-label {
  color: var(--text);
  font-weight: 700;
  word-break: keep-all;
}
.feed-window-toggle {
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.30);
  color: #4f46e5;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.feed-window-toggle:hover { background: rgba(99, 102, 241, 0.18); }

/* ============================================================
 * sheslab 컨셉 — 연애운 강조 + 부가 콘텐츠 접기 (대장님 명령)
 * ============================================================ */
.feature-section--love-main {
  position: relative;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(168, 85, 247, 0.04));
  border: 1px solid rgba(236, 72, 153, 0.20);
  border-radius: 14px;
  padding: 14px 14px 4px;
  margin-bottom: 14px;
}
.feature-section--love-main::before {
  content: '⭐';
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

/* 사주 추가 풀이 접기 (직업/재물/건강) */
.saju-extra-fortunes {
  margin: 16px 0;
  background: rgba(99, 102, 241, 0.04);
  border: 1px dashed rgba(99, 102, 241, 0.20);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
.saju-extra-summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
  list-style: none;
  user-select: none;
  word-break: keep-all;
}
.saju-extra-summary::-webkit-details-marker { display: none; }
.saju-extra-summary::after { content: ' ▼'; font-size: 0.72rem; opacity: 0.6; }
.saju-extra-fortunes[open] .saju-extra-summary::after { content: ' ▲'; }
.saju-extra-summary:hover { background: rgba(99, 102, 241, 0.08); }
.saju-extra-fortunes[open] { padding: 0 14px 14px; }

/* love 부가 콘텐츠 접기 (미니게임) */
.love-extras {
  margin: 14px 0 8px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px dashed rgba(99, 102, 241, 0.20);
  border-radius: 12px;
  overflow: hidden;
}
.love-extras-summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
  list-style: none;
  user-select: none;
  word-break: keep-all;
}
.love-extras-summary::-webkit-details-marker { display: none; }
.love-extras-summary::after { content: ' ▼'; font-size: 0.72rem; opacity: 0.6; }
.love-extras[open] .love-extras-summary::after { content: ' ▲'; }
.love-extras-summary:hover { background: rgba(99, 102, 241, 0.08); }
.love-extras[open] { padding: 0 12px 12px; }
.love-menu-card--compact { padding: 12px; min-height: auto; }
