/* quote-pocket.css — 격언 주머니(Quote Pocket)
 * 헤더 pill 배지 + 카드 스택 모달. 앱 팔레트(index.css 토큰) 재사용.
 * 카드는 남은 "여운"에 따라 opacity 가 옅어지고, 곧 사라질 격언은 상단으로 떠오른다. */

/* ── 헤더 pill ──────────────────────────────────────────────────────────── */
.home-quote-pocket-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  border: none;
  border-radius: var(--radius-full, 999px);
  background: transparent;
  color: var(--color-text-secondary, #4E4A42);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.home-quote-pocket-btn:hover { background: var(--color-bg-soft, #F3F8F1); color: var(--color-brand-primary-strong, #315F40); }
.home-quote-pocket-btn:active { transform: scale(0.94); }

/* ── 모달 ─────────────────────────────────────────────────────────────── */
.qp-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.qp-modal__scrim {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  background: rgba(36, 34, 29, 0.42);
  cursor: pointer;
  animation: qp-fade 0.2s ease;
}
.qp-sheet {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-app, #FAF7EF);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-floating, 0 18px 48px rgba(36, 34, 29, 0.16));
  animation: qp-rise 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
@media (min-width: 640px) {
  .qp-modal { align-items: center; }
  .qp-sheet { border-radius: 20px; max-height: 78vh; }
}

.qp-sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 18px 12px;
  border-bottom: 1px solid var(--color-border-soft, rgba(78, 74, 66, 0.12));
}
.qp-sheet__titles { flex: 1; min-width: 0; }
.qp-sheet__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary, #24221D);
}
.qp-sheet__sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted, #8A8578);
}
.qp-sheet__close {
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: var(--color-bg-sunken, #F8F7F3);
  color: var(--color-text-secondary, #4E4A42);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.qp-sheet__close:hover { background: var(--color-border-soft, rgba(78, 74, 66, 0.12)); }

.qp-sheet__clear {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--color-bg-sunken, #F8F7F3);
  color: var(--color-text-secondary, #4E4A42);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.qp-sheet__clear:hover { background: rgba(185, 28, 28, 0.1); color: #B91C1C; }

.qp-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  -webkit-overflow-scrolling: touch;
}

/* ── 여운(남은 일수) 그룹 ─────────────────────────────────────────────────
 * 카드마다 반복하던 "N일 남음" 배지를 그룹당 한 번, 좌측 정렬로만 보여준다. */
.qp-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qp-group__label {
  margin: 0;
  padding-left: 2px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  color: var(--color-text-muted, #8A8578);
}
.qp-group__label--soon { color: #854F0B; }

/* ── 카드 ─────────────────────────────────────────────────────────────── */
.qp-card {
  background: var(--color-bg-card, #FFFDF7);
  border: 1px solid var(--color-border-soft, rgba(78, 74, 66, 0.12));
  border-radius: 14px;
  padding: 13px 15px 12px;
  transition: opacity 0.25s ease, box-shadow 0.15s ease;
}
.qp-card--soon {
  border-color: rgba(186, 117, 23, 0.4);
  box-shadow: 0 2px 14px rgba(186, 117, 23, 0.1);
}
.qp-card--pinned {
  border-color: var(--color-border-strong, rgba(49, 95, 64, 0.24));
  background: var(--color-brand-soft, #E4F0E1);
}

.qp-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.qp-card__src {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.qp-card__quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text-primary, #24221D);
  font-family: 'Pretendard', -apple-system, sans-serif;
}
.qp-card__author {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  color: var(--color-text-muted, #8A8578);
}
/* ── 빈 상태 / 로딩 ─────────────────────────────────────────────────────── */
.qp-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-muted, #8A8578);
  font-size: 13px;
}
.qp-empty__title { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--color-text-secondary, #4E4A42); }
.qp-empty__hint { margin: 0; font-size: 12px; line-height: 1.5; }

@keyframes qp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qp-rise { from { transform: translateY(16px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }
