/* ===== 홈(index.html) 전용 앱셸 스킨 — "버터 모닝" 리뉴얼 (2026-06) ===== */
/* 기존 home-skin.css 드롭인 교체본. 셀렉터/구조/JS 훅 전부 보존, 시각+연출만 교체. */
/* 홈 시그니처 연출:
   ① 스캘럽(물결) 헤더 마감 + 형광펜 인사말
   ② 오늘의 후추 = 폴라로이드 + 마스킹테이프 + 후추 빼꼼 🦎
   ③ D-day 히어로 = 펀칭홀 티켓 🎟️
   ④ 홈 카드 = 살짝 기운 스티커 + 폭신 스태거 등장
   ⑤ 플로팅 알약 탭바  (퀵바 ⚡ 살랑임은 style.css 공통) */

/* ----- Phone shell ----- */
.app-shell {
  max-width: 380px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--color-bg);
  background-image: var(--bm-noise);
  position: relative;
  padding-bottom: 96px;
  overflow-x: hidden;
}

@media (min-width: 600px) {
  body:has(.app-shell) {
    background: var(--color-bg-secondary);
    padding: 24px 0;
  }
  .app-shell {
    box-shadow: 0 18px 40px rgba(90, 75, 40, 0.16);
    border: 1px solid var(--bm-line-strong);
    border-radius: 32px;
    overflow: hidden;
    min-height: calc(100vh - 48px);
  }
  [data-theme="dark"] .app-shell {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    border-color: #14100a;
  }
}

/* ----- Tab panels (폭신한 등장) ----- */
.tab-panel {
  display: none;
  animation: tabFadeIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tab-panel.active {
  display: block;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ----- 하단 탭바 — 플로팅 알약 (시그니처 ⑤) ----- */
.hb-tabbar {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 352px;
  background: var(--color-surface);
  border: 2px solid var(--bm-line);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-tabbar), 0 14px 30px rgba(90, 75, 40, 0.14);
  display: flex;
  align-items: center;
  padding: 7px 8px;
  gap: 2px;
  z-index: 100;
}
@media (min-width: 600px) {
  .hb-tabbar { bottom: 36px; }
}
.hb-tab {
  flex: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--muted);
  font-family: inherit;
  padding: 5px 0;
  border-radius: var(--r-pill);
  transition: color 0.2s ease, transform 0.2s var(--bm-spring), background 0.2s ease;
}
.hb-tab:hover { transform: translateY(-2px); }
.hb-tab:active { transform: scale(0.94); }
.hb-tab.active {
  color: var(--ink);
  background: var(--butter);
  padding: 8px 0;
}
.hb-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 22px;
  border-radius: 0;
  font-size: 19px;
  background: transparent;
  filter: saturate(0.65);
  opacity: 0.8;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.hb-tab.active .hb-tab-icon {
  background: transparent;
  filter: none;
  opacity: 1;
}
.hb-tab-label {
  font-size: 9.5px;
  font-weight: 700;
}
.hb-tab.active .hb-tab-label {
  font-weight: 800;
  font-size: 10.5px;
}

[data-theme="dark"] .hb-tabbar {
  background: var(--color-surface);
  border-color: var(--bm-line);
  box-shadow: var(--sh-tabbar), 0 14px 30px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .hb-tab.active { color: #ffe9ad; }

/* ----- 퀵바 위치 조정 (탭바 위로) ----- */
.app-shell ~ .quickbar,
body:has(.app-shell) .quickbar {
  bottom: 88px !important;
}

/* ============================================================
   1. 모바일 헤더 — 버터 그라데이션 + 스캘럽 마감 (시그니처 ①)
   ============================================================ */
.app-shell > .header {
  background: var(--bm-header-grad) !important;
  color: var(--bm-header-ink) !important;
  padding: 15px 16px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  position: relative !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin: 0 0 11px !important;
}
.app-shell > .header::before { display: none !important; }
/* 스캘럽 물결 마감 — 종이를 오려 붙인 느낌 */
.app-shell > .header::after {
  content: '';
  display: block !important;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 11px;
  background: var(--bm-header-grad);
  -webkit-mask-image: radial-gradient(circle at 14px 0, #000 11px, transparent 12px);
  mask-image: radial-gradient(circle at 14px 0, #000 11px, transparent 12px);
  -webkit-mask-size: 28px 11px;
  mask-size: 28px 11px;
  pointer-events: none;
  z-index: 2;
}
.app-shell > .header .header-gecko {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.app-shell > .header .header-avatar {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 3px solid var(--color-surface);
  box-shadow: 0 3px 0 rgba(120, 90, 40, 0.18);
  transform: rotate(-4deg);
  transition: transform 0.25s var(--bm-spring);
}
.app-shell > .header .header-avatar:hover {
  transform: rotate(4deg) scale(1.08);
}
[data-theme="dark"] .app-shell > .header .header-avatar {
  border-color: #ffd98a;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.app-shell > .header .header-text {
  flex: 1;
  min-width: 0;
  text-align: left !important;
}
.app-shell > .header .header-title { display: none; }
/* 인사말 — 형광펜 마커 연출 */
.app-shell > .header .header-greeting {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--bm-header-ink) !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  line-height: 1.35 !important;
  text-shadow: none !important;
  width: fit-content;
  max-width: 100%;
  background-image: linear-gradient(transparent 64%, var(--bm-highlight) 64%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.app-shell > .header .header-date {
  font-size: 11px !important;
  color: var(--bm-header-sub) !important;
  font-weight: 700 !important;
  margin: 0 0 2px 0 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
.app-shell > .header .token-display {
  background: var(--color-surface) !important;
  color: var(--bm-header-ink) !important;
  padding: 5px 11px !important;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(120, 90, 40, 0.14);
  border: 2px solid var(--bm-line-strong) !important;
}
[data-theme="dark"] .app-shell > .header .token-display {
  background: var(--bm-chip-bg) !important;
  color: #ffe9ad !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.app-shell > .header .dark-toggle,
.app-shell > .header .nav-btn-header {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(120, 90, 40, 0.15) !important;
  background: rgba(255, 253, 245, 0.6) !important;
  font-size: 16px !important;
  color: var(--bm-header-ink) !important;
  box-shadow: none;
}
[data-theme="dark"] .app-shell > .header .dark-toggle,
[data-theme="dark"] .app-shell > .header .nav-btn-header {
  border-color: rgba(255, 233, 173, 0.25) !important;
  background: rgba(255, 233, 173, 0.12) !important;
}
/* 햄버거 메뉴는 2026-06에 완전 철거됨 — 전체 메뉴 접근은 퀵바 ⚡가 담당 */

/* ============================================================
   2. 컨테이너 / 섹션 베이스
   ============================================================ */
.app-shell .container {
  padding: 0 14px !important;
  max-width: none !important;
  margin: 0 !important;
}
.app-shell .section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 18px !important;
  animation: none;
}
.app-shell .section:first-child { margin-top: 0 !important; }
.app-shell .section-title {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  letter-spacing: -0.02em !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
  padding: 0 4px !important;
  background: transparent !important;
  border: none !important;
  text-shadow: none !important;
}
.app-shell .section-icon { font-size: 17px !important; }
.app-shell .collapse-arrow { display: none !important; }
.app-shell .section.collapsed > *:not(.section-title) {
  display: revert !important;
}
.hb-section-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 22px 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   3. Hero D-day card — 펀칭홀 티켓 🎟️ (시그니처 ③)
   ============================================================ */
.hb-hero-card {
  display: block;
  background: var(--bm-hero-grad);
  border-radius: var(--r-hero);
  padding: 18px 20px 16px;
  color: var(--bm-hero-ink);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  box-shadow: var(--sh-hero);
  text-decoration: none;
  margin-top: 14px;
  cursor: pointer;
  transition: transform 0.25s var(--bm-spring);
  animation: bmPopIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s backwards;
}
.hb-hero-card:hover { transform: translateY(-3px) rotate(-0.5deg); }
.hb-hero-card:active { transform: scale(0.97); }
/* 컨페티 도트 */
.hb-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 2.5px at 26px 20px, rgba(255, 255, 255, 0.6) 2.5px, transparent 3.5px),
    radial-gradient(circle 2px at 70px 48px, rgba(155, 107, 176, 0.4) 2px, transparent 3px),
    radial-gradient(circle 2.5px at 132px 12px, rgba(255, 255, 255, 0.5) 2.5px, transparent 3.5px),
    radial-gradient(circle 2px at 188px 40px, rgba(232, 93, 74, 0.35) 2px, transparent 3px);
  background-size: 215px 66px;
  pointer-events: none;
}
/* 티켓 절취선 + 펀칭홀 */
.hb-hero-card::after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 52px;
  border-top: 2px dashed rgba(120, 80, 30, 0.3);
  -webkit-mask-image: linear-gradient(90deg, transparent 0 8px, #000 8px calc(100% - 8px), transparent calc(100% - 8px));
  mask-image: linear-gradient(90deg, transparent 0 8px, #000 8px calc(100% - 8px), transparent calc(100% - 8px));
  pointer-events: none;
}
[data-theme="dark"] .hb-hero-card::after {
  border-top-color: rgba(255, 233, 173, 0.28);
}
.hb-hero-emoji-bg {
  position: absolute;
  top: -18px;
  right: -8px;
  font-size: 110px;
  opacity: 0.3;
  line-height: 1;
  animation: hbHeroFloat 4s ease-in-out infinite;
}
[data-theme="dark"] .hb-hero-emoji-bg { opacity: 0.22; }
@keyframes hbHeroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(3deg); }
}
.hb-hero-tag {
  display: inline-block;
  background: rgba(255, 253, 245, 0.66);
  color: #7a5620;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin-bottom: 10px;
  position: relative;
}
[data-theme="dark"] .hb-hero-tag {
  background: rgba(255, 233, 173, 0.18);
  color: #ffe9ad;
}
.hb-hero-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--bm-hero-ink);
  margin-bottom: 3px;
  position: relative;
}
.hb-hero-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--bm-hero-sub);
  opacity: 1;
  margin-bottom: 16px;
  position: relative;
}
.hb-hero-dday {
  display: flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
  padding-top: 8px;
}
.hb-hero-dday-num {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--bm-hero-ink);
}
.hb-hero-dday-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--bm-hero-sub);
  opacity: 1;
}

/* ============================================================
   4. Mini events 가로 스크롤
   ============================================================ */
.hb-mini-events {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 12px 0 6px;
  scrollbar-width: none;
}
.hb-mini-events::-webkit-scrollbar { display: none; }
.hb-mini-event {
  background: var(--color-surface);
  border: 2px solid var(--bm-line);
  border-radius: var(--r-mini);
  padding: 10px 13px;
  min-width: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--sh-card);
  transition: transform 0.2s var(--bm-spring);
}
.hb-mini-event:hover { transform: translateY(-2px); }
.hb-mini-emoji { font-size: 22px; }
.hb-mini-text { min-width: 0; }
.hb-mini-name { font-size: 12px; font-weight: 800; color: var(--ink); }
.hb-mini-dday { font-size: 10.5px; color: #d27d3a; font-weight: 800; }
[data-theme="dark"] .hb-mini-dday { color: #f0b35e; }

/* ============================================================
   5. 운세 카드
   ============================================================ */
.app-shell .fortune-section .fortune-card {
  background: linear-gradient(135deg, var(--butter) 0%, var(--warm) 100%) !important;
  border: none !important;
  border-radius: var(--r-hero) !important;
  padding: 24px 22px !important;
  text-align: center;
  box-shadow: var(--sh-strong);
  position: relative;
  overflow: hidden;
}
.app-shell .fortune-section .fortune-card::before {
  content: '🦎';
  position: absolute;
  top: -30px;
  right: -30px;
  font-size: 180px;
  opacity: 0.12;
  pointer-events: none;
}
.app-shell .fortune-section .fortune-gecko {
  font-size: 56px !important;
  margin-bottom: 8px !important;
  position: relative;
}
.app-shell .fortune-section .fortune-hoochu-img {
  width: 100% !important;
  max-width: 280px !important;
  aspect-ratio: 1 !important;
  object-fit: cover !important;
  border-radius: 4px !important;
  margin: 12px auto 0 !important;
  display: block !important;
  border: 8px solid var(--bm-polaroid) !important;
  box-shadow: 0 5px 12px rgba(120, 95, 45, 0.18) !important;
  transform: rotate(-1.2deg);
}
.app-shell .fortune-section .fortune-hoochu-caption {
  font-size: 11.5px !important;
  color: #6b5a3a !important;
  margin-top: 8px !important;
  font-weight: 600;
}
[data-theme="dark"] .app-shell .fortune-section .fortune-hoochu-caption {
  color: #d9cda8 !important;
}
.app-shell .fortune-section .fortune-stars {
  font-size: 24px !important;
  letter-spacing: 0.08em !important;
  color: #8a6f1a !important;
  margin: 6px 0 !important;
  position: relative;
}
[data-theme="dark"] .app-shell .fortune-section .fortune-stars {
  color: #ffd98a !important;
}
.app-shell .fortune-section .fortune-text {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--color-text) !important;
  line-height: 1.7 !important;
  margin: 12px 0 16px !important;
  position: relative;
}
.app-shell .fortune-section .fortune-btns {
  display: flex !important;
  gap: 8px !important;
  position: relative;
}
.app-shell .fortune-section .fortune-btn {
  flex: 1;
  background: var(--olive) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 0 !important;
  border-radius: var(--r-pill) !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 0 rgba(92, 99, 57, 0.35);
  transition: transform 0.2s var(--bm-spring);
}
.app-shell .fortune-section .fortune-btn:hover { transform: scale(1.03); }
.app-shell .fortune-section .fortune-btn:active { transform: scale(0.95); }
.app-shell .fortune-section .fortune-btn-secondary {
  background: rgba(255, 253, 245, 0.75) !important;
  color: var(--olive-d) !important;
  border: 2px dashed rgba(122, 132, 80, 0.45) !important;
  box-shadow: none;
}
[data-theme="dark"] .app-shell .fortune-section .fortune-btn-secondary {
  background: rgba(35, 29, 16, 0.5) !important;
  color: var(--olive-d) !important;
}

/* ============================================================
   6. 후추 미니 프리뷰 카드 (홈 탭)
   ============================================================ */
.hb-hoochu-preview-card {
  width: 100%;
  background: var(--olive-bg);
  border: 2px solid #dde3bd;
  border-radius: var(--r-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 0 rgba(122, 132, 80, 0.18);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.2s var(--bm-spring);
}
[data-theme="dark"] .hb-hoochu-preview-card {
  border-color: #46512c;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}
.hb-hoochu-preview-card:hover { transform: translateY(-2px); }
.hb-hoochu-preview-card:active { transform: scale(0.97); }
.hb-hoochu-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid #cdd6a4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
[data-theme="dark"] .hb-hoochu-preview-icon {
  background: #232a14;
  border-color: #5a6838;
}
.hb-hoochu-preview-text { flex: 1; min-width: 0; }
.hb-hoochu-preview-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hb-hoochu-preview-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sec);
  margin-top: 2px;
}
.hb-hoochu-preview-pill {
  background: var(--olive-d);
  color: #f3f6e2;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: var(--r-pill);
}
[data-theme="dark"] .hb-hoochu-preview-pill {
  background: #c4ce9e;
  color: #2c3214;
}

/* ============================================================
   7. 가족 카드 (family 탭)
   ============================================================ */
.app-shell .family-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background: transparent !important;
}
.app-shell .family-card {
  background: var(--color-surface) !important;
  border: 2px solid var(--bm-line) !important;
  border-radius: var(--r-card) !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  box-shadow: var(--sh-card);
  border-left: 5px solid var(--muted) !important;
  cursor: pointer;
  text-align: left !important;
  flex-direction: row !important;
  transition: transform 0.2s var(--bm-spring);
  min-height: auto !important;
}
.app-shell .family-card:hover { transform: translateX(3px); }
.app-shell .family-card:active { transform: scale(0.98); }
.app-shell .family-card .family-emoji {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  background: var(--cream) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 28px !important;
  flex-shrink: 0;
  margin: 0 !important;
}
.app-shell .family-card .family-avatar-img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.app-shell .family-card .family-name {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
}
.app-shell .family-card .family-desc {
  font-size: 11.5px !important;
  color: var(--text-sec) !important;
  margin-top: 2px !important;
  line-height: 1.4 !important;
}
.app-shell .family-card > div:nth-child(2),
.app-shell .family-card .family-card-text {
  flex: 1;
  min-width: 0;
}
.app-shell .family-card .family-note-badge {
  flex-shrink: 0;
}
.app-shell .family-card--mom { border-left-color: var(--fam-mom-acc) !important; }
.app-shell .family-card--mom .family-emoji { background: var(--fam-mom-bg) !important; }
.app-shell .family-card--bro { border-left-color: var(--fam-bro-acc) !important; }
.app-shell .family-card--bro .family-emoji { background: var(--fam-bro-bg) !important; }
.app-shell .family-card--sis { border-left-color: var(--fam-sis-acc) !important; }
.app-shell .family-card--sis .family-emoji { background: var(--fam-sis-bg) !important; }
.app-shell .family-card--hoochu { border-left-color: var(--fam-hoochu-acc) !important; }
.app-shell .family-card--hoochu .family-emoji { background: var(--fam-hoochu-bg) !important; }
.app-shell .family-card--bot { border-left-color: var(--fam-bot-acc) !important; }
.app-shell .family-card--bot .family-emoji { background: var(--fam-bot-bg) !important; }
.app-shell .family-card--pets { border-left-color: var(--fam-pets-acc) !important; }
.app-shell .family-card--pets .family-emoji { background: var(--fam-pets-bg) !important; }

/* ============================================================
   8. 게임 탭
   ============================================================ */
.hb-game-hero {
  display: block;
  background: linear-gradient(135deg, var(--olive) 0%, var(--olive-d) 100%);
  border-radius: 22px;
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--bm-spring);
  box-shadow: 0 5px 0 rgba(70, 76, 42, 0.4);
}
.hb-game-hero:hover { transform: translateY(-2px); }
.hb-game-hero:active { transform: scale(0.98); }
.hb-game-hero-emoji-bg {
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 130px;
  opacity: 0.18;
  line-height: 1;
  animation: hbHeroFloat 4.5s ease-in-out infinite;
}
.hb-game-hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  position: relative;
}
.hb-game-hero-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  position: relative;
}
.hb-game-hero-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
  position: relative;
}
.hb-game-hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--olive-d);
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 800;
  margin-top: 14px;
  position: relative;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}
.hb-games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hb-game-card {
  background: var(--color-surface);
  border: 2px solid var(--bm-line);
  border-radius: 20px;
  padding: 14px;
  min-height: 110px;
  text-decoration: none;
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: block;
  transition: transform 0.22s var(--bm-spring);
  box-shadow: var(--sh-strong);
}
.hb-game-card:hover { transform: translateY(-3px) rotate(-0.6deg); }
.hb-game-card:active { transform: scale(0.95); }
.hb-game-card[data-acc="olive"] { background: var(--olive-bg); border-color: transparent; }
.hb-game-card[data-acc="purple"] { background: var(--purple-bg); border-color: transparent; }
.hb-game-card[data-acc="orange"] { background: var(--orange-bg); border-color: transparent; }
.hb-game-card[data-acc="butter"] { background: var(--cream); border-color: transparent; }
.hb-game-icon { font-size: 28px; margin-bottom: 8px; }
.hb-game-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.hb-game-desc {
  font-size: 11px;
  color: var(--text-sec);
  font-weight: 600;
  margin-top: 2px;
}

/* ============================================================
   9. 앨범 탭
   ============================================================ */
.hb-album-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 4px;
}
.hb-filter-chip {
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--bm-line);
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.15s var(--bm-spring), background 0.15s ease, color 0.15s ease;
}
.hb-filter-chip:hover { transform: translateY(-1px); }
.hb-filter-chip:active { transform: scale(0.95); }
.hb-filter-chip.active {
  background: var(--ink);
  color: var(--color-surface);
  border-color: var(--ink);
  box-shadow: 0 2px 0 rgba(74, 63, 36, 0.3);
}
[data-theme="dark"] .hb-filter-chip.active {
  background: #ffe9ad;
  color: #4a3f24;
  border-color: #ffe9ad;
}
.hb-album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.hb-album-thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg-secondary);
  display: block;
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--bm-spring);
}
.hb-album-thumb:hover { transform: scale(1.04) rotate(-0.5deg); z-index: 1; }
.hb-album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hb-album-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(58, 47, 22, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  pointer-events: none;
}
.hb-album-loading,
.hb-album-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 12px;
}
.hb-album-add-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--r-pill);
  border: 2px dashed var(--bm-dash);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--bm-spring), color 0.2s ease, border-color 0.2s ease;
}
.hb-album-add-btn:hover {
  color: var(--bm-cta);
  border-color: var(--bm-cta);
  transform: rotate(-0.5deg);
}

/* ============================================================
   10. 후추 탭 (.hoochu-corner)
   ============================================================ */
.app-shell .hoochu-corner .hoochu-content {
  background: var(--color-surface) !important;
  border: 2px solid var(--bm-line);
  border-radius: var(--r-card) !important;
  padding: 16px !important;
  box-shadow: var(--sh-strong);
}
.app-shell .hoochu-profile {
  display: flex !important;
  gap: 14px !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  padding: 0 !important;
  background: transparent !important;
}
.app-shell .hoochu-avatar {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  background: var(--olive-bg) !important;
  border: 2px solid #cdd6a4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0 !important;
  box-shadow: none;
  transform: rotate(-3deg);
  transition: transform 0.25s var(--bm-spring);
}
.app-shell .hoochu-avatar:hover { transform: rotate(3deg) scale(1.05); }
[data-theme="dark"] .app-shell .hoochu-avatar { border-color: #5a6838 !important; }
.app-shell .hoochu-info h3 {
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 4px !important;
  color: var(--ink) !important;
}
.app-shell .hoochu-stats {
  font-size: 11px !important;
  list-style: none !important;
  padding: 0 !important;
  line-height: 1.6;
}
.app-shell .hoochu-stats li {
  color: var(--text-sec) !important;
  margin: 1px 0 !important;
}
.app-shell .hoochu-stats strong {
  color: var(--olive-d) !important;
  font-weight: 700;
}
.app-shell .hoochu-daily-photo-area {
  margin-top: 10px;
}
/* 후추 탭 사진 — 폴라로이드 프레임 */
.app-shell .hoochu-daily-photo {
  background: var(--bm-polaroid) !important;
  border: 1px solid var(--bm-line);
  border-bottom: none;
  padding: 8px 8px 0;
  border-radius: 4px !important;
  overflow: hidden;
  margin-bottom: 12px !important;
  min-height: 200px !important;
  box-shadow: 0 5px 12px rgba(120, 95, 45, 0.15);
  transform: rotate(-1deg);
  transition: transform 0.3s var(--bm-spring);
}
.app-shell .hoochu-daily-photo:hover { transform: rotate(0deg); }
.app-shell .hoochu-daily-photo img {
  width: 100% !important;
  height: 100% !important;
  max-height: 300px;
  object-fit: cover !important;
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.app-shell .hoochu-photo-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 12px;
}
.app-shell .hoochu-quiz-question {
  font-size: 13px !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
  color: var(--color-text) !important;
}
.app-shell .hoochu-quiz-buttons {
  display: flex !important;
  gap: 5px !important;
  margin-bottom: 12px !important;
}
.app-shell .hoochu-age-btn {
  flex: 1;
  padding: 10px 0 !important;
  border-radius: 12px !important;
  border: 2px solid var(--bm-line) !important;
  background: var(--color-surface) !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 0 var(--bm-shadow-color);
}
.app-shell .hoochu-age-btn.correct {
  background: var(--olive-bg) !important;
  border-color: var(--olive) !important;
  color: var(--olive-d) !important;
}
.app-shell .hoochu-quiz-who-btns {
  display: flex !important;
  gap: 6px !important;
}
.app-shell .hoochu-who-btn {
  flex: 1;
  padding: 7px 0 !important;
  border-radius: var(--r-pill) !important;
  background: transparent !important;
  border: 2px solid var(--bm-line) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  cursor: pointer;
  font-family: inherit;
}
.app-shell .hoochu-who-btn.active {
  border-color: var(--olive) !important;
  color: var(--olive-d) !important;
  background: var(--olive-bg) !important;
}
.app-shell .shedding-card {
  margin-top: 14px;
  background: var(--cream) !important;
  border-radius: var(--r-card) !important;
  padding: 16px !important;
  text-align: center !important;
  border: 2px dashed var(--bm-dash) !important;
}
.app-shell .shedding-label {
  font-size: 10.5px !important;
  color: var(--muted) !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
}
.app-shell .shedding-countdown {
  font-size: 34px !important;
  font-weight: 900 !important;
  color: var(--olive-d) !important;
  letter-spacing: -0.03em !important;
  margin: 6px 0 4px !important;
}
.app-shell .shedding-sub {
  font-size: 11px !important;
  color: var(--text-sec) !important;
}

/* ============================================================
   11. 봇 메시지 + 미션
   ============================================================ */
.app-shell .bot-message-card {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
}
.app-shell .bot-avatar-img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 2px solid var(--color-warm) !important;
}
.app-shell .bot-bubble {
  background: var(--bm-chip-bg) !important;
  padding: 11px 14px !important;
  border-radius: var(--r-mini) !important;
  border-top-left-radius: 4px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  box-shadow: none;
  flex: 1;
}
.app-shell .bot-bubble::before { display: none; }
.app-shell .past-messages-btn {
  margin-top: 12px;
  background: transparent !important;
  border: 2px dashed var(--bm-dash) !important;
  color: var(--text-sec) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 8px 14px !important;
  border-radius: var(--r-pill) !important;
}
.app-shell .mission-area {
  margin-top: 14px;
  background: var(--color-surface) !important;
  border: 2px solid var(--bm-line) !important;
  border-radius: var(--r-card) !important;
  padding: 14px !important;
  box-shadow: var(--sh-card);
}
.app-shell .mission-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  margin-bottom: 10px !important;
  color: var(--ink) !important;
}

/* ============================================================
   12. 이벤트 + 카드형 섹션 공통
   ============================================================ */
.app-shell .events-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}
.app-shell .event-card {
  background: var(--color-surface) !important;
  border: 2px solid var(--bm-line) !important;
  border-radius: var(--r-mini) !important;
  padding: 12px !important;
  box-shadow: var(--sh-card);
}
.app-shell .timecapsule-area,
.app-shell .exercise-section,
.app-shell .menu-roulette-section,
.app-shell .achievements-section,
.app-shell .cafe-section {
  background: var(--color-surface);
  border: 2px solid var(--bm-line);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: var(--sh-card);
}

/* ============================================================
   13. 모달 — 바텀시트
   ============================================================ */
.comment-modal {
  border-radius: 28px 28px 0 0 !important;
  max-height: 85vh !important;
  position: relative;
}
.comment-modal::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--bm-line-strong);
  border-radius: 2px;
  margin: 12px auto 4px;
}
.comment-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg) !important;
  border: none !important;
  color: var(--muted) !important;
}

/* ============================================================
   14. 퀵바 패널
   ============================================================ */
body:has(.app-shell) .quickbar-panel {
  flex-wrap: wrap !important;
  gap: 6px !important;
  max-width: 360px !important;
  max-height: 70vh !important;
  overflow-y: auto !important;
}
.quickbar-account {
  background: var(--cream);
  border-radius: 12px;
  padding: 8px;
}
[data-theme="dark"] .quickbar-account {
  background: var(--color-bg-secondary);
}

/* ============================================================
   15. 데스크톱 mockup 외부 배경
   ============================================================ */
@media (min-width: 600px) {
  body:has(.app-shell) {
    min-height: 100vh;
  }
  body:has(.app-shell)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--color-bg-secondary);
    z-index: -1;
  }
}

/* ============================================================
   16. footer — 발자국 페이드 🐾
   ============================================================ */
.app-shell .footer {
  background: transparent !important;
  border: none !important;
  text-align: center;
  padding: 20px 14px 30px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
}
.app-shell .paw-divider {
  font-size: 14px;
  opacity: 1;
  background: linear-gradient(90deg,
    rgba(74, 63, 36, 0.25),
    rgba(74, 63, 36, 0.85));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .app-shell .paw-divider {
  background: linear-gradient(90deg,
    rgba(244, 234, 208, 0.2),
    rgba(244, 234, 208, 0.75));
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   17. RedDot
   ============================================================ */
.hb-game-card,
.hb-hoochu-preview-card {
  position: relative;
}
.hb-redDot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2.5px var(--color-surface);
  animation: hbDotPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}
.hb-game-card[data-acc="olive"] .hb-redDot { box-shadow: 0 0 0 2.5px var(--olive-bg); }
.hb-game-card[data-acc="purple"] .hb-redDot { box-shadow: 0 0 0 2.5px var(--purple-bg); }
.hb-game-card[data-acc="orange"] .hb-redDot { box-shadow: 0 0 0 2.5px var(--orange-bg); }
.hb-game-card[data-acc="butter"] .hb-redDot { box-shadow: 0 0 0 2.5px var(--cream); }
@keyframes hbDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.78; }
}

/* ============================================================
   18. 오늘의 후추 사진 (홈 최상단) — 시그니처 ② 폴라로이드 + 빼꼼
   ============================================================ */
.hb-home-hoochu-photo {
  display: block;
  width: 100%;
  background: var(--color-surface);
  border: 2px solid var(--bm-line);
  border-radius: var(--r-card);
  padding: 14px 14px 13px;
  margin-top: 16px;
  position: relative;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: var(--sh-strong);
  transition: transform 0.2s var(--bm-spring);
  animation: bmPopIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s backwards;
}
.hb-home-hoochu-photo:active { transform: scale(0.98); }
/* 후추 빼꼼 🦎 — 카드 위 모서리에서 몇 초마다 고개 내밀기 */
.hb-home-hoochu-photo::before {
  content: '🦎';
  position: absolute;
  top: -23px;
  right: 28px;
  font-size: 26px;
  z-index: -1;
  animation: bmGeckoPeek 7s ease-in-out infinite;
}
.hb-home-hoochu-label {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 0 2px;
}
.hb-home-hoochu-date {
  position: absolute;
  top: 15px;
  right: 14px;
  background: var(--bm-chip-bg);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-family: inherit;
}
/* 폴라로이드 + 마스킹테이프 */
.hb-home-hoochu-img-wrap {
  margin: 14px auto 0;
  width: 93%;
  aspect-ratio: 1.1;
  background: var(--bm-polaroid);
  border: 1px solid var(--bm-line);
  border-radius: 2px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 8px 26px;
  box-shadow: 0 6px 14px rgba(120, 95, 45, 0.16);
  transform: rotate(-1.6deg);
  transition: transform 0.3s var(--bm-spring);
  position: relative;
}
.hb-home-hoochu-photo:hover .hb-home-hoochu-img-wrap {
  transform: rotate(0deg) scale(1.015);
}
[data-theme="dark"] .hb-home-hoochu-img-wrap {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
/* 마스킹테이프 */
.hb-home-hoochu-img-wrap::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 78px;
  height: 22px;
  background: var(--bm-tape);
  border-left: 2px dashed var(--bm-tape-edge);
  border-right: 2px dashed var(--bm-tape-edge);
  z-index: 2;
}
.hb-home-hoochu-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.hb-home-hoochu-loading {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.hb-home-hoochu-cta {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--bm-cta);
}

/* 사진 캡션 */
.hb-home-hoochu-caption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-sec);
  font-weight: 600;
  text-align: center;
  padding: 0 6px;
}
.hb-home-hoochu-caption-author {
  font-size: 10.5px;
  color: var(--olive-d);
  font-weight: 700;
  opacity: 0.9;
}
[data-theme="dark"] .hb-home-hoochu-caption { color: #d9cda8; }
[data-theme="dark"] .hb-home-hoochu-caption-author { color: var(--olive-l); }

/* 후추봇 한마디 */
.hb-home-hoochu-bot {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  background: var(--bm-chip-bg);
  padding: 10px 12px;
  border-radius: 4px 16px 16px 16px;
}
.hb-home-hoochu-bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid #f4c781;
}
[data-theme="dark"] .hb-home-hoochu-bot-avatar { border-color: #6b4a26; }
.hb-home-hoochu-bot-msg {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--color-text);
  font-weight: 600;
  margin: 0;
}
[data-theme="dark"] .hb-home-hoochu-bot {
  background: var(--bm-chip-bg);
}
[data-theme="dark"] .hb-home-hoochu-bot-msg {
  color: var(--color-text);
}

/* 액션 라인 */
.hb-home-hoochu-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}
.hb-home-hoochu-reroll {
  background: var(--color-surface);
  border: 2px dashed var(--bm-dash);
  color: #8a7340;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--bm-spring), background 0.2s ease;
}
.hb-home-hoochu-reroll:hover {
  background: var(--yellow-l);
  transform: rotate(-2deg) scale(1.04);
}
.hb-home-hoochu-reroll:active { transform: scale(0.92); }
[data-theme="dark"] .hb-home-hoochu-reroll { color: #d8bf85; }

/* 사진 리롤 회전 애니메이션 */
.hb-home-hoochu-img-wrap.rolling img {
  animation: hbPhotoRoll 0.5s ease;
}
@keyframes hbPhotoRoll {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.85) rotate(8deg); opacity: 0.6; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Phase 10: 운세 카드에서 사진 숨김 */
.app-shell .fortune-section .fortune-hoochu-img,
.app-shell .fortune-section .fortune-hoochu-caption,
.app-shell .fortune-section .fortune-caption-author {
  display: none !important;
}
/* Phase 13: 운세 "사진 다시 뽑기" 버튼 제거 */
.app-shell .fortune-section #photoRerollBtn {
  display: none !important;
}

/* ============================================================
   19. 홈 카드 그리드 — 스티커 카드 (시그니처 ④) + 팝업 바텀시트
   ============================================================ */
.hb-home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.hb-home-card {
  background: var(--color-surface);
  border: 2px solid var(--bm-line);
  border-radius: 20px;
  padding: 13px;
  min-height: 100px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  transition: transform 0.25s var(--bm-spring);
  box-shadow: var(--sh-strong);
  animation: bmPopIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
/* 스티커 기울기 — 좌/우 칼럼 반대 방향 + 스태거 등장 */
.hb-home-card:nth-child(odd) { transform: rotate(-0.8deg); }
.hb-home-card:nth-child(even) { transform: rotate(0.8deg); }
.hb-home-card:nth-child(1) { animation-delay: 0.26s; }
.hb-home-card:nth-child(2) { animation-delay: 0.32s; }
.hb-home-card:nth-child(3) { animation-delay: 0.38s; }
.hb-home-card:nth-child(4) { animation-delay: 0.44s; }
.hb-home-card:nth-child(5) { animation-delay: 0.50s; }
.hb-home-card:nth-child(6) { animation-delay: 0.56s; }
.hb-home-card:nth-child(7) { animation-delay: 0.62s; }
.hb-home-card:nth-child(8) { animation-delay: 0.68s; }
.hb-home-card:hover { transform: rotate(0deg) translateY(-3px); }
.hb-home-card:active { transform: scale(0.95); }
.hb-home-card[data-acc="butter"] { background: var(--yellow-l); border-color: transparent; }
.hb-home-card[data-acc="purple"] { background: var(--purple-bg); border-color: transparent; }
.hb-home-card[data-acc="orange"] { background: var(--orange-bg); border-color: transparent; }
.hb-home-card[data-acc="olive"] { background: var(--olive-bg); border-color: transparent; }
.hb-home-card[data-acc="cream"] { background: var(--cream); border-color: transparent; }
.hb-home-card-icon {
  font-size: 26px;
  margin-bottom: 4px;
}
.hb-home-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hb-home-card-sub {
  font-size: 11px;
  color: var(--text-sec);
  font-weight: 600;
}

/* ----- 팝업 (바텀시트) ----- */
.hb-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 47, 22, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.hb-popup-sheet {
  width: 100%;
  max-width: 380px;
  max-height: 88vh;
  background: var(--color-surface);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(58, 47, 22, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hb-popup-sheet.show {
  transform: translateY(0);
}
.hb-popup-handle {
  width: 40px;
  height: 4px;
  background: var(--bm-line-strong);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}
.hb-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 14px;
  border-bottom: 2px dashed var(--bm-line);
  flex-shrink: 0;
}
.hb-popup-title {
  flex: 1;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hb-popup-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg);
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.25s var(--bm-spring);
}
.hb-popup-close:hover { transform: rotate(90deg); }
.hb-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
}
.hb-popup-body .section {
  margin-top: 0 !important;
  padding: 0 !important;
}
.hb-popup-body .section-title {
  display: none !important;
}
.hb-popup-body .collapse-arrow { display: none !important; }

/* HB MOBILE SKIN — END */

/* ============================================================
   20. 사진 상세 뷰어 (앨범 라이트박스)
   ============================================================ */
.hb-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(28, 23, 12, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeUp 0.18s ease;
}
.hb-pv-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 라이트박스 사진도 폴라로이드 프레임 */
.hb-pv-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
  border: 10px solid var(--bm-polaroid);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.hb-pv-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 253, 245, 0.14);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, transform 0.25s var(--bm-spring);
}
.hb-pv-close:hover {
  background: rgba(255, 253, 245, 0.28);
  transform: rotate(90deg);
}
.hb-pv-count {
  position: absolute;
  top: 24px;
  left: 18px;
  color: rgba(255, 253, 245, 0.75);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hb-pv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 64px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 253, 245, 0.1);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.hb-pv-nav:hover { background: rgba(255, 253, 245, 0.24); }
.hb-pv-prev { left: 8px; }
.hb-pv-next { right: 8px; }
.hb-pv-info {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 253, 245, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 10px;
  flex-shrink: 0;
}
.hb-pv-caption {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  word-break: keep-all;
}
.hb-pv-caption:empty { display: none; }
.hb-pv-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.hb-pv-date,
.hb-pv-author {
  color: rgba(255, 253, 245, 0.65);
  font-size: 0.78rem;
  font-weight: 600;
}
.hb-pv-link {
  margin-left: auto;
  color: #f6e7a8;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.hb-pv-link:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .hb-photo-viewer { padding: 10px; }
  .hb-pv-nav { width: 34px; height: 54px; font-size: 1.4rem; }
}

/* ===== 모션 최소화 환경 배려 ===== */
@media (prefers-reduced-motion: reduce) {
  .hb-home-card,
  .hb-hero-card,
  .hb-home-hoochu-photo { animation: none; }
  .hb-home-hoochu-photo::before { animation: none; }
  .hb-hero-emoji-bg,
  .hb-game-hero-emoji-bg { animation: none; }
}
