/* ========================================
   Petplverse — Animal Love + Modern Sleek UI
   Responsive: Mobile → Tablet → Desktop
   ======================================== */

:root {
  /* 코랄 크림 팔레트 (Pet + People + Metaverse) */
  --pet-primary: #FF6B6B;
  --pet-primary-dark: #E85D5D;
  --pet-primary-light: #FFE8E0;
  --pet-secondary: #4ECDC4;
  --pet-secondary-light: #E0F7F5;
  --pet-accent: #FFB088;
  --pet-bg: #FBF7F3;          /* 크림 배경 */
  --pet-card: #FFFCFA;        /* 카드 (살짝 따뜻한 화이트) */
  --pet-text: #2D2A28;
  --pet-text-sub: #8A7F78;
  --pet-text-muted: #B8ACA4;
  --pet-border: #F0E9E3;
  --pet-shadow-sm: 0 1px 4px rgba(214,120,90,0.05);
  --pet-shadow: 0 4px 16px rgba(214,120,90,0.07);
  --pet-shadow-lg: 0 8px 30px rgba(214,120,90,0.12);
  --pet-radius: 16px;
  --pet-radius-sm: 10px;
  --pet-gradient: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  --pet-gradient-soft: linear-gradient(135deg, #FFE8E0 0%, #FFF0E8 100%);
  --nav-h: 66px;
  --header-h: 56px;
}

.petple-paw-coin {
  --paw-coin-size: 1em;
  display: inline-block;
  width: var(--paw-coin-size);
  height: var(--paw-coin-size);
  min-width: var(--paw-coin-size);
  min-height: var(--paw-coin-size);
  vertical-align: middle;
  background-image: var(--pet-paw-coin-image, url('../images/paw-coin.svg'));
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

.petple-paw-coin--inline {
  --paw-coin-size: 1.05em;
  margin-right: 0.35em;
}

.petple-paw-coin--tiny {
  --paw-coin-size: 0.95em;
}

.petple-paw-coin--sm {
  --paw-coin-size: 1.2rem;
}

.petple-paw-coin--md {
  --paw-coin-size: 1.65rem;
}

.petple-paw-coin--lg {
  --paw-coin-size: 2.4rem;
}

.petple-paw-coin--hero {
  --paw-coin-size: 3rem;
}

.petple-paw-coin--deco {
  opacity: 0.18;
  filter: saturate(0.85) brightness(1.12);
}

.petple-paw-coin--soft {
  opacity: 0.72;
}

* { box-sizing: border-box; }

html {
  overscroll-behavior-y: contain;
  /* 모바일/웹뷰 가로 오버플로(→ overview 줌아웃) 원천 차단. clip은 스크롤 컨테이너를 만들지 않아 sticky 헤더 유지 */
  overflow-x: clip;
  max-width: 100%;
}

body.main-page {
  margin: 0;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--pet-bg);
  color: var(--pet-text);
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 22px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
  overflow-x: clip;
  max-width: 100%;
}

/* 자체 헤더(cm-write-header) 사용 페이지는 fixed header 보정 padding 불필요 */
body.main-page:has(.cm-write-header) {
  padding-top: 0;
}

.main-page .app-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  overscroll-behavior-y: contain;
  overflow-x: clip;
  width: 100%;
}


/* ========== HEADER ========== */

.main-page .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  /* 컴팩트 소셜: 밝은 화이트 헤더 + 코랄 포인트 */
  background: rgba(255, 252, 250, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  color: var(--pet-text);
  border-bottom: 1px solid var(--pet-border);
  box-shadow: 0 1px 12px rgba(214, 120, 90, 0.06);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.38s ease;
}

.header.header-hidden {
  transform: translateY(-110%);
  opacity: 0;
}

.main-page .header-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--pet-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.main-page .header-logo .logo-icon {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.main-page .header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-page .header-actions a,
.main-page .header-actions button {
  color: var(--pet-primary);
  font-size: 1.05rem;
  text-decoration: none;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pet-primary-light);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.main-page .header-actions a:hover,
.main-page .header-actions button:hover {
  background: var(--pet-primary);
  color: #fff;
}

/* 뒤로가기 버튼 */
.main-page .header-back {
  color: #fff;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.main-page .header-back:hover {
  background: rgba(255,255,255,0.28);
}
.main-page .header-back:active {
  transform: scale(0.92);
}

.main-page .header-actions .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--pet-accent);
  border-radius: 50%;
  border: 2px solid rgba(255,107,107,0.8);
}

.main-page .header-actions .header-action-disabled {
  color: #fff;
  font-size: 1.05rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  position: relative;
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

/* 메인 검색 패널: 헤더 아래 sticky (커뮤니티 cm-search-bar 톤 정렬) */
.main-page .main-search-panel .cm-search-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--pet-bg, #faf8f6);
  padding: 10px 16px 12px;
  margin-top: 0;
  border-bottom: 1px solid var(--pet-border);
  box-shadow: 0 6px 16px rgba(45, 52, 54, 0.06);
}


/* ========== STORIES ========== */

.main-page .stories-wrap {
  padding: 14px 0;
  background: var(--pet-card);
  border-bottom: 1px solid var(--pet-border);
}

.main-page .stories-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-page .stories-scroll::-webkit-scrollbar { display: none; }

.main-page .story-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pet-text);
  transition: transform 0.2s;
}

.main-page .story-item:hover {
  transform: translateY(-2px);
}

.main-page .story-avatar-wrap {
  width: 66px;
  height: 66px;
  padding: 3px;
  border-radius: 50%;
  background: var(--pet-gradient);
  margin-bottom: 6px;
  transition: box-shadow 0.25s;
}

.main-page .story-item:hover .story-avatar-wrap {
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.30);
}

.main-page .story-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  padding: 2px;
}

.main-page .story-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.main-page .story-username {
  font-size: 0.6875rem;
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--pet-text-sub);
}


/* ========== FEED (responsive grid) ========== */

.main-page .feed {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

/* 피드 내 이미지는 컨테이너를 넘지 않도록 (가로 오버플로 방어) */
.main-page .feed img {
  max-width: 100%;
}

.main-page .post-card {
  min-width: 0;
  background: var(--pet-card);
  border-radius: var(--pet-radius-sm);
  overflow: hidden;
  box-shadow: var(--pet-shadow-sm);
  border: 1px solid var(--pet-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
  .main-page .post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pet-shadow-lg);
  }
}

.main-page .post-header {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  gap: 9px;
}

.main-page .post-author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pet-primary-light);
  flex-shrink: 0;
}

.main-page .post-author-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.8125rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-page .post-options {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--pet-text-muted);
  font-size: 1rem;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.main-page .post-options:hover {
  background: var(--pet-bg);
  color: var(--pet-text);
}


/* ========== POST IMAGES ========== */

.main-page .post-image-wrap {
  width: 100%;
  aspect-ratio: 1;
  max-height: 75vh;
  background: #f0edeb;
  overflow: hidden;
}

.main-page .post-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .main-page .post-card:hover .post-image-wrap > img {
    transform: scale(1.03);
  }
}

.main-page .post-image-wrap.post-image-slider {
  position: relative;
  overflow: hidden;
}

.main-page .post-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: 75vh;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.main-page .post-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.main-page .post-slider-slide {
  flex: 0 0 auto;
  height: 100%;
}

.main-page .post-slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-page .post-slider-prev,
.main-page .post-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  color: var(--pet-text);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}

.main-page .post-slider-prev:hover,
.main-page .post-slider-next:hover {
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
}

.main-page .post-slider-prev { left: 8px; }
.main-page .post-slider-next { right: 8px; }

.main-page .post-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}

.main-page .post-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.50);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.main-page .post-slider-dot:hover {
  background: rgba(255,255,255,0.85);
}

.main-page .post-slider-dot.active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}


/* ========== POST CONTENT ========== */

.main-page .post-actions {
  display: flex;
  align-items: center;
  padding: 8px 10px 2px;
  gap: 2px;
}

.main-page .post-actions button,
.main-page .post-actions a {
  background: none;
  border: none;
  padding: 7px 8px;
  cursor: pointer;
  color: var(--pet-text);
  font-size: 1.2rem;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}

.main-page .post-actions button:hover,
.main-page .post-actions a:hover {
  color: var(--pet-primary);
  background: var(--pet-primary-light);
}

/* ========== LIKE BUTTON STATES & ANIMATION ========== */

.main-page .btn-like {
  position: relative;
  overflow: visible;
  transition: color 0.18s ease, background 0.15s, transform 0.15s;
}

.main-page .btn-like.is-liked i {
  color: var(--pet-primary);
}

.main-page .btn-like.is-animating i {
  animation: likeHeartBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes likeHeartBounce {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.55); }
  30%  { transform: scale(0.8); }
  45%  { transform: scale(1.3); }
  60%  { transform: scale(0.95); }
  75%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.like-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -6px 0 0 -6px;
  pointer-events: none;
  font-size: 0.7rem;
  color: var(--pet-primary);
  opacity: 0;
  animation: likeParticleFly 0.7s ease-out forwards;
  z-index: 10;
  filter: drop-shadow(0 0 2px currentColor);
}

.like-particle-outer {
  font-size: 0.5rem;
  animation: likeParticleOuter 0.85s ease-out forwards;
}

@keyframes likeParticleFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(1.2) rotate(0deg); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.2) rotate(var(--rot)); }
}

@keyframes likeParticleOuter {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.8); }
  15%  { opacity: 1; transform: translate(calc(var(--tx) * 0.3), calc(var(--ty) * 0.3)) scale(1.1); }
  50%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0) rotate(var(--rot)); }
}

.like-ring-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2.5px solid var(--pet-primary);
  pointer-events: none;
  opacity: 0;
  z-index: 9;
  animation: likeRingBurst 0.55s ease-out forwards;
}

@keyframes likeRingBurst {
  0%   { opacity: 0.8; transform: scale(0.5); border-color: var(--pet-primary); }
  50%  { opacity: 0.4; border-color: #FF8E53; }
  100% { opacity: 0; transform: scale(5.5); border-width: 0.5px; border-color: #FFE66D; }
}

/* ========== BOOKMARK BUTTON STATES & ANIMATION ========== */

.main-page .btn-bookmark {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--pet-text);
  padding: 4px 6px;
  position: relative;
  overflow: visible;
  transition: color 0.18s ease, transform 0.15s;
}

.main-page .btn-bookmark.is-bookmarked i {
  color: var(--pet-primary);
}

.main-page .btn-bookmark.is-animating i {
  animation: bookmarkBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bookmarkBounce {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.5) rotate(-8deg); }
  30%  { transform: scale(0.85); }
  45%  { transform: scale(1.25) rotate(4deg); }
  60%  { transform: scale(0.95); }
  75%  { transform: scale(1.08); }
  100% { transform: scale(1) rotate(0deg); }
}

.bookmark-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -6px 0 0 -6px;
  pointer-events: none;
  font-size: 0.65rem;
  opacity: 0;
  animation: likeParticleFly 0.7s ease-out forwards;
  z-index: 10;
  filter: drop-shadow(0 0 2px currentColor);
}

.bookmark-particle-outer {
  font-size: 0.5rem;
  animation: likeParticleOuter 0.85s ease-out forwards;
}

.bookmark-ring-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2.5px solid #4ECDC4;
  pointer-events: none;
  opacity: 0;
  z-index: 9;
  animation: bookmarkRingBurst 0.55s ease-out forwards;
}

@keyframes bookmarkRingBurst {
  0%   { opacity: 0.8; transform: scale(0.5); border-color: #4ECDC4; }
  50%  { opacity: 0.4; border-color: #45B7AA; }
  100% { opacity: 0; transform: scale(5.5); border-width: 0.5px; border-color: #96E6A1; }
}

.main-page .post-likes {
  padding: 0 14px 3px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.main-page .post-title {
  padding: 2px 14px 4px;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: color 0.15s;
}

.main-page .post-title:hover {
  color: var(--pet-primary);
}

.main-page .post-meta {
  padding: 2px 14px 4px;
  font-size: 0.75rem;
  color: var(--pet-text-muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.main-page .post-meta .post-likes {
  padding: 0;
  font-weight: 600;
  color: var(--pet-text);
  font-size: 0.8125rem;
}

.main-page .post-meta .post-views {
  color: var(--pet-text-muted);
}

.main-page .post-meta .post-comments {
  color: var(--pet-text-muted);
}

.main-page .post-meta .post-date {
  color: var(--pet-text-muted);
  font-size: 0.6875rem;
}

.main-page .post-caption {
  padding: 2px 14px 14px;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.main-page .post-detail-link {
  cursor: pointer;
}

.main-page .post-detail-link:focus-visible {
  outline: 2px solid var(--pet-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.main-page .post-caption .author {
  font-weight: 700;
  margin-right: 5px;
}

.main-page .post-contents-ellipsis {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ========== FEED EMPTY ========== */

.main-page .feed-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--pet-text-sub);
  grid-column: 1 / -1;
}

.main-page .feed-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  opacity: 0.55;
}

.main-page .feed-empty-msg {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.7;
}

.main-page .feed-empty .btn-add-post {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--pet-gradient);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.9375rem;
  box-shadow: 0 4px 16px rgba(255,107,107,0.30);
  transition: transform 0.2s, box-shadow 0.2s;
}

.main-page .feed-empty .btn-add-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255,107,107,0.40);
}


/* ========== BOTTOM NAV ========== */

.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 32px);
  max-width: 480px;
  height: 62px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 252, 250, 0.92);
  backdrop-filter: saturate(140%) blur(24px);
  -webkit-backdrop-filter: saturate(140%) blur(24px);
  border-radius: 40px;
  border: 1px solid var(--pet-border);
  box-shadow: 0 8px 32px rgba(214,120,90,0.13), 0 2px 10px rgba(0,0,0,0.09);
  z-index: 50;
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.38s ease;
}

.bottom-nav.nav-hidden {
  transform: translateX(-50%) translateY(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.bottom-nav a {
  color: var(--pet-text-muted);
  font-size: 1.28rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 46px;
  padding: 7px 14px 9px;
  border-radius: 14px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.bottom-nav a .nav-label {
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.bottom-nav a:hover {
  color: var(--pet-primary);
  background: var(--pet-primary-light);
}

.bottom-nav a.active {
  color: var(--pet-primary);
}

.bottom-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 20px;
  height: 3px;
  background: var(--pet-gradient);
  border-radius: 2px;
}

.nav-profile-avatar {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  object-fit: cover;
}
.bottom-nav a.active .nav-profile-avatar {
  border: 2px solid var(--pet-primary, #FF6B6B);
  box-sizing: content-box;
}

.bottom-nav a.nav-center-action {
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: none;
}

.bottom-nav a.nav-center-action::after {
  display: none;
}

.bottom-nav .nav-center-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pet-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.35);
  transform: translateY(-8px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bottom-nav a.nav-center-action:hover .nav-center-btn {
  transform: translateY(-10px);
  box-shadow: 0 6px 22px rgba(255, 107, 107, 0.45);
  background: var(--pet-gradient);
}

.bottom-nav a.nav-center-action:hover {
  background: none;
  color: #fff;
}

/* 하단 네비 포인트 배지 */
.nav-point-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--pet-primary);
  line-height: 1;
  margin-top: 1px;
  white-space: nowrap;
}

.nav-point-badge .petple-paw-coin {
  --paw-coin-size: 0.82rem;
  margin-right: 1px;
}

/* 포인트 토스트 알림 */
.point-toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 36px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.point-toast {
  background: var(--pet-text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--pet-shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  animation: ptToastIn .3s ease forwards;
  pointer-events: auto;
}
.point-toast.fade-out {
  animation: ptToastOut .3s ease forwards;
}
@keyframes ptToastIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ptToastOut {
  to { opacity: 0; transform: translateY(-8px); }
}
.point-toast .pt-amt {
  color: var(--pet-accent);
}

/* 출석 체크 모달 */
.daily-check-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
.daily-check-overlay.active {
  display: flex;
}
.daily-check-modal {
  background: #fff;
  border-radius: var(--pet-radius);
  padding: 32px 28px 24px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  box-shadow: var(--pet-shadow-lg);
  animation: ptToastIn .3s ease;
}
.daily-check-modal .dc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.daily-check-modal .dc-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.daily-check-modal .dc-points {
  font-size: 15px;
  color: var(--pet-primary);
  font-weight: 600;
  margin-bottom: 12px;
}
.daily-check-modal .dc-info {
  font-size: 13px;
  color: var(--pet-text-sub);
  margin-bottom: 16px;
  line-height: 1.5;
}
.daily-check-modal .dc-btn {
  display: inline-block;
  background: var(--pet-gradient);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 36px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Loading indicator for infinite scroll */
.main-load-more {
  text-align: center;
  padding: 20px 0;
}

.main-load-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--pet-border);
  border-top-color: var(--pet-primary);
  border-radius: 50%;
  animation: main-spin 0.7s linear infinite;
  margin: 0 auto;
}

/* Pull-to-refresh indicator */
.main-page .pull-refresh-indicator {
  height: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--pet-text-sub);
  font-size: 0.8125rem;
  font-weight: 700;
  transform: translateY(0);
  transition: transform 0.24s ease-out, opacity 0.18s ease-out;
  will-change: transform, opacity;
  z-index: 1;
}

.main-page .pull-refresh-indicator[hidden] {
  display: none !important;
}

.main-page .pull-refresh-indicator.pulling,
.main-page .pull-refresh-indicator.ready,
.main-page .pull-refresh-indicator.refreshing {
  opacity: 1;
}

.main-page .pull-refresh-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 142, 83, 0.20);
  border-top-color: #ff8e53;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 14px rgba(255, 142, 83, 0.20);
  transform: rotate(0deg);
}

.main-page .pull-refresh-indicator.pulling .pull-refresh-spinner {
  transition: transform 0.12s linear;
}

.main-page .pull-refresh-indicator.ready .pull-refresh-spinner,
.main-page .pull-refresh-indicator.refreshing .pull-refresh-spinner {
  animation: main-spin 0.7s linear infinite;
}

.main-page .pull-refresh-indicator.ready .pull-refresh-text,
.main-page .pull-refresh-indicator.refreshing .pull-refresh-text {
  color: var(--pet-primary);
}

.main-page .feed {
  will-change: auto;
}

.main-page .pull-refresh-indicator.pulling ~ .feed,
.main-page .pull-refresh-indicator.ready ~ .feed,
.main-page .pull-refresh-indicator.refreshing ~ .feed {
  will-change: transform;
}

body.main-page.is-pulling-refresh,
body.main-page.is-refreshing-feed {
  overscroll-behavior-y: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

@keyframes main-spin {
  to { transform: rotate(360deg); }
}


/* ========== COMMENT MODAL ========== */

.comment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.34s;
}

.comment-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.comment-modal {
  width: 100%;
  max-width: 520px;
  height: 70vh;
  max-height: 70vh;
  background: var(--pet-card);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  transform: translateY(28px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.comment-modal-overlay.active .comment-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.comment-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid var(--pet-border);
  position: relative;
  flex-shrink: 0;
}

.comment-modal-title {
  font-weight: 700;
  font-size: 1rem;
}

.comment-modal-close {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--pet-text-muted);
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.comment-modal-close:hover {
  background: var(--pet-bg);
  color: var(--pet-text);
}

.comment-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.comment-empty,
.comment-loading {
  text-align: center;
  padding: 40px 0;
  color: var(--pet-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.comment-item.comment-reply {
  margin-bottom: 12px;
}

.comment-avatar-wrap {
  flex-shrink: 0;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pet-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  overflow: hidden;
}
.comment-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.comment-reply .comment-avatar {
  width: 26px;
  height: 26px;
  font-size: 0.6875rem;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.comment-like-btn {
    position: relative;
    overflow: visible;
    flex: 0 0 36px;
    min-width: 36px;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--pet-text-muted);
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 0;
    line-height: 1;
}

.comment-like-btn.is-liked i,
.fs-comment-like-btn.is-liked i {
    color: var(--pet-primary, #FF6B6B);
}

.comment-like-btn.is-animating i,
.fs-comment-like-btn.is-animating i {
    animation: likeHeartBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comment-like-count,
.fs-comment-like-count {
    font-size: 0.6875rem;
    color: var(--pet-text-muted);
}

.comment-nick {
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.comment-time {
  font-size: 0.6875rem;
  color: var(--pet-text-muted);
  white-space: nowrap;
}

.comment-like-preview-stack {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 1px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
}

.comment-like-preview-avatar,
.comment-like-preview-more {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(20, 30, 40, 0.14);
}

.comment-like-preview-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--pet-gradient);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
}

.comment-like-preview-avatar + .comment-like-preview-avatar,
.comment-like-preview-more {
  margin-left: -7px;
}

.comment-like-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.comment-like-preview-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f5;
  color: #7b838a;
  font-size: 0.625rem;
  font-weight: 900;
  line-height: 1;
}

.comment-like-users-layer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.35);
}

.comment-like-users-layer.active {
  display: flex;
}

.comment-like-users-panel {
  position: relative;
  width: min(316px, 100%);
  max-height: min(420px, 80vh);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255, 107, 107, 0.20);
  box-shadow: 0 16px 42px rgba(255, 107, 107, 0.16), 0 6px 18px rgba(45, 52, 54, 0.10);
}

.comment-like-users-panel h3 {
  margin: 0;
  padding: 15px 44px 12px 16px;
  background: linear-gradient(135deg, #ffecec 0%, #fff4ec 100%);
  border-bottom: 1px solid #ffd8d1;
  font-size: 0.9375rem;
  font-weight: 900;
  color: var(--pet-text, #2D3436);
}

.comment-like-users-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--pet-text-muted, #8b949e);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 52, 54, 0.08);
}

.comment-like-users-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 9px 10px 12px;
}

.comment-like-user-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 9px;
  border: 1px solid #f4efed;
  border-radius: 12px;
  background: #fff;
  color: var(--pet-text, #2D3436);
  cursor: pointer;
  text-align: left;
  margin-bottom: 7px;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}

.comment-like-user-row:last-child {
  margin-bottom: 0;
}

.comment-like-user-row:nth-child(even) {
  background: #fffafa;
}

.comment-like-user-row:hover {
  background: #fff6f6;
  border-color: rgba(255, 107, 107, 0.24);
  transform: translateY(-1px);
}

.comment-like-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--pet-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.comment-like-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-like-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 700;
}

.comment-like-user-action {
  margin-left: auto;
  color: var(--pet-text-muted, #B2BEC3);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.comment-like-users-empty {
  padding: 20px 12px;
  color: var(--pet-text-muted, #8b949e);
  font-size: 0.8125rem;
  text-align: center;
}

.comment-text {
  margin-top: 3px;
  font-size: 0.8125rem;
  word-break: break-word;
  line-height: 1.5;
}

.comment-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--pet-text-muted);
}

.comment-reply-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--pet-text-muted);
  font-weight: 600;
  padding: 0;
  transition: color 0.15s;
}

.comment-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--pet-text-muted);
  font-weight: 600;
  padding: 0;
  transition: color 0.15s;
}
.comment-delete-btn:hover {
    color: var(--pet-primary);
}

.comment-report-btn {
    background: none;
    border: none;
    color: var(--pet-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
}

.comment-report-btn:hover {
    color: var(--pet-primary);
}
.comment-reply-btn:hover {
  color: var(--pet-primary);
}

.comment-replies {
  margin-left: 44px;
}

.comment-reply-indicator {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--pet-gradient-soft);
  font-size: 0.8125rem;
  color: var(--pet-text-sub);
  flex-shrink: 0;
}

.comment-reply-indicator.active {
  display: flex;
}

.comment-reply-cancel {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pet-text-muted);
  font-size: 0.75rem;
  padding: 4px 6px;
  border-radius: 50%;
  transition: background 0.2s;
}

.comment-reply-cancel:hover {
  background: rgba(0,0,0,0.06);
}

.comment-input-area {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--pet-border);
  gap: 10px;
  flex-shrink: 0;
}

.comment-text-input {
  flex: 1;
  border: 1px solid var(--pet-border);
  border-radius: 24px;
  outline: none;
  font-size: 0.875rem;
  padding: 10px 16px;
  background: var(--pet-bg);
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.comment-text-input:focus {
  border-color: var(--pet-primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--pet-primary-light);
}

.comment-submit {
  border: none;
  background: var(--pet-gradient);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 0.875rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.15s;
}

.comment-submit:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.comment-submit:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}


/* ========== FULLSCREEN IMAGE VIEWER ========== */

.fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: none;
  flex-direction: column;
  overscroll-behavior: contain;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.fs-overlay.active { display: flex; }

.fs-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
}

.fs-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.fs-close:hover { background: rgba(255,255,255,0.28); }

.fs-counter {
  margin-left: auto;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(0,0,0,0.4);
  padding: 4px 14px;
  border-radius: 14px;
}

.fs-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fs-slider {
  flex-shrink: 0;
  width: 100%;
  height: clamp(220px, 60vh, 78vh);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  margin-top: 56px;
  will-change: height;
  transition: height 520ms cubic-bezier(0.16, 1, 0.3, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.fs-slider.is-resizing {
  transition-duration: 0ms;
}

.fs-slider.is-gesturing {
  transition: none;
}

.fs-slider-track {
  display: flex;
  align-items: flex-start;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.fs-slider-slide {
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.fs-slider-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 0.9;
  transform: scale(0.985);
  filter: saturate(0.96);
  transition:
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 480ms ease,
    filter 520ms ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.fs-slider-slide.is-active img {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1);
}

.fs-slider-slide.is-entering img {
  opacity: 0.92;
  transform: scale(1.02);
}

.fs-slider.is-gesturing .fs-slider-slide img,
.fs-overlay.is-gesturing .fs-slider-slide img {
  transition: none;
  filter: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.fs-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 215;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.fs-nav:hover { background: rgba(255,255,255,0.30); }
.fs-nav-prev { left: 12px; }
.fs-nav-next { right: 12px; }
.fs-nav.hidden { display: none; }

.fs-info {
  flex-shrink: 0;
  padding: 20px 16px 40px;
  color: #fafafa;
}

.fs-info-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fs-info-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.18);
}

.fs-info-name {
  font-weight: 700;
  font-size: 0.9375rem;
}

.fs-info-date {
  font-size: 0.75rem;
  color: #8e8e8e;
  margin-left: auto;
}

.fs-info-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.fs-info-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #d0d0d0;
  white-space: pre-wrap;
  word-break: break-word;
}

.fs-info-meta {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: #8e8e8e;
  display: flex;
  gap: 14px;
}

/* ── 풀스크린 댓글 ── */
.fs-comments-section { margin-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 12px; }
.fs-comments-header { font-size: 0.875rem; font-weight: 600; color: #ccc; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.fs-comments-list { max-height: 200px; overflow-y: auto; }
.fs-comments-loading, .fs-comments-empty { font-size: 0.8125rem; color: #8e8e8e; text-align: center; padding: 16px 0; }
.fs-comment-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; }
.fs-comment-item.fs-comment-reply { margin-left: 28px; }
.fs-comment-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--pet-primary, #FF6B6B); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.fs-comment-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fs-comment-body { flex: 1; min-width: 0; }
.fs-comment-header { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.fs-comment-nick { font-weight: 600; font-size: 0.8125rem; color: #e0e0e0; white-space: nowrap; }
.fs-comment-text { margin-top: 3px; font-size: 0.8125rem; color: #ccc; word-break: break-word; line-height: 1.45; }
.fs-comment-time { font-size: 0.6875rem; color: #666; white-space: nowrap; }
.fs-comment-input-wrap { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.fs-comment-input { flex: 1; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 8px 14px; color: #e0e0e0; font-size: 0.8125rem; outline: none; transition: border-color 0.2s; }
.fs-comment-input::placeholder { color: #666; }
.fs-comment-input:focus { border-color: var(--pet-primary, #FF6B6B); }
.fs-comment-send { background: var(--pet-primary, #FF6B6B); border: none; border-radius: 50%; width: 34px; height: 34px; color: #fff; font-size: 0.8125rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: opacity 0.2s; }
.fs-comment-send:disabled { opacity: 0.5; cursor: default; }
.fs-comment-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.fs-comment-reply-btn { background: none; border: none; color: #888; font-size: 0.6875rem; cursor: pointer; padding: 0; }
.fs-comment-reply-btn:hover { color: var(--pet-primary, #FF6B6B); }
.fs-comment-delete-btn { background: none; border: none; color: #888; font-size: 0.6875rem; cursor: pointer; padding: 0; }
.fs-comment-delete-btn:hover { color: var(--pet-primary, #FF6B6B); }
.fs-comment-report-btn { background: none; border: none; color: #888; font-size: 0.6875rem; cursor: pointer; padding: 0; }
.fs-comment-report-btn:hover { color: var(--pet-primary, #FF6B6B); }
.fs-comment-like-btn { position: relative; overflow: visible; flex: 0 0 30px; margin-left: auto; border: 0; background: transparent; color: #888; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0 0; line-height: 1; }
.fs-reply-indicator { display: none; align-items: center; justify-content: space-between; padding: 6px 12px; background: rgba(255,107,107,0.12); border-radius: 8px; margin-top: 8px; font-size: 0.75rem; color: var(--pet-primary, #FF6B6B); }
.fs-reply-indicator.active { display: flex; }
.fs-reply-indicator button { background: none; border: none; color: var(--pet-primary, #FF6B6B); cursor: pointer; font-size: 0.8125rem; padding: 0 2px; }


/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Small tablets (640px+) — 2-column grid */
@media (min-width: 640px) {
  .main-page .header {
    padding: 0 24px;
    height: 60px;
    border-radius: 0 0 20px 20px;
  }

  .main-page .header-logo {
    font-size: 1.3rem;
  }

  .main-page .stories-wrap {
    margin: 0 12px;
    border-radius: 0 0 20px 20px;
  }

  .main-page .stories-scroll {
    padding: 0 20px;
  }

  .main-page .feed {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
    gap: 20px;
  }

  .comment-modal {
    max-width: 480px;
    border-radius: 24px;
  }
}

/* Landscape tablets / small desktops (1024px+) — 3-column grid */
@media (min-width: 1024px) {
  .main-page .header {
    padding: 0 32px;
    height: 64px;
  }

  .main-page .header-logo {
    font-size: 1.4rem;
    gap: 10px;
  }

  .main-page .header-logo .logo-icon {
    width: 2.7rem;
    height: 2.7rem;
  }

  .main-page .stories-wrap {
    margin: 0 20px;
  }

  .main-page .stories-scroll {
    padding: 0 24px;
    gap: 16px;
  }

  .main-page .feed {
    grid-template-columns: repeat(3, 1fr);
    padding: 24px;
    gap: 24px;
  }

  .bottom-nav a {
    padding: 7px 22px 9px;
  }
}

/* Large desktops (1440px+) — 4-column grid */
@media (min-width: 1440px) {
  .main-page .feed {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 28px;
  }
}

/* Compact mobile (up to 380px) */
@media (max-width: 380px) {
  .bottom-nav {
    width: calc(100% - 20px);
    padding: 0 6px;
    height: 58px;
    border-radius: 32px;
  }

  .bottom-nav a {
    padding: 6px 8px 8px;
    gap: 4px;
    min-height: 44px;
  }

  .bottom-nav a .nav-label {
    font-size: 0.625rem;
    letter-spacing: 0.01em;
  }

  .bottom-nav a.active::after {
    bottom: 3px;
    width: 16px;
  }

  .main-page .post-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .main-page .post-author-avatar {
    width: 30px;
    height: 30px;
  }

  .main-page .post-actions {
    padding: 6px 8px 2px;
  }

  .main-page .post-caption,
  .main-page .post-meta,
  .main-page .post-title,
  .main-page .post-likes {
    padding-left: 12px;
    padding-right: 12px;
  }

  .main-page .feed {
    padding: 10px;
    gap: 12px;
  }

  .comment-replies {
    margin-left: 32px;
  }
}

/* ============================================================
 * 프로필 모달
 * ============================================================ */
.profile-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.34s;
}
.profile-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.profile-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 360px;
  width: 90%;
  padding: 24px;
  position: relative;
  transform: translateY(16px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-modal-overlay.active .profile-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.profile-modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none;
  font-size: 18px; color: var(--pet-text-sub);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.profile-modal-close:hover { background: var(--pet-bg); }

.profile-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-modal-avatar-wrap { flex-shrink: 0; }

.profile-modal-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pet-primary-light, #FFB5B5);
}

.profile-modal-info { flex: 1; min-width: 0; }

.profile-modal-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--pet-text);
  display: block;
  margin-bottom: 8px;
}

.profile-modal-stats {
  display: flex;
  gap: 16px;
}

.profile-stat {
  font-size: 13px;
  color: var(--pet-text-sub);
  text-align: center;
}
.profile-stat strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--pet-text);
}

/* 팔로우 버튼 */
.profile-modal-follow-wrap {
  margin-bottom: 16px;
}
.profile-follow-btn {
  padding: 7px 20px;
  border-radius: 20px;
  background: var(--pet-gradient, linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%));
  color: #fff;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.profile-follow-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,107,107,0.18);
}
.profile-follow-btn:active {
  transform: scale(0.96);
}
.profile-follow-btn.following {
  background: var(--pet-card, #fff);
  color: var(--pet-text-sub, #888);
  border: 1.5px solid var(--pet-border, #E8E8E8);
}
.profile-follow-btn.following:hover {
  border-color: #FF6B6B;
  color: #FF6B6B;
}
.profile-modal-follow-wrap .profile-follow-btn {
  width: 100%;
}

/* 펫 슬라이드 */
.profile-modal-pets {
  margin-bottom: 16px;
}
.profile-modal-pets-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pet-text);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-modal-pets-scroll {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.profile-modal-pets-scroll::-webkit-scrollbar { height: 4px; }
.profile-modal-pets-scroll::-webkit-scrollbar-thumb {
  background: var(--pet-primary-light, #FFB5B5);
  border-radius: 4px;
}
.profile-pet-card {
  min-width: 90px;
  flex: 0 0 90px;
  scroll-snap-align: start;
  text-align: center;
}
.profile-pet-img {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pet-bg);
  margin-bottom: 4px;
}
.profile-pet-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--pet-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-pet-kind {
  font-size: 11px;
  color: var(--pet-text-sub);
}

/* 펫 없음 */
.profile-modal-pets-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--pet-bg);
  border-radius: 10px;
  margin-bottom: 16px;
  color: var(--pet-text-sub);
  font-size: 13px;
}
.profile-modal-pets-empty .petple-paw-coin {
  opacity: 0.78;
}

/* 액션 버튼 */
.profile-modal-actions {
  display: flex;
  gap: 10px;
}
.profile-modal-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.profile-modal-btn-posts {
  background: var(--pet-gradient, linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%));
  color: #fff;
}
.profile-modal-btn-dm {
  background: var(--pet-bg);
  color: var(--pet-text);
  border: 1px solid var(--pet-border, #E8E8E8);
}
.profile-modal-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ============================================================
 * 사용자 게시물 페이지 — 프로필 영역
 * ============================================================ */
.user-profile-section {
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: var(--pet-card);
  border-bottom: 1px solid var(--pet-border, #E8E8E8);
  gap: 14px;
}

/* 상단: 아바타 + 통계 */
.user-profile-top {
  display: flex;
  align-items: center;
  gap: 20px;
}
.user-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pet-primary-light, #FFB5B5);
  flex-shrink: 0;
}
.user-profile-stats {
  display: flex;
  flex: 1;
  justify-content: space-around;
  text-align: center;
}
.user-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.user-stat-item strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--pet-text);
  line-height: 1.2;
}
.user-stat-item span {
  font-size: 12px;
  color: var(--pet-text-sub);
  line-height: 1.2;
}

/* 하단: 닉네임 + 팔로우 버튼 */
.user-profile-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-profile-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.user-profile-bottom .profile-follow-btn {
  flex: 1;
}
.user-profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--pet-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-profile-id {
  font-size: 13px;
  color: var(--pet-text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 반응형 조정 */
@media (max-width: 400px) {
  .user-profile-top { gap: 14px; }
  .user-profile-avatar { width: 60px; height: 60px; }
  .user-stat-item strong { font-size: 15px; }
  .user-stat-item span { font-size: 11px; }
}

/* === 팔로우 리스트 === */
.follow-tabs {
  display: flex;
  border-bottom: 1px solid var(--pet-border, #E8E8E8);
  background: var(--pet-card, #fff);
}
.follow-tabs a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--pet-text-sub, #888);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.follow-tabs a.active {
  color: var(--pet-primary, #FF6B6B);
  border-bottom-color: var(--pet-primary, #FF6B6B);
}
.follow-list {
  padding: 4px 0;
}
.follow-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.follow-list-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}
.follow-list-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}
.follow-list-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--pet-text, #333);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.follow-list-id {
  font-size: 12px;
  color: var(--pet-text-sub, #888);
}
.follow-list-dm-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--pet-border, #E8E8E8);
  background: var(--pet-card, #fff);
  color: var(--pet-text-sub, #888);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.follow-list-dm-btn:hover {
  border-color: var(--pet-primary, #FF6B6B);
  color: var(--pet-primary, #FF6B6B);
}
.follow-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 16px;
  color: var(--pet-text-muted, #bbb);
}
.follow-list-empty i {
  font-size: 48px;
}
.follow-list-empty p {
  font-size: 14px;
}
@media (max-width: 400px) {
  .follow-list-avatar {
    width: 40px;
    height: 40px;
  }
  .follow-list-item {
    gap: 10px;
    padding: 8px 12px;
  }
}

/* ========== GLOBAL TOAST ========== */
.app-toast {
  position: fixed;
  bottom: calc(var(--nav-h, 60px) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--pet-text, #2D3436);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.app-toast-success { background: #27ae60; }
.app-toast-error   { background: var(--pet-primary-dark, #E85555); }

@media (prefers-reduced-motion: reduce) {
  .comment-modal-overlay,
  .comment-modal,
  .profile-modal-overlay,
  .profile-modal {
    transition-duration: 0.01ms !important;
  }
}

/* ===== 배너 모달 ===== */
.banner-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.34s;
}
.banner-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}
.banner-modal-dialog {
  background: var(--pet-card, #fff);
  border-radius: 16px;
  max-width: 380px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(16px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.banner-modal-overlay.active .banner-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.banner-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--pet-border, #EDE9E6);
}
.banner-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pet-text, #2D3436);
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.banner-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--pet-text-muted, #B2BEC3);
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}
.banner-modal-body {
  padding: 16px 20px;
}
.banner-modal-img-wrap {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
}
.banner-modal-img {
  width: 100%;
  height: auto;
  display: block;
}
.banner-modal-text {
  font-size: 14px;
  color: var(--pet-text-sub, #636E72);
  line-height: 1.6;
  margin: 0;
  white-space: pre-line;
}
.banner-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--pet-border, #EDE9E6);
}
.banner-dismiss-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--pet-text-muted, #B2BEC3);
  cursor: pointer;
}
.banner-dismiss-label input[type="checkbox"] {
  accent-color: var(--pet-primary, #FF6B6B);
}
.banner-modal-ok {
  padding: 8px 20px;
  border: none;
  border-radius: 10px;
  background: var(--pet-primary, #FF6B6B);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   피드 가로 슬라이드 (팔로잉 / 인기) — 전체 5장마다 삽입
   ============================================================ */
.main-page .feed-rail {
  /* 그리드(다열) 안에서도 한 줄 전체를 차지 */
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0 4px;
}
.main-page .feed-rail-track {
  max-width: 100%;
}
.main-page .feed-rail-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 2px 8px;
}
.main-page .feed-rail-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--pet-text);
  letter-spacing: -0.01em;
}
.main-page .feed-rail-hint {
  font-size: 0.72rem;
  color: var(--pet-text-muted);
}
.main-page .feed-rail-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}
.main-page .feed-rail-track::-webkit-scrollbar {
  display: none;
}
.main-page .rail-card {
  flex: 0 0 132px;
  width: 132px;
  scroll-snap-align: start;
  background: var(--pet-card);
  border: 1px solid var(--pet-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--pet-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) {
  .main-page .rail-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pet-shadow);
  }
}
.main-page .rail-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f0edeb;
  overflow: hidden;
}
.main-page .rail-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.main-page .rail-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.92);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  backdrop-filter: blur(2px);
}
.main-page .rail-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
}
.main-page .rail-card-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--pet-primary-light);
  flex-shrink: 0;
}
.main-page .rail-card-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pet-text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 피드 빈 상태 */
.main-page .feed-empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--pet-text-sub, #999);
}
.main-page .feed-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: var(--pet-border, #ddd);
}
.main-page .feed-empty p {
  font-size: 15px;
  margin: 0 0 6px;
  font-weight: 600;
}
.main-page .feed-empty span {
  font-size: 13px;
}

.main-search-results {
  padding: 0 16px 16px;
}

.main-search-results.main-search-visible {
  animation: cm-search-fadein 0.35s ease forwards;
}

/* ── 오늘의 미션 플로팅 위젯 ── */
.mission-float {
  position: fixed;
  bottom: calc(56px + 16px);
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.35s ease,
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.35s;
}
.mission-float > * {
  pointer-events: auto;
}

.mission-float.float-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: opacity 0.35s ease,
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.35s;
}

.mission-float-card {
  width: 238px;
  background: #fff;
  border-radius: 20px 20px 18px 20px;
  box-shadow: 0 16px 34px rgba(255, 90, 54, 0.18), 0 6px 14px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(255, 122, 89, 0.22);
  overflow: visible;
  position: relative;
  cursor: grab;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease,
              transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.22s;
}

.mission-float-card.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.22s ease,
              transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s;
}

.mission-float-card::before {
  content: '';
  position: absolute;
  bottom: -17px;
  right: 17px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 9px solid transparent;
  border-top: 17px solid rgba(255, 122, 89, 0.24);
  filter: drop-shadow(0 6px 6px rgba(15, 23, 42, 0.10));
}

.mission-float-card::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: 18px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 8px solid transparent;
  border-top: 16px solid #fff;
}

.mission-float-card a,
.mission-float-card button {
  cursor: pointer;
}


.mission-float-fab {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff7a59, #ff5a36);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(255, 90, 54, 0.5);
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
  transition: transform 0.15s;
}

.mission-float-fab:active {
  transform: scale(0.92);
}

.mission-float-fab-clip {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mission-float-fab-img {
  width: 145%;
  height: 145%;
  object-fit: cover;
  display: block;
  max-width: none;
  flex-shrink: 0;
}

.mission-float-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  background: #ef4444;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 0.6rem;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
  z-index: 1;
}

.mission-float-fab-badge:empty {
  display: none;
}

.mission-float-card-header {
  padding: 11px 15px;
  background: linear-gradient(90deg, #ff7a59, #ff5a36);
  border-radius: 19px 19px 0 0;
}

.mission-float-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}

.mission-float-card-body {
  padding: 14px 13px 8px;
  position: relative;
  border-radius: 0 0 17px 19px;
  background: #fff;
  overflow: hidden;
}

.mission-float-viewport {
  overflow: hidden;
}

.mission-float-track {
  display: flex;
  will-change: transform;
}

.mission-float-item {
  min-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
}

.mission-float-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 10px;
  word-break: keep-all;
}

.mission-float-pbar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.mission-float-pfill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff7a59, #ff5a36);
  transition: width 0.4s ease;
}

.mission-float-pfill.is-complete {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.mission-float-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mission-float-meta span:first-child {
  font-size: 0.76rem;
  color: #94a3b8;
}

.mission-float-reward-badge {
  background: #fff0eb;
  color: #ff5a36;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
}

.mission-float-reward-badge.is-complete {
  background: #dcfce7;
  color: #16a34a;
}

.mission-float-complete-msg {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  padding: 4px 0 6px;
}

.mission-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  background: linear-gradient(90deg, #ff7a59, #ff5a36);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 5px;
  position: relative;
  z-index: 2;
}

.mission-float-btn-ghost {
  display: block;
  text-align: center;
  width: 100%;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.mission-float-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}

.mission-float-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: all 0.2s;
}

.mission-float-dot.active {
  background: #ff7a59;
  width: 12px;
  border-radius: 3px;
}
