/* ============================================================
   지니혀니네 - 공통 스타일 (밝고 화사한 SNS 컨셉 / 반응형)
   breakpoints : mobile < 768 ≤ tablet < 1200 ≤ desktop
   ============================================================ */

:root {
  --bg:          #FFF8F1;
  --bg-2:        #FFF1E6;
  --surface:     #FFFFFF;
  --line:        #F3E7DC;
  --line-2:      #EADBCD;

  --primary:     #FF7A59;
  --primary-d:   #F2603D;
  --primary-s:   #FFE9E1;
  --sun:         #FFC94D;
  --sun-s:       #FFF4D6;
  --mint:        #2FC59A;
  --mint-s:      #DDF7EE;
  --sky:         #45AFFF;
  --sky-s:       #E1F2FF;
  --grape:       #8C7BFF;
  --grape-s:     #ECE8FF;
  --pink:        #FF6FAE;
  --pink-s:      #FFE5F1;

  --text:        #2A2A33;
  --text-2:      #666675;
  --text-3:      #A3A3B0;

  --radius:      20px;
  --radius-sm:   12px;
  --shadow:      0 6px 24px rgba(214, 120, 80, .08);
  --shadow-lg:   0 16px 40px rgba(214, 120, 80, .16);

  --side-w:      248px;
  --right-w:     316px;
  --topbar-h:    56px;
  --tabbar-h:    64px;

  --font:        'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-fun:    'Jua', 'Pretendard', sans-serif;
}

/* ── reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(circle at 8% 0%, #FFE3D3 0, transparent 32%),
    radial-gradient(circle at 100% 30%, #E6F4FF 0, transparent 28%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.material-icons-round { font-size: 22px; vertical-align: middle; line-height: 1; }
.fun { font-family: var(--font-fun); font-weight: 400; }
.hide { display: none !important; }

/* ── 레이아웃 셸 ───────────────────────────────────────── */
.jn-shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
body.has-right .jn-shell { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--right-w); }
.jn-main { min-width: 0; padding: 28px 0 60px; }
.jn-main.narrow, .narrow-wrap { max-width: 720px; margin: 0 auto; width: 100%; }

/* ── 사이드바 ──────────────────────────────────────────── */
.jn-side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 0 20px;
}
.side-logo { display: flex; align-items: center; gap: 10px; padding: 4px 14px 22px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #FFB199, var(--primary)); box-shadow: 0 6px 14px rgba(255,122,89,.35);
}
.logo-text { font-family: var(--font-fun); font-size: 25px; color: var(--primary-d); letter-spacing: -.5px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 16px;
  font-size: 16px; font-weight: 600; color: var(--text-2);
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.on { background: var(--surface); color: var(--primary-d); box-shadow: var(--shadow); }
.nav-item.on i { color: var(--primary); }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700;
  color: var(--grape); background: var(--grape-s); padding: 2px 8px; border-radius: 99px;
}
.nav-sub { display: none; flex-direction: column; padding: 4px 0 8px 52px; gap: 2px; }
.nav-group.on .nav-sub { display: flex; }
.nav-sub a { padding: 7px 12px; border-radius: 10px; font-size: 14px; color: var(--text-2); }
.nav-sub a:hover { color: var(--text); background: rgba(255,255,255,.6); }
.nav-sub a.on { color: var(--primary-d); font-weight: 700; }
.nav-sub a.on::before { content: '•'; margin-right: 6px; color: var(--primary); }
.nav-admin { margin-top: 8px; border-top: 1px dashed var(--line-2); border-radius: 0 0 16px 16px; padding-top: 14px; }

.side-write {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 4px; padding: 14px; border-radius: 18px;
  background: linear-gradient(135deg, #FF9A76, var(--primary));
  color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 10px 22px rgba(255,122,89,.35);
  transition: transform .15s;
}
.side-write:hover { transform: translateY(-2px); }

.side-user {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow);
}
.su-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.su-info b { font-size: 14px; }
.su-info span { font-size: 12px; color: var(--text-2); }
.su-out { color: var(--text-3); padding: 4px; }
.su-out:hover { color: var(--primary); }

/* ── 아바타 ────────────────────────────────────────────── */
.jn-avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 50%; color: #fff; font-weight: 700; overflow: hidden;
  width: 40px; height: 40px; font-size: 16px;
}
.jn-avatar img { width: 100%; height: 100%; object-fit: cover; }
.jn-avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.jn-avatar.md { width: 40px; height: 40px; font-size: 16px; }
.jn-avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.jn-avatar.xl { width: 92px; height: 92px; font-size: 36px; }

/* ── 모바일 상단바 / 하단탭 (기본 숨김) ───────────────────── */
.jn-topbar, .jn-tabbar { display: none; }
.drawer-dim { display: none; }

/* ── 우측 패널 ─────────────────────────────────────────── */
.jn-right { padding: 28px 0 40px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
.widget { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.w-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.w-head h4 { font-size: 16px; }
.w-head a { font-size: 13px; color: var(--text-3); }
.w-head a:hover { color: var(--primary); }
.w-eyebrow { font-size: 12px; opacity: .85; }
.w-empty { font-size: 13px; color: var(--text-3); }

.w-attend { background: linear-gradient(135deg, #FF9A76 0%, #FF7A59 60%, #FF6FAE 100%); color: #fff; }
.w-attend.done { background: linear-gradient(135deg, #3ED3A3, #2FB5C5); }
.wa-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.wa-top h4 { font-size: 18px; margin-top: 2px; }
.wa-emoji { font-size: 34px; line-height: 1; }
.wa-link { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; }

.w-progress { margin-bottom: 12px; }
.wp-bar { height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.wp-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sun), var(--primary)); }
.wp-txt { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.wp-txt b { color: var(--primary-d); font-size: 15px; }
.mini-stamps { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-stamp {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: color-mix(in srgb, var(--c) 16%, white); border: 2px dashed color-mix(in srgb, var(--c) 55%, white);
}

.family-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.fl-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fl-info b { font-size: 14px; }
.fl-info small { font-size: 12px; color: var(--text-3); }
.right-foot { font-size: 12px; color: var(--text-3); text-align: center; padding: 6px; }

/* ── 버튼 ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 14px;
  font-size: 15px; font-weight: 700; white-space: nowrap;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:active { transform: scale(.97); }
.btn .material-icons-round { font-size: 19px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(255,122,89,.3); }
.btn-primary:hover { background: var(--primary-d); }
.btn-soft { background: var(--primary-s); color: var(--primary-d); }
.btn-soft:hover { background: #FFDCCF; }
.btn-white { background: #fff; color: var(--primary-d); }
.btn-line { background: var(--surface); color: var(--text-2); border: 1.5px solid var(--line-2); }
.btn-line:hover { border-color: var(--primary); color: var(--primary-d); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: #FFE4E4; color: #E04848; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }

/* ── 칩 / 뱃지 ─────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 11px; border-radius: 99px;
  font-size: 13px; font-weight: 600; background: var(--bg-2); color: var(--text-2);
}
.chip .material-icons-round { font-size: 15px; }
.chip.c-mint  { background: var(--mint-s);  color: #179372; }
.chip.c-sky   { background: var(--sky-s);   color: #1A7FCC; }
.chip.c-sun   { background: var(--sun-s);   color: #B7860B; }
.chip.c-pink  { background: var(--pink-s);  color: #D2457F; }
.chip.c-grape { background: var(--grape-s); color: #6352D9; }
.chip.c-coral { background: var(--primary-s); color: var(--primary-d); }

/* ── 페이지 헤더 ───────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-fun); font-weight: 400; font-size: 32px; letter-spacing: -.5px; }
.page-head h1 .ph-emoji { margin-right: 6px; }
.page-head p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.page-head .ph-actions { display: flex; gap: 8px; }

/* 상단 배너 (메뉴별 히어로) */
.hero {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 28px 30px; margin-bottom: 22px; color: #fff;
  background: linear-gradient(135deg, #FF9A76, #FF7A59 55%, #FF6FAE);
  box-shadow: var(--shadow-lg);
}
.hero.h-mint  { background: linear-gradient(135deg, #48DDB0, #2FB5C5); }
.hero.h-sky   { background: linear-gradient(135deg, #6CC4FF, #4D8DFF); }
.hero.h-grape { background: linear-gradient(135deg, #A99BFF, #7A6CF2); }
.hero.h-sun   { background: linear-gradient(135deg, #FFD66B, #FFA94D); }
.hero h1 { font-family: var(--font-fun); font-weight: 400; font-size: 30px; }
.hero p { opacity: .92; margin-top: 6px; }
.hero .hero-deco { position: absolute; right: 18px; bottom: -14px; font-size: 96px; opacity: .9; transform: rotate(-8deg); pointer-events: none; }
.hero .hero-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 탭 ────────────────────────────────────────────────── */
.jn-tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.jn-tabs::-webkit-scrollbar { display: none; }
.jn-tabs a {
  flex-shrink: 0; height: 38px; padding: 0 16px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--line);
}
.jn-tabs a.on { background: var(--text); color: #fff; border-color: var(--text); }

/* ── 카드 ──────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

/* ── 스토리 바 (가족 아바타) ───────────────────────────── */
.story-bar { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 18px; }
.story-bar::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; width: 72px; }
.story-ring { padding: 3px; border-radius: 50%; background: linear-gradient(135deg, var(--sun), var(--primary), var(--pink)); }
.story-ring.off { background: var(--line-2); }
.story-ring .jn-avatar { border: 3px solid var(--surface); width: 62px; height: 62px; font-size: 22px; }
.story span { font-size: 12px; color: var(--text-2); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 출석 유도 배너 */
.attend-banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px;
  border-radius: var(--radius); background: var(--sun-s); border: 2px dashed #FFD978;
}
.attend-banner .ab-emoji { font-size: 32px; }
.attend-banner .ab-txt { flex: 1; }
.attend-banner b { display: block; font-size: 15px; }
.attend-banner small { color: var(--text-2); }

/* ── 피드 카드 (SNS 포스트) ───────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 18px; }
.feed-card { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.fc-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.fc-who { flex: 1; min-width: 0; line-height: 1.3; }
.fc-who b { font-size: 15px; }
.fc-who small { display: block; font-size: 12px; color: var(--text-3); }
.fc-cover { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); display: block; overflow: hidden; }
.fc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.feed-card:hover .fc-cover img { transform: scale(1.03); }
.fc-cover .fc-count {
  position: absolute; right: 12px; top: 12px; padding: 4px 10px; border-radius: 99px;
  background: rgba(0,0,0,.45); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: 3px;
}
.fc-cover .fc-count .material-icons-round { font-size: 15px; }
.fc-cover.no-img { display: grid; place-items: center; font-size: 64px; aspect-ratio: 16 / 7; }
.fc-cover.no-img.c-mint { background: linear-gradient(135deg, #E3FAF2, #C9F1E3); }
.fc-cover.no-img.c-sky  { background: linear-gradient(135deg, #E6F4FF, #CDE8FF); }
.fc-body { padding: 14px 18px 4px; }
.fc-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.fc-summary { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fc-actions { display: flex; align-items: center; gap: 4px; padding: 8px 10px 10px; border-top: 1px solid var(--line); margin-top: 12px; }
.fc-act { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 12px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.fc-act:hover { background: var(--bg); }
.fc-act.liked, .fc-act.liked i { color: #FF4D6D; }
.fc-act.right { margin-left: auto; }

/* 카드 그리드 (목록형) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.g-card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.g-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.g-thumb { aspect-ratio: 4 / 3; background: var(--bg-2); display: grid; place-items: center; font-size: 48px; position: relative; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb .g-flag { position: absolute; left: 10px; top: 10px; }
.g-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.g-title { font-weight: 800; font-size: 16px; }
.g-sub { font-size: 13px; color: var(--text-2); }
.g-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.stars { color: var(--sun); letter-spacing: 1px; font-size: 14px; }

/* ── 빈 화면 ───────────────────────────────────────────── */
.empty {
  text-align: center; padding: 56px 20px; background: var(--surface);
  border-radius: 24px; box-shadow: var(--shadow); border: 2px dashed var(--line-2);
}
.empty .e-emoji { font-size: 60px; line-height: 1; margin-bottom: 12px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }

/* ── 사진 그리드 (인스타그램형) ───────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-radius: 20px; overflow: hidden; }
.photo-grid .pg-item { position: relative; aspect-ratio: 1; background: var(--bg-2); overflow: hidden; cursor: zoom-in; }
.photo-grid .pg-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-grid .pg-item:hover img { transform: scale(1.06); }
.photo-grid .pg-item .pg-hover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px;
  background: rgba(0,0,0,.35); color: #fff; font-weight: 700; opacity: 0; transition: opacity .2s;
}
.photo-grid .pg-item:hover .pg-hover { opacity: 1; }
.photo-day { font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.photo-day small { color: var(--text-3); font-weight: 500; }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(20,16,14,.92); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 12px; object-fit: contain; }
.lb-close, .lb-prev, .lb-next { position: absolute; color: #fff; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; padding: 0 20px; }

/* ── 스탬프북 ──────────────────────────────────────────── */
.stamp-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.ss-item { background: var(--surface); border-radius: 20px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.ss-item b { display: block; font-size: 26px; font-family: var(--font-fun); font-weight: 400; color: var(--primary-d); }
.ss-item span { font-size: 13px; color: var(--text-2); }
.stamp-cat { margin: 26px 0 12px; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.stamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.stamp {
  background: var(--surface); border-radius: 22px; padding: 18px 10px 14px; text-align: center;
  box-shadow: var(--shadow); position: relative; transition: transform .15s;
}
.stamp:hover { transform: translateY(-3px) rotate(-1deg); }
.stamp-circle {
  width: 78px; height: 78px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; font-size: 38px;
  background: color-mix(in srgb, var(--c) 15%, white);
  border: 3px dashed color-mix(in srgb, var(--c) 60%, white);
  box-shadow: inset 0 0 0 5px #fff;
  transform: rotate(-8deg);
}
.stamp b { display: block; font-size: 14px; }
.stamp small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stamp.locked .stamp-circle { filter: grayscale(1); opacity: .35; border-color: var(--line-2); background: var(--bg); }
.stamp.locked b { color: var(--text-3); }
.stamp .st-prog { height: 6px; border-radius: 99px; background: var(--bg-2); margin: 8px 6px 0; overflow: hidden; }
.stamp .st-prog span { display: block; height: 100%; background: var(--c); border-radius: 99px; }

/* ── 출석 달력 ─────────────────────────────────────────── */
.cal-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.cal-head h3 { font-family: var(--font-fun); font-weight: 400; font-size: 24px; min-width: 140px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 0; }
.cal .dow.sun { color: #F06262; } .cal .dow.sat { color: #4D8DFF; }
.cal .day {
  aspect-ratio: 1; border-radius: 14px; background: var(--bg); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.cal .day.empty { background: transparent; }
.cal .day.today { outline: 2.5px solid var(--primary); background: #fff; }
.cal .day .d-stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; margin-top: 2px; }
.cal .day .d-stamps .jn-avatar { width: 18px; height: 18px; font-size: 9px; border: 1.5px solid #fff; }
.cal .day.mine { background: var(--primary-s); color: var(--primary-d); }
.cal .day.mine::after { content: '🐾'; position: absolute; bottom: 4px; font-size: 14px; }

.attend-form { display: flex; flex-direction: column; gap: 12px; }
.mood-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-pick label { cursor: pointer; }
.mood-pick input { display: none; }
.mood-pick span { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--bg); border: 2px solid transparent; transition: transform .12s; }
.mood-pick input:checked + span { border-color: var(--primary); background: var(--primary-s); transform: scale(1.08); }

.greet-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.greet-list li:last-child { border-bottom: 0; }
.greet-list .gl-txt { flex: 1; font-size: 14px; }
.greet-list .gl-txt b { margin-right: 6px; }
.greet-list .gl-time { font-size: 12px; color: var(--text-3); }

/* ── 폼 ────────────────────────────────────────────────── */
.form-row { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.form-label em { color: var(--primary); font-style: normal; margin-left: 2px; }
.form-help { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: #fff; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-s); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chips label { cursor: pointer; }
.check-chips input { display: none; }
.check-chips span { display: inline-flex; height: 36px; align-items: center; padding: 0 14px; border-radius: 99px; background: var(--bg); border: 1.5px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--text-2); }
.check-chips input:checked + span { background: var(--primary-s); border-color: var(--primary); color: var(--primary-d); }
.rating-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rating-pick input { display: none; }
.rating-pick label { font-size: 30px; color: var(--line-2); cursor: pointer; line-height: 1; }
.rating-pick input:checked ~ label, .rating-pick label:hover, .rating-pick label:hover ~ label { color: var(--sun); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* 사진 업로드 드롭존 */
.dropzone {
  border: 2.5px dashed var(--line-2); border-radius: 20px; padding: 28px; text-align: center;
  background: var(--bg); color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-s); }
.dropzone .dz-emoji { font-size: 40px; }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 12px; }
.upload-preview .up-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.upload-preview .up-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .up-del { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.upload-preview .up-del i { font-size: 16px; }
.upload-preview .up-star { position: absolute; left: 4px; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; }
.upload-preview .up-star i { font-size: 16px; }
.upload-preview .up-badge { display: none; position: absolute; left: 4px; top: 4px; padding: 1px 8px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.upload-preview .up-item:first-child .up-badge { display: block; }
.upload-preview .up-item:first-child .up-star { display: none; }
.upload-preview .up-item.loading { display: grid; place-items: center; background: var(--primary-s); }
.up-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; border-top-color: var(--primary); animation: spin .8s linear infinite; }
[data-single] .upload-preview { grid-template-columns: 120px; }
[data-single] .upload-preview .up-item { border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.fc-act.pop i { animation: heartPop .45s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.cmt-del { margin-left: 6px; font-size: 12px; color: var(--text-3); }
.cmt-del:hover { color: #E04848; }
.inline-form { display: inline; margin: 0; }

/* 일정(타임라인) 편집/표시 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); border-radius: 2px; }
.tl-day { font-weight: 800; margin: 14px 0 8px -22px; display: flex; align-items: center; gap: 8px; }
.tl-day .chip { height: 26px; }
.tl-item { position: relative; padding: 8px 0 8px 6px; }
.tl-item::before { content: ''; position: absolute; left: -20px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.tl-item .tl-time { font-size: 12px; color: var(--primary-d); font-weight: 700; }
.tl-item .tl-title { font-weight: 700; }
.tl-item .tl-memo { font-size: 13px; color: var(--text-2); }

/* 상세 보기 */
.post-view .pv-cover { border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-2); margin-bottom: 18px; }
.post-view .pv-cover img { width: 100%; height: 100%; object-fit: cover; }
.pv-title { font-size: 26px; font-weight: 800; margin: 6px 0 12px; }
.pv-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.pv-info div { background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.pv-info small { display: block; font-size: 12px; color: var(--text-3); }
.pv-info b { font-size: 14px; }
.pv-content { font-size: 16px; line-height: 1.8; word-break: break-word; }
.pv-content img { border-radius: 14px; height: auto; margin: 10px 0; }

/* 댓글 */
.comments { margin-top: 18px; }
.cmt-item { display: flex; gap: 10px; padding: 12px 0; }
.cmt-bubble { flex: 1; background: var(--bg); border-radius: 4px 18px 18px 18px; padding: 10px 14px; }
.cmt-bubble b { font-size: 14px; margin-right: 6px; }
.cmt-bubble small { font-size: 12px; color: var(--text-3); }
.cmt-bubble p { font-size: 14px; margin-top: 2px; }
.cmt-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.cmt-form .textarea { min-height: 48px; height: 48px; border-radius: 24px; padding: 12px 18px; }
.sticker-pick { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.sticker-pick button { font-size: 22px; width: 38px; height: 38px; border-radius: 12px; }
.sticker-pick button:hover { background: var(--bg-2); }

/* ── 테이블 ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 13px; color: var(--text-3); font-weight: 700; padding: 10px 12px; border-bottom: 1.5px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #FFFCF9; }
.table .t-center { text-align: center; }

/* ── 페이징 ────────────────────────────────────────────── */
.jn-paging { display: flex; justify-content: center; gap: 6px; margin-top: 26px; }
.pg-btn { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.pg-btn.on { background: var(--primary); color: #fff; }

/* ── 바텀시트 ──────────────────────────────────────────── */
.jn-sheet { position: fixed; inset: 0; z-index: 200; display: none; }
.jn-sheet.open { display: block; }
.sheet-dim { position: absolute; inset: 0; background: rgba(40,30,25,.4); animation: fadeIn .2s; }
.sheet-body {
  position: absolute; left: 50%; bottom: 50%; transform: translate(-50%, 50%);
  width: min(520px, calc(100% - 32px)); background: var(--surface); border-radius: 28px; padding: 22px;
  box-shadow: var(--shadow-lg); animation: popIn .22s ease-out;
}
.sheet-handle { display: none; width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); margin: -6px auto 14px; }
.sheet-title { font-family: var(--font-fun); font-weight: 400; font-size: 22px; margin-bottom: 16px; text-align: center; }
.write-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wo-item { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 2px; transition: transform .12s; }
.wo-item:hover { transform: translateY(-2px); }
.wo-item .wo-ico { font-size: 32px; margin-bottom: 6px; }
.wo-item b { font-size: 16px; }
.wo-item small { font-size: 12px; color: var(--text-2); }
.wo-item.c-mint { background: var(--mint-s); } .wo-item.c-sky { background: var(--sky-s); }
.wo-item.c-sun  { background: var(--sun-s); }  .wo-item.c-pink { background: var(--pink-s); }

/* ── 스탬프 획득 팝업 ──────────────────────────────────── */
.stamp-pop { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; background: rgba(40,30,25,.5); padding: 20px; }
.stamp-pop.open { display: flex; animation: fadeIn .2s; }
.sp-card { position: relative; width: min(340px, 100%); background: #fff; border-radius: 32px; padding: 28px 24px 22px; text-align: center; overflow: hidden; animation: popIn .35s cubic-bezier(.2,1.4,.4,1); }
.sp-label { font-family: var(--font-fun); font-size: 18px; color: var(--primary-d); }
.sp-stamp { width: 140px; height: 140px; margin: 16px auto; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #FF7A59) 16%, white); border: 4px dashed var(--c, #FF7A59); animation: stampIn .6s cubic-bezier(.2,1.6,.4,1) .15s both; }
.sp-icon { font-size: 70px; }
.sp-name { font-size: 22px; font-weight: 800; }
.sp-desc { color: var(--text-2); font-size: 14px; margin: 4px 0 8px; }
.sp-point { display: inline-block; font-weight: 800; color: #B7860B; background: var(--sun-s); padding: 4px 12px; border-radius: 99px; margin-bottom: 18px; font-size: 14px; }
.sp-confetti { position: absolute; inset: 0; pointer-events: none; }
.sp-confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: confetti 1.6s ease-in forwards; }

/* ── 토스트 ────────────────────────────────────────────── */
.jn-toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); z-index: 500; background: var(--text); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; }
.jn-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 준비중 ────────────────────────────────────────────── */
.coming {
  text-align: center; padding: 70px 20px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow);
}
.coming .c-emoji { font-size: 80px; animation: bounce 2s infinite; display: inline-block; }
.coming h2 { font-family: var(--font-fun); font-weight: 400; font-size: 28px; margin: 12px 0 6px; }
.coming p { color: var(--text-2); }

/* ── 로그인 ────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: 32px; padding: 36px 30px; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .logo-mark { width: 72px; height: 72px; border-radius: 24px; font-size: 38px; margin: 0 auto 12px; }
.login-logo h1 { font-family: var(--font-fun); font-weight: 400; font-size: 34px; color: var(--primary-d); }
.login-logo p { color: var(--text-2); font-size: 14px; }
.login-err { background: #FFECEC; color: #D64545; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.login-deco { display: flex; justify-content: center; gap: 10px; font-size: 26px; margin-top: 22px; opacity: .85; }

/* ── 애니메이션 ────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn   { from { opacity: 0; transform: translate(-50%, 50%) scale(.9); } to { opacity: 1; transform: translate(-50%, 50%) scale(1); } }
.sp-card { animation-name: popInCard; }
@keyframes popInCard { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes stampIn { 0% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 70% { transform: scale(.92) rotate(-8deg); opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }
@keyframes confetti { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============================================================
   반응형
   ============================================================ */

/* 우측 패널: 1200 미만 숨김 */
@media (max-width: 1199px) {
  body.has-right .jn-shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .jn-right { display: none; }
}

/* 태블릿 (768 ~ 1023): 사이드바 → 아이콘 레일 */
@media (max-width: 1023px) and (min-width: 768px) {
  :root { --side-w: 84px; }
  .jn-shell { gap: 20px; padding: 0 20px 0 12px; }
  body.has-right .jn-shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .side-logo { justify-content: center; padding: 4px 0 22px; }
  .logo-text, .nav-item span, .nav-badge, .nav-sub, .side-write span, .su-info, .su-out { display: none !important; }
  .nav-item { justify-content: center; padding: 14px; }
  .nav-item i { font-size: 26px; }
  .side-write { width: 56px; height: 56px; margin: 14px auto; padding: 0; border-radius: 20px; }
  .side-user { justify-content: center; padding: 8px; background: none; box-shadow: none; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 모바일 (< 768) */
@media (max-width: 767px) {
  body { font-size: 15px; padding-top: var(--topbar-h); padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .jn-shell, body.has-right .jn-shell { display: block; padding: 0 16px; }
  .jn-main { padding: 16px 0 28px; }

  /* 상단바 */
  .jn-topbar {
    display: flex; align-items: center; gap: 4px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--topbar-h);
    padding: 0 8px; background: rgba(255, 248, 241, .88); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .tb-btn { position: relative; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--text); }
  .tb-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-fun); font-size: 21px; color: var(--primary-d); }
  .tb-logo .logo-mark { width: 32px; height: 32px; border-radius: 11px; font-size: 17px; box-shadow: none; }
  .tb-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
  .tb-avatar { padding: 0 4px; }
  .dot-badge { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #FF4D6D; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }

  /* 사이드바 → 드로어 */
  .jn-side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 160; width: 280px; height: auto;
    background: var(--bg); padding: 20px 14px; transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  body.drawer-open .jn-side { transform: none; }
  .drawer-dim { position: fixed; inset: 0; z-index: 150; background: rgba(40,30,25,.4); }
  body.drawer-open .drawer-dim { display: block; }
  body.drawer-open { overflow: hidden; }
  .nav-sub { display: flex; }
  .side-write { display: none; }

  /* 하단 탭바 */
  .jn-tabbar {
    display: flex; align-items: center; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(214,120,80,.06);
  }
  .jn-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; font-weight: 600; color: var(--text-3); }
  .jn-tabbar a i { font-size: 25px; }
  .jn-tabbar a.on { color: var(--primary-d); }
  .tab-write {
    width: 52px; height: 52px; border-radius: 18px; margin-top: -20px;
    background: linear-gradient(135deg, #FF9A76, var(--primary)); color: #fff;
    box-shadow: 0 8px 18px rgba(255,122,89,.45); display: grid; place-items: center;
  }
  .tab-write i { font-size: 30px; }

  /* 바텀시트 */
  .sheet-body { left: 0; right: 0; bottom: 0; transform: none; width: 100%; border-radius: 28px 28px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation: slideUp .25s ease-out; }
  .sheet-handle { display: block; }

  .page-head h1 { font-size: 26px; }
  .hero { padding: 22px 20px; border-radius: 24px; }
  .hero h1 { font-size: 24px; }
  .hero .hero-deco { font-size: 72px; }
  .card-pad { padding: 18px; }
  .feed-card { border-radius: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g-body { padding: 10px 12px 12px; }
  .g-title { font-size: 14px; }
  .stamp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stamp { padding: 14px 6px 12px; border-radius: 18px; }
  .stamp-circle { width: 60px; height: 60px; font-size: 30px; }
  .stamp b { font-size: 12px; }
  .stamp small { display: none; }
  .cal { gap: 4px; }
  .cal .day { border-radius: 10px; font-size: 12px; }
  .cal .day .d-stamps .jn-avatar { width: 12px; height: 12px; font-size: 0; }
  .pv-title { font-size: 22px; }
  .jn-toast { bottom: calc(var(--tabbar-h) + 20px); }
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ============================================================
   관리자 영역
   ============================================================ */
body.adm { background: #F7F5F3; background-image: none; }
.adm-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: #2A2A33; color: #D9D9E0; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; color: #fff; font-family: var(--font-fun); font-size: 21px; }
.adm-logo .logo-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 19px; box-shadow: none; }
.adm-logo small { font-family: var(--font); font-size: 11px; background: var(--primary); padding: 2px 7px; border-radius: 6px; }
.adm-nav-label { font-size: 11px; color: #8A8A99; font-weight: 700; padding: 14px 10px 6px; letter-spacing: .5px; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #C6C6D0; }
.adm-nav a i { font-size: 20px; }
.adm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav a.on { background: var(--primary); color: #fff; }
.adm-main { padding: 26px 30px 60px; min-width: 0; }
.adm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.adm-top h1 { font-size: 22px; font-weight: 800; }
.adm-top .adm-crumb { font-size: 13px; color: var(--text-3); }
.adm-menu-btn { display: none; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.kpi small { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi b { display: block; font-size: 28px; font-weight: 800; margin-top: 4px; }
.kpi .kpi-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; }
.adm-card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.adm-card + .adm-card { margin-top: 16px; }
.adm-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adm-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-filter .input, .adm-filter .select { height: 40px; width: auto; min-width: 140px; border-radius: 12px; font-size: 14px; }

@media (max-width: 1023px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  body.adm { padding: 0; }
  .adm-shell { display: block; }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 160; width: 250px; transform: translateX(-100%); transition: transform .25s; }
  body.drawer-open .adm-side { transform: none; }
  .adm-main { padding: 16px; }
  .adm-menu-btn { display: grid; }
}

/* ============================================================
   야구 (관람일지 / 직관 성적)
   ============================================================ */
.hero.h-navy { background: linear-gradient(135deg, #2B4C8C, #1C2E5A 60%, #E5484D); }
.chip.c-navy { background: #E3EAF7; color: #1F3A73; }
.wo-item.c-navy { background: #E6ECF8; }
.write-options .wo-item:last-child:nth-child(odd) { grid-column: 1 / -1; }

.bb-res { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #fff; background: #9CA3AF; }
.bb-res.r-W { background: #2563EB; }
.bb-res.r-L { background: #E5484D; }
.bb-res.r-D { background: #9CA3AF; }
.bb-res.r-C { background: #CBD5E1; color: #475569; }
.bb-res.r-N { background: #E5E7EB; color: #6B7280; }

.bb-team-dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.bb-board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px 6px; }
.bb-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bb-side b { font-size: 15px; }
.bb-side small { font-size: 11px; color: var(--text-3); }
.bb-side.mine b { color: var(--primary-d); }
.bb-side.mine b::after { content: ' 📣'; }
.bb-score { text-align: center; }
.bb-score span { font-size: 34px; font-weight: 900; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.bb-score em { font-style: normal; font-size: 26px; color: var(--text-3); margin: 0 8px; }
.bb-score > div { margin-top: 2px; }
.bb-board.lg .bb-team-dot { width: 60px; height: 60px; font-size: 17px; }
.bb-board.lg .bb-score span { font-size: 46px; }
.bb-board.lg .bb-side b { font-size: 17px; }

.bb-summary { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.bb-sum-main { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bb-sum-cell { text-align: center; background: var(--bg); border-radius: 14px; padding: 12px 4px; }
.bb-sum-cell b { display: block; font-size: 26px; font-family: var(--font-fun); font-weight: 400; }
.bb-sum-cell span { font-size: 12px; color: var(--text-2); }
.bb-sum-cell.win b { color: #2563EB; }
.bb-sum-cell.lose b { color: #E5484D; }
.bb-sum-cell.rate { background: #1F3A73; color: #fff; }
.bb-sum-cell.rate span { color: rgba(255,255,255,.8); }
.bb-recent { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.bb-recent small { color: var(--text-3); font-weight: 700; }
.bb-recent > div { display: flex; gap: 4px; flex-wrap: wrap; }
.bb-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.bb-dot.r-W { background: #2563EB; } .bb-dot.r-L { background: #E5484D; } .bb-dot.r-D { background: #9CA3AF; }

.bb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.bb-card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .15s; }
.bb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.bb-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bb-date { font-weight: 800; font-size: 14px; margin-right: auto; }
.bb-card-title { font-weight: 700; font-size: 15px; text-align: center; color: var(--text-2); }
.bb-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.bb-avatars { display: inline-flex; }
.bb-avatars .jn-avatar { margin-right: -6px; border: 2px solid #fff; }
.bb-meta { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--text-3); }
.bb-meta i { font-size: 16px; margin-left: 6px; }
.bb-view { background: var(--bg); border-radius: 18px; padding: 14px; margin-bottom: 16px; }

.bb-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.bb-person { background: var(--bg); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bb-p-head { display: flex; align-items: center; gap: 10px; }
.bb-p-head b { font-size: 16px; }
.bb-p-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.bb-p-badges .chip { height: 24px; font-size: 12px; }
.bb-p-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.bb-p-stats b { display: block; font-size: 20px; font-weight: 800; }
.bb-p-stats small { font-size: 11px; color: var(--text-3); }
.bb-p-stats .win b { color: #2563EB; } .bb-p-stats .lose b { color: #E5484D; } .bb-p-stats .rate b { color: #1F3A73; }
.bb-p-last { font-size: 12px; color: var(--text-3); }
.bb-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line); }
.bb-bar span.w { background: #2563EB; } .bb-bar span.d { background: #CBD5E1; } .bb-bar span.l { background: #E5484D; }

@media (max-width: 767px) {
  .bb-sum-main { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .bb-sum-cell { padding: 10px 2px; }
  .bb-sum-cell b { font-size: 20px; }
  .bb-list { grid-template-columns: 1fr; }
  .bb-score span { font-size: 28px; }
  .bb-board.lg .bb-score span { font-size: 36px; }
}

/* ============================================================
   가족 일기 (일정 1건 + 가족별 일기)
   ============================================================ */
.wo-item.c-coral { background: var(--primary-s); }

/* 일정 상세 : 가족별 작성 현황 */
.diary-zone { margin-top: 16px; }
.diary-who { display: flex; gap: 14px; flex-wrap: wrap; }
.dw-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; }
.dw-item .jn-avatar { width: 52px; height: 52px; font-size: 20px; filter: grayscale(1); opacity: .45; transition: filter .2s, opacity .2s; }
.dw-item.done .jn-avatar { filter: none; opacity: 1; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary); }
.dw-item span { font-size: 12px; color: var(--text-2); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-item em { position: absolute; top: -4px; right: 2px; font-style: normal; font-size: 16px; }

/* 일기 카드 */
.diary-card { margin-top: 14px; overflow: hidden; border-left: 5px solid var(--primary); }
.diary-body { padding: 0 18px 4px; }
.diary-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.diary-card .pv-content { font-size: 15px; line-height: 1.75; }
.diary-cmts { padding: 4px 16px 14px; background: #FFFCF9; border-top: 1px solid var(--line); }
.diary-cmts .cmt-form .textarea { min-height: 42px; height: 42px; padding: 10px 16px; font-size: 14px; }
.diary-cmts .sticker-pick button { width: 32px; height: 32px; font-size: 18px; }

/* 피드 카드 : 가족 일기 요약 */
.fc-diary { display: flex; align-items: center; gap: 8px; margin: 12px 14px 0; padding: 10px 12px; background: var(--bg); border-radius: 16px; }
.fd-line { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.fd-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-text b { color: var(--text); }
.fd-cnt { font-size: 13px; font-weight: 700; color: var(--primary-d); flex-shrink: 0; }
.fd-empty { flex: 1; font-size: 13px; color: var(--text-3); }
.fd-write { flex-shrink: 0; }

/* 일기 쓰기 : 대상 일정 */
.diary-target { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 16px; }
.diary-target img, .diary-target .dt-ico { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.diary-target .dt-ico { display: grid; place-items: center; font-size: 34px; background: var(--bg-2); }
.diary-target div { display: flex; flex-direction: column; min-width: 0; }
.diary-target b { font-size: 17px; }
.diary-target small { font-size: 12px; color: var(--text-3); }

/* 일정 고르기 / 내 일기 목록 */
.diary-pick { display: flex; flex-direction: column; gap: 10px; }
.dp-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 10px 14px 10px 10px; box-shadow: var(--shadow); transition: transform .12s; }
.dp-item:hover { transform: translateY(-2px); }
.dp-thumb { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; font-size: 30px; background: var(--bg-2); }
.dp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dp-info b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-info small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-state { flex-shrink: 0; font-size: 13px; font-weight: 800; color: #fff; background: var(--primary); padding: 6px 12px; border-radius: 99px; }
.dp-item.done .dp-state { background: var(--mint-s); color: #179372; }

/* 탭 안 숫자 배지 (연도별 횟수 등) */
.jn-tabs .tab-cnt { margin-left: 6px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; background: var(--bg-2); color: var(--text-2); }
.jn-tabs a.on .tab-cnt { background: rgba(255,255,255,.22); color: #fff; }

/* ============================================================
   캠핑지도
   ============================================================ */
.camp-map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.camp-map-box { position: relative; }
.camp-map { width: 100%; height: calc(100vh - 190px); min-height: 420px; border-radius: 24px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.map-empty { height: 100%; display: grid; place-items: center; text-align: center; font-size: 15px; color: var(--text-3); line-height: 2; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 5; display: flex; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.92); padding: 6px 12px; border-radius: 99px; font-size: 12px; color: var(--text-2); box-shadow: var(--shadow); }
.map-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.map-legend .lg.v { background: var(--primary); }
.map-legend .lg.w { background: #fff; border: 2px solid var(--pink); }
.map-pick-bar { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; background: var(--text); color: #fff; padding: 8px 10px 8px 16px; border-radius: 99px; font-size: 14px; box-shadow: var(--shadow-lg); white-space: nowrap; }

.cm-pin { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #FF9A76, var(--primary)); color: #fff; font-weight: 900; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(214,120,80,.45); cursor: pointer; transition: transform .15s; }
.cm-pin:hover { transform: scale(1.15); }
.cm-pin.wish { background: #fff; border-color: var(--pink); font-size: 13px; }
.cm-pin.none { background: #CBD5E1; }

.cm-info { position: relative; width: 240px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; font-family: var(--font); }
.cm-info img { width: 100%; height: 110px; object-fit: cover; display: block; }
.cmi-body { padding: 12px 14px 14px; }
.cmi-body > b { display: block; font-size: 15px; }
.cmi-body > small { color: var(--text-3); font-size: 12px; }
.cmi-body p { font-size: 13px; margin: 8px 0 10px; color: var(--text-2); }
.cmi-btns { display: flex; gap: 6px; }
.cmi-close { position: absolute; right: 8px; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 16px; line-height: 1; }

.camp-map-list { height: calc(100vh - 190px); min-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.cml-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.cml-item:hover { background: var(--primary-s); }
.cml-cnt { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 900; font-size: 14px; color: #fff; background: var(--primary); }
.cml-cnt.zero { background: var(--bg-2); color: var(--text-3); }
.cml-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cml-info b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cml-info small { font-size: 12px; color: var(--text-3); }
.cml-nopos { font-size: 12px; color: var(--text-3); flex-shrink: 0; }

@media (max-width: 1023px) {
  .camp-map-wrap { grid-template-columns: 1fr; }
  .camp-map { height: 62vh; min-height: 360px; }
  .camp-map-list { height: auto; min-height: 0; overflow: visible; }
}

/* ============================================================
   야구 - 한화 이글스 테마 (오렌지 #FF6600 / 차콜 #2B2B2B)
   ============================================================ */
:root { --hw-orange: #FF6600; --hw-orange-d: #E85A00; --hw-orange-s: #FFEDE0; --hw-dark: #2B2B2B; }
.hero.h-navy { background: linear-gradient(135deg, #FF9A3D 0%, var(--hw-orange) 50%, var(--hw-dark) 100%); }
.chip.c-navy { background: var(--hw-orange-s); color: var(--hw-orange-d); }
.wo-item.c-navy { background: var(--hw-orange-s); }
.bb-res.r-W, .bb-dot.r-W { background: var(--hw-orange); }
.bb-res.r-L, .bb-dot.r-L { background: var(--hw-dark); }
.bb-bar span.w { background: var(--hw-orange); }
.bb-bar span.l { background: var(--hw-dark); }
.bb-sum-cell.win b, .bb-p-stats .win b { color: var(--hw-orange); }
.bb-sum-cell.lose b, .bb-p-stats .lose b { color: var(--hw-dark); }
.bb-sum-cell.rate { background: linear-gradient(135deg, var(--hw-orange), var(--hw-orange-d)); }
.bb-p-stats .rate b { color: var(--hw-orange-d); }
.bb-side.mine b { color: var(--hw-orange); }
.bb-side.mine b::after { content: ' 🦅'; }
.bb-side.mine .bb-team-dot { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--hw-orange); }
.bb-card { border-top: 4px solid var(--hw-orange); }
.bb-starter { text-align: center; font-size: 13px; color: var(--text-2); }
.bb-starter b { color: var(--hw-orange-d); }

/* ============================================================
   스탬프 미션 안내
   ============================================================ */
.stamp { cursor: pointer; }
.stamp .st-mission { color: var(--text-2); font-size: 11.5px; line-height: 1.35; margin: 4px 0 2px; min-height: 31px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stamp.locked .st-mission { color: var(--text-2); }

.stamp-guide { margin-bottom: 16px; }
.stamp-guide summary { cursor: pointer; font-weight: 800; font-size: 16px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.stamp-guide summary::-webkit-details-marker { display: none; }
.stamp-guide summary small { font-weight: 500; font-size: 12px; color: var(--text-3); }
.stamp-guide[open] summary small { display: none; }
.sg-body { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.sg-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.sg-points li { background: var(--bg); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.sg-points span { font-size: 13px; color: var(--text); font-weight: 700; }
.sg-points b { font-size: 20px; color: var(--primary-d); font-family: var(--font-fun); font-weight: 400; }
.sg-points small { font-size: 11px; color: var(--text-3); }

.stamp-detail { text-align: center; }
.sd-circle { width: 110px; height: 110px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 54px; background: color-mix(in srgb, var(--c, #FF7A59) 15%, white); border: 4px dashed color-mix(in srgb, var(--c, #FF7A59) 60%, white); box-shadow: inset 0 0 0 6px #fff; transform: rotate(-8deg); }
.sd-circle.locked { filter: grayscale(1); opacity: .45; }
.sd-name { font-size: 22px; font-weight: 800; }
.sd-desc { color: var(--text-2); font-size: 14px; margin: 4px 0 14px; }
.sd-mission { background: var(--sun-s); border-radius: 16px; padding: 12px 14px; text-align: left; margin-bottom: 12px; }
.sd-mission small { display: block; font-size: 12px; font-weight: 800; color: #B7860B; }
.sd-mission b { display: block; font-size: 16px; margin: 2px 0 4px; }
.sd-mission p { font-size: 13px; color: var(--text-2); }
.sd-prog { margin-bottom: 12px; text-align: left; }
.sd-prog-txt { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.sd-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.sd-point { color: #B7860B; }
.sd-state { color: var(--text-2); }

/* ============================================================
   앱 설치 안내 (/app/)
   ============================================================ */
@media (display-mode: standalone) { .hide-in-app { display: none !important; } }
.app-card { max-width: 460px; }
.app-logo { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 12px; box-shadow: 0 8px 20px rgba(255,122,89,.35); }
.app-sec { margin-top: 18px; }
.app-sec h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.app-sec .btn small { font-weight: 500; opacity: .85; }
.app-meta { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 8px; }
.app-steps { margin: 14px 0 0; padding-left: 20px; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.app-steps li { margin-bottom: 6px; }
.app-steps b { color: var(--text); }
.app-done { background: var(--mint-s); color: #179372; font-weight: 800; text-align: center; padding: 14px; border-radius: 16px; margin-bottom: 12px; }
.app-pc { background: var(--bg); border-radius: 16px; padding: 14px; font-size: 14px; color: var(--text-2); text-align: center; }
.app-install-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; padding: 12px; border-radius: 14px; background: var(--primary-s); color: var(--primary-d); font-size: 14px; }
.app-install-link i { font-size: 20px; }

/* 로그인 : 자동 로그인 옵션 */
.auto-login { display: flex; align-items: flex-start; gap: 10px; margin: -4px 0 16px; cursor: pointer; }
.auto-login input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.auto-login b { font-size: 14px; }
.auto-login small { display: block; font-size: 12px; color: var(--text-3); }
