/* Daily Sensing — 전역 스타일.
   ⚠️ 이 파일은 <head> 에서 <link> 로 로드된다(rxconfig.py stylesheets).
   예전엔 rx.html(custom_css) 로 컴포넌트 렌더 시점에 <style> 을 주입했는데,
   React 하이드레이션 전까지 스타일이 없어 카드 레이아웃이 무너진 채 노출됐다. */
/* 벨 알림 버튼 상태 */
#__push_bell__ { transition: opacity 0.2s ease; }
#__push_bell__ svg { transition: color 0.3s ease; }
#__push_bell__.push-subscribed svg { color: rgba(253,211,77,0.9) !important; }
#__push_dot__ { transition: background 0.3s ease; }
#__push_bell__.push-subscribed #__push_dot__ {
  background: rgba(253,211,77,0.9) !important;
}
@keyframes bell-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}
#__push_bell__.push-loading { animation: bell-pulse 0.7s ease-in-out infinite; }

/* splash-pre.css가 React 이전에 로드되므로 여기선 중복 제거 */
.app-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
  color: #111111;
  letter-spacing: 0.01em;
  text-align: center;
}
.hero-img-box { position: relative; width: 100%; border-radius: 8px 8px 0 0; overflow: hidden; }
.reason-icon { position: absolute; top: 12px; right: 12px; z-index: 15; background: rgba(255,255,255,0.25); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); cursor: help; color: white; border: 1px solid rgba(255,255,255,0.5); transition: 0.3s; font-size: 14px;}
.reason-icon:hover { background: rgba(139, 92, 246, 0.9); border-color: transparent;}
.reason-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.92); z-index: 14; opacity: 0; visibility: hidden; transition: 0.3s; padding: 20px; box-sizing: border-box; overflow-y: auto; backdrop-filter: blur(5px); }
.reason-icon:hover + .reason-overlay, .reason-overlay:hover { opacity: 1; visibility: visible; }
.reason-title { font-weight: 800; color: #A78BFA; font-size: 0.95rem; margin-bottom: 12px; }
.reason-text { color: #F1F5F9; font-size: 0.82rem; line-height: 1.5; margin-bottom: 8px; }
.reason-highlight { color: #DDD6FE; background: rgba(139, 92, 246, 0.25); padding: 2px 4px; border-radius: 4px; font-weight: bold; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background-color: #CBD5E1; border-radius: 10px; }

/* ── 반응형 레이아웃 분기 ── */
@media (min-width: 1024px) {
  .mobile-layout { display: none !important; }
}
@media (max-width: 1023px) {
  .desktop-layout { display: none !important; }
}

/* ── 설치형 앱(TWA/PWA) 전용 분기 ──
   .app-only-hide 가 붙은 요소는 앱으로 열었을 때만 사라진다. 브라우저 접속은 그대로. */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .app-only-hide { display: none !important; }
}
/* 네이티브 WebView 앱(UA=LumivaneApp)에서도 앱 전용 규칙 적용 */
.native-app .app-only-hide { display: none !important; }
/* web-only-hide: 웹에서는 숨기고 설치형 앱/네이티브 앱에서만 표시 */
.web-only-hide { display: none !important; }
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .web-only-hide { display: flex !important; }
}
.native-app .web-only-hide { display: flex !important; }
.brand-app { display: none; }
.native-app .brand-web { display: none; }
.native-app .brand-app { display: inline; }
/* 계속 스크롤 힌트 꺽쇠 바운스 */
@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(7px); opacity: 1; }
}
.scroll-hint { animation: scroll-hint-bounce 1.4s ease-in-out infinite; }

/* ── 모바일 피드 ── */
.mobile-feed-scroll {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: calc(100dvh - 52px - 60px);
  margin-top: 52px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-y: none;
}
.mobile-feed-scroll::-webkit-scrollbar { display: none; }
.mobile-feed-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: calc(100dvh - 52px - 60px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mobile-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.mobile-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.96) 0%,
    rgba(0,0,0,0.7) 38%,
    rgba(0,0,0,0.25) 65%,
    rgba(0,0,0,0.05) 100%
  );
  z-index: 1;
}
.mobile-card-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 14px 18px 14px;
  box-sizing: border-box;
}
.mobile-tag-pill {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  display: inline-block;
  margin: 2px 3px;
}
/* ── 탭별 그라디언트 오버레이 ── */
/* 좋아요: 딥 레드 */
.feed-likes .mobile-card-gradient {
  background: linear-gradient(
    to top,
    rgba(120,0,30,0.97) 0%,
    rgba(180,20,50,0.65) 38%,
    rgba(180,20,50,0.18) 65%,
    rgba(0,0,0,0.05) 100%
  ) !important;
}
.feed-likes .mobile-feed-card { background: #1a0008; }
/* 저장: 딥 인디고 */
.feed-saved .mobile-card-gradient {
  background: linear-gradient(
    to top,
    rgba(10,15,80,0.97) 0%,
    rgba(30,40,150,0.65) 38%,
    rgba(30,40,150,0.18) 65%,
    rgba(0,0,0,0.05) 100%
  ) !important;
}
.feed-saved .mobile-feed-card { background: #00001a; }

/* 커뮤니티: 딥 앰버/오렌지 */
.feed-community .mobile-card-gradient {
  background: linear-gradient(
    to top,
    rgba(100,40,0,0.97) 0%,
    rgba(160,70,0,0.62) 38%,
    rgba(120,50,0,0.18) 65%,
    transparent 100%
  ) !important;
}
.feed-community .mobile-feed-card { background: #1a0a00; }

/* 모바일 분석 모달 바텀시트 */
@media (max-width: 767px) {
  .mobile-layout [data-radix-popper-content-wrapper],
  .mobile-layout [role="dialog"] {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 92dvh !important;
    overflow-y: auto !important;
    transform: none !important;
  }
}
