/* ============================================================
   라이더세상 v11 디자인 토큰
   ★ 라이트 기본 (:root) + 다크 토글 ([data-theme="dark"]) ★
   기준: _design/v11_design_system.md §7
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@latest/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  /* ── 폰트 ── */
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;

  /* ── 타입 스케일 (A1 §B-3) ── */
  --text-2xs: 0.625rem; --text-xs: 0.75rem; --text-sm: 0.875rem;
  --text-base: 1rem;    --text-md: 1.125rem; --text-lg: 1.25rem;
  --text-xl: 1.5rem;    --text-2xl: 1.875rem; --text-3xl: 2.25rem;
  --text-4xl: 3rem;     --text-5xl: 4rem;
  --text-list-title: 0.94rem;  /* 목록 글 제목 15px */
  --text-body: 1rem;           /* 본문 16px */
  --text-meta: 0.81rem;        /* 메타(작성자·시간) 13px */

  --font-w-regular: 400; --font-w-medium: 500; --font-w-semibold: 600;
  --font-w-bold: 700;    --font-w-extrabold: 800;

  --leading-tight: 1.3; --leading-normal: 1.55; --leading-loose: 1.7;
  --leading-body: 1.8;  /* 글 상세 본문 */

  /* ── 스페이싱 ── */
  --space-0:  0;     --space-1:  4px;   --space-2:  8px;   --space-3:  12px;
  --space-4:  16px;  --space-5:  20px;  --space-6:  24px;  --space-8:  32px;
  --space-10: 40px;  --space-12: 48px;  --space-16: 64px;  --space-20: 80px;

  /* ── 반지름 ── */
  --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px;
  --radius-lg: 16px; --radius-xl: 24px; --radius-pill: 999px;

  /* ── 컨테이너 ── */
  --container-md: 414px; --container-lg: 768px; --container-xl: 1024px;
  --page-pad: 16px;

  /* ── 모션 ── */
  --ease-out:    cubic-bezier(0.32, 0.72, 0.42, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-fast: 120ms; --motion-base: 180ms;
  --motion-medium: 280ms; --motion-slow: 480ms;
  --motion-celebrate: 800ms;

  /* ── 모바일 셸 사양 ── */
  --m-gnb-h: 50px;
  --m-chip-h: 40px;
  --m-tab-h: 64px;
  --m-fab-size: 56px;
  --m-fab-margin: 16px;
  --m-safe-bot: env(safe-area-inset-bottom, 0px);

  /* ════════ 라이트 컬러 (디폴트) — A3 §1-2 ════════ */
  --bg-1: #FBFBFA; --bg-2: #FFFFFF; --bg-3: #F2F4F7;
  --bg-elevated: #FFFFFF; --bg-overlay: rgba(15, 18, 24, 0.4);

  --fg-1: #1A1D24; --fg-2: #4B5563; --fg-3: #8B92A0;
  --fg-on-primary: #FFFFFF;

  --border: #E4E7EC; --border-strong: #CDD2DA; --divider: #EFF1F4;

  --primary: #D97706; --primary-hover: #B45309;
  --primary-soft: rgba(217, 119, 6, 0.10);
  --primary-ring: rgba(217, 119, 6, 0.30);

  --accent: #0284C7; --accent-soft: rgba(2, 132, 199, 0.10);

  --success: #15803D; --success-soft: rgba(21, 128, 61, 0.10);
  --warning: #B45309; --warning-soft: rgba(180, 83, 9, 0.12);
  --danger:  #DC2626; --danger-soft:  rgba(220, 38, 38, 0.10);
  --info:    #2563EB; --info-soft:    rgba(37, 99, 235, 0.10);

  --positive: #15803D; --positive-strong: #166534;
  --critical: #DC2626;
  --critical-soft: rgba(220, 38, 38, 0.10);
  --critical-ring: rgba(220, 38, 38, 0.40);

  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06);
  --shadow-md: 0 4px 12px rgba(16,24,40,0.08);
  --shadow-lg: 0 12px 36px rgba(16,24,40,0.12);

  /* 6탭 카테고리 (라이트 — A3 §1-4) */
  --cat-home:   #D97706; --cat-info:   #0284C7; --cat-safety: #DC2626;
  --cat-me:     #D97706; --cat-gear:   #7C3AED; --cat-local:  #059669;
  /* legacy 별칭 (구 5단 cat 변수 호환) */
  --cat-daily:  #D97706; --cat-people: #059669;
}

/* ════════ 다크 (토글) — v10 청흑 계승 (A3 §1-3) ════════ */
:root[data-theme="dark"] {
  --bg-1: #0B0F14; --bg-2: #121821; --bg-3: #1A2230;
  --bg-elevated: #1F2937; --bg-overlay: rgba(11, 15, 20, 0.7);

  --fg-1: #F3F4F6; --fg-2: #B7BFCC; --fg-3: #6B7280;
  --fg-on-primary: #1A1207;

  --border: #2A3344; --border-strong: #3B475C; --divider: #1F2733;

  --primary: #FBBF24; --primary-hover: #F59E0B;
  --primary-soft: rgba(251, 191, 36, 0.12);
  --primary-ring: rgba(251, 191, 36, 0.40);

  --accent: #38BDF8; --accent-soft: rgba(56, 189, 248, 0.12);

  --success: #34D399; --success-soft: rgba(52, 211, 153, 0.14);
  --warning: #FBBF24; --warning-soft: rgba(251, 191, 36, 0.14);
  --danger:  #F87171; --danger-soft:  rgba(248, 113, 113, 0.14);
  --info:    #60A5FA; --info-soft:    rgba(96, 165, 250, 0.14);

  --positive: #34D399; --positive-strong: #10B981;
  --critical: #EF4444;
  --critical-soft: rgba(239, 68, 68, 0.16);
  --critical-ring: rgba(239, 68, 68, 0.50);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.55);

  /* 6탭 카테고리 (다크) */
  --cat-home:   #FBBF24; --cat-info:   #38BDF8; --cat-safety: #EF4444;
  --cat-me:     #FBBF24; --cat-gear:   #A78BFA; --cat-local:  #34D399;
  --cat-daily:  #FBBF24; --cat-people: #34D399;
}

/* ── 라이트 명시 선택 (디폴트와 동일 — 토글 복원용) ── */
:root[data-theme="light"] {
  --bg-1: #FBFBFA; --bg-2: #FFFFFF; --bg-3: #F2F4F7;
  --bg-elevated: #FFFFFF; --bg-overlay: rgba(15, 18, 24, 0.4);
  --fg-1: #1A1D24; --fg-2: #4B5563; --fg-3: #8B92A0;
  --fg-on-primary: #FFFFFF;
  --border: #E4E7EC; --border-strong: #CDD2DA; --divider: #EFF1F4;
  --primary: #D97706; --primary-hover: #B45309;
  --primary-soft: rgba(217, 119, 6, 0.10);
  --primary-ring: rgba(217, 119, 6, 0.30);
  --accent: #0284C7; --accent-soft: rgba(2, 132, 199, 0.10);
  --success: #15803D; --success-soft: rgba(21, 128, 61, 0.10);
  --warning: #B45309; --warning-soft: rgba(180, 83, 9, 0.12);
  --danger:  #DC2626; --danger-soft:  rgba(220, 38, 38, 0.10);
  --info:    #2563EB; --info-soft:    rgba(37, 99, 235, 0.10);
  --positive: #15803D; --positive-strong: #166534;
  --critical: #DC2626;
  --critical-soft: rgba(220, 38, 38, 0.10);
  --critical-ring: rgba(220, 38, 38, 0.40);
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06);
  --shadow-md: 0 4px 12px rgba(16,24,40,0.08);
  --shadow-lg: 0 12px 36px rgba(16,24,40,0.12);
  --cat-home:   #D97706; --cat-info:   #0284C7; --cat-safety: #DC2626;
  --cat-me:     #D97706; --cat-gear:   #7C3AED; --cat-local:  #059669;
  --cat-daily:  #D97706; --cat-people: #059669;
}

/* ── 적색 환원 모드 (다크 베이스 + danger 채도↓) ── */
:root[data-theme="reduced-red"] {
  --bg-1: #0B0F14; --bg-2: #121821; --bg-3: #1A2230;
  --bg-elevated: #1F2937;
  --fg-1: #F3F4F6; --fg-2: #B7BFCC; --fg-3: #6B7280;
  --fg-on-primary: #1A1207;
  --border: #2A3344; --border-strong: #3B475C; --divider: #1F2733;
  --primary: #FBBF24; --primary-hover: #F59E0B;
  --primary-soft: rgba(251, 191, 36, 0.12);
  --primary-ring: rgba(251, 191, 36, 0.40);
  --accent: #38BDF8; --accent-soft: rgba(56, 189, 248, 0.12);
  --success: #34D399; --info: #60A5FA;
  --danger:  #D97757; --danger-soft:  rgba(217, 119, 87, 0.12);
  --positive: #34D399; --positive-strong: #10B981;
  --critical: #C2410C; --critical-soft: rgba(194, 65, 12, 0.14);
  --critical-ring: rgba(194, 65, 12, 0.40);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.55);
  --cat-home:   #FBBF24; --cat-info:   #38BDF8; --cat-safety: #D97757;
  --cat-me:     #FBBF24; --cat-gear:   #A78BFA; --cat-local:  #34D399;
  --cat-daily:  #FBBF24; --cat-people: #34D399;
}

/* ════════ legacy 별칭 (기존 bbd-*·pl-* 컴포넌트 무수정 호환) ════════
   A3 §7-3: 구 클래스가 쓰는 --bg/--text/--accent 등을 v11 토큰에 연결.
   라이트/다크/적색환원 모든 테마에서 현재 토큰을 따라간다. */
:root,
:root[data-theme="dark"],
:root[data-theme="light"],
:root[data-theme="reduced-red"] {
  --bg:   var(--bg-1);  --bg2: var(--bg-2); --bg3: var(--bg-3); --bg4: var(--bg-3);
  --text: var(--fg-1);  --text2: var(--fg-2); --text3: var(--fg-3);
  --accent: var(--primary); --accent2: var(--primary-hover);
  --green: var(--success); --red: var(--danger); --blue: var(--info);
  --yellow: var(--warning); --purple: var(--cat-gear);
  --card-shadow: var(--shadow-sm); --card-shadow-hover: var(--shadow-md);
  --border2: var(--border-strong);
  /* legacy 레이아웃 변수 (구 v4 블록에서 계승) */
  --sidebar-w: 240px;
  --gnb-h: 60px;
}

/* ── 모바일 셸 컴포넌트 (v5) ─────────────────────────────────── */

/* MiniGNB (50pt) */
.mini-gnb {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--m-gnb-h);
  padding: 0 var(--page-pad);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.mini-gnb-logo { display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 1rem; color: var(--fg-1); text-decoration: none; }
.mini-gnb-logo-mark { color: var(--primary); font-size: 0.6rem; }
.mini-gnb-right { display: flex; align-items: center; gap: 8px; }
.mini-gnb-btn { position: relative; width: 40px; height: 40px;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: var(--fg-2); background: transparent; border: none; cursor: pointer; }
.mini-gnb-btn:hover { background: var(--bg-3); }
.mini-gnb-badge { position: absolute; top: 6px; right: 6px;
  background: var(--critical); color: #fff; border-radius: 999px;
  font-size: 0.6rem; padding: 1px 5px; font-weight: 700; min-width: 16px; text-align: center; }
.mini-gnb-avatar { width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: var(--fg-on-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; text-decoration: none; }

/* CategoryChips (40pt 가로 스크롤) */
.cat-chips { display: flex; gap: 8px; padding: 8px var(--page-pad);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  background: var(--bg-1); border-bottom: 1px solid var(--divider);
  height: var(--m-chip-h); align-items: center; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip { flex: 0 0 auto; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--bg-3); color: var(--fg-2); font-size: 0.85rem; font-weight: 500;
  white-space: nowrap; text-decoration: none;
  transition: background var(--motion-fast) var(--ease-out);
  border: 1px solid transparent; }
.cat-chip:active { transform: scale(0.96); }
.cat-chip.active { background: var(--chip-color, var(--primary));
  color: var(--fg-on-primary); font-weight: 600; }
.cat-chip i { margin-right: 4px; }

/* FAB (56pt 우하단) */
.fab-container { position: fixed; right: var(--m-fab-margin);
  bottom: calc(var(--m-tab-h) + var(--m-safe-bot) + 14px);
  z-index: 90; }
.fab { width: var(--m-fab-size); height: var(--m-fab-size);
  border-radius: 50%; background: var(--primary); color: var(--fg-on-primary);
  border: none; box-shadow: var(--shadow-lg); font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform var(--motion-fast) var(--ease-spring); }
.fab:active { transform: scale(0.92); }
.fab:hover { background: var(--primary-hover); }

/* BottomTabBar (64pt + safe area) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 100; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--m-tab-h) + var(--m-safe-bot));
  padding-bottom: var(--m-safe-bot);
  background: var(--bg-2); border-top: 1px solid var(--border);
  box-shadow: var(--shadow-md); }
.tabbar-item { position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--fg-3); text-decoration: none;
  font-size: 0.65rem; padding: 6px 0; min-height: 48px; }
.tabbar-item.active { color: var(--fg-1); }
.tabbar-icon { font-size: 1.25rem; color: var(--fg-3);
  transition: color var(--motion-fast) var(--ease-out); }
.tabbar-item.active .tabbar-icon { color: var(--cat-color, var(--primary)); }
.tabbar-label { font-weight: 500; }
.tabbar-item.active .tabbar-label { font-weight: 700; }
.tabbar-indicator { position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 28px; height: 3px;
  border-radius: 0 0 4px 4px; }

/* 모바일 셸 활성 시 메인 콘텐츠 패딩 보정 */
.has-mobile-shell main, .has-mobile-shell .main-content {
  padding-bottom: calc(var(--m-tab-h) + var(--m-safe-bot) + 16px) !important;
}

/* v12: 모바일 셸 브레이크포인트 통일 → 900px (데스크톱 셸 전환점과 일치).
   M1 §4-1: 768 vs 900 불일치 제거. 900px 이하 = 모바일(셸 노출), 901px+ = PC.
   (.tabbar/.fab-container 의 실제 노출은 아래 901px 규칙이 단일 진실원천) */
@media (min-width: 901px) {
  .mini-gnb, .cat-chips { display: none; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   ↓ legacy v4 PC 스타일 (호환 유지)
   ============================================================ */

/* ============================================================
   라이더세상 (RiderWorld) — PC 버전 스타일 v4
   레이아웃: 상단 GNB + 사이드바(240px) + 메인 콘텐츠
   기준: 1280px 와이드스크린, 최소 1024px
   ============================================================ */

/* ── 0. CSS 변수 ────────────────────────────────────────────── */
/* v11: legacy v4 :root(라이트)+다크 블록은 §7 통합 토큰 + legacy 별칭으로
   대체됨. 여기서 재정의하지 않는다 (--bg/--text/--accent 등은 위 별칭이 담당). */

/* ── 1. 리셋 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* A3 §7: baseline 16px (구 14px → rem 1.14배 ↑). PC 빡빡 시 ≥1024px 15px 보정(하단) */
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01" 1;   /* 변형 숫자 */
  background: var(--bg-1);
  color: var(--fg-1);
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--primary-soft); color: var(--primary-hover); }
.tnum { font-variant-numeric: tabular-nums; }
/* 금액·추천·조회·일차 = tabular-nums (A1 §B-3 자릿수 고정) */
.bbd-likes, .bbd-views, .bbd-date, .metric, .earnings-amount,
.streak-num, .rate-badge, .post-table .col-likes, .post-table .col-views {
  font-variant-numeric: tabular-nums;
}

/* A3 §7: PC(≥1024px) 빡빡함 보정 — baseline 16px → 15px 미세 축소 */
@media (min-width: 1024px) { html { font-size: 15px; } }

/* ── 2. 전체 레이아웃 쉘 ─────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-rows: var(--gnb-h) 1fr;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-areas:
    "gnb gnb"
    "sidebar main";
  /* ★ 고정 높이: grid 자식(main-content)이 height:100% 기준으로 사용 가능 */
  height: 100vh;
  overflow: hidden;
}

/* ── 3. 상단 GNB ─────────────────────────────────────────────── */
.gnb {
  grid-area: gnb;
  position: sticky; top: 0; z-index: 200;
  height: var(--gnb-h);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
}
[data-theme="dark"] .gnb {
  background: #1a1a1a;
  border-bottom-color: #333;
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}
.gnb-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.15rem; font-weight: 800;
  color: var(--accent); white-space: nowrap;
  text-decoration: none;
}
.gnb-logo-icon { font-size: 1.4rem; }
.gnb-logo-sub  { font-size: .65rem; font-weight: 400; color: var(--text3); margin-left: 2px; }

.gnb-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 24px; flex: 1;
}
.gnb-nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  font-size: .85rem; font-weight: 500;
  color: var(--text2);
  transition: all .15s;
  white-space: nowrap;
}
.gnb-nav-item:hover   { background: var(--bg3); color: var(--text); }
.gnb-nav-item.active  { background: rgba(232,105,10,.1); color: var(--accent); font-weight: 600; }
[data-theme="dark"] .gnb-nav-item.active { background: rgba(255,102,0,.12); }
.gnb-nav-item i       { font-size: .9rem; width: 16px; text-align: center; }

.gnb-right {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
}
.gnb-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--text2);
  transition: all .15s; cursor: pointer;
}
.gnb-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.gnb-admin-btn { border-color: rgba(232,105,10,.4); color: var(--accent); }
.gnb-admin-btn:hover { background: var(--accent); color: #fff; }

/* ── DEV 계정 전환 드롭다운 ── */
.dev-switcher { position: relative; }
.dev-switcher-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 10px; font-size: .78rem; border-radius: 8px;
  border: 1px dashed rgba(156,39,176,.5) !important;
  color: #9c27b0 !important;
}
.dev-switcher-btn:hover { background: rgba(156,39,176,.12) !important; border-color: #9c27b0 !important; color: #9c27b0 !important; }
.dev-switcher-label { font-size: .72rem; font-weight: 600; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  min-width: 180px; z-index: 2000; overflow: hidden;
}
.dev-dropdown.open { display: block; }
.dev-dropdown-title {
  padding: 8px 14px; font-size: .72rem; font-weight: 700;
  color: #9c27b0; border-bottom: 1px solid var(--border);
  background: rgba(156,39,176,.06);
}
.dev-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 14px; background: none; border: none;
  font-size: .82rem; color: var(--text); cursor: pointer; text-align: left;
  transition: background .12s;
}
.dev-dropdown-item:hover { background: var(--bg3); }
.dev-user-badge {
  font-size: .62rem; font-weight: 700; padding: 1px 5px;
  border-radius: 4px; background: rgba(156,39,176,.15); color: #9c27b0; flex-shrink: 0;
}
.dev-user-badge.admin { background: rgba(255,102,0,.15); color: #ff6600; }

.gnb-user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 20px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .82rem; cursor: pointer;
  transition: all .15s;
}
.gnb-user-chip:hover { border-color: var(--accent); }
.gnb-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: #fff; font-weight: 700; flex-shrink: 0;
}
.gnb-points {
  font-size: .78rem; font-weight: 600; color: var(--accent);
}

/* ── 4. 사이드바 ─────────────────────────────────────────────── */
/* 라이트 모드에서도 사이드바는 어두운 배경 유지 (시각적 대비) */
.sidebar {
  grid-area: sidebar;
  width: var(--sidebar-w);
  background: #1e2330;           /* 사이드바는 항상 다크 */
  border-right: 1px solid #2a3040;
  position: sticky; top: var(--gnb-h);
  height: calc(100vh - var(--gnb-h));
  overflow-y: auto; overflow-x: hidden;
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #3a4255; border-radius: 2px; }

.sidebar-section-label {
  font-size: .68rem; font-weight: 700; color: #5a6380;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 8px 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: .85rem; font-weight: 500; color: #8b95ad;
  transition: all .15s; cursor: pointer;
}
.sidebar-item:hover  { background: #252d40; color: #c8d0e0; }
.sidebar-item.active {
  background: rgba(232,105,10,.15);
  color: var(--accent);
  font-weight: 600;
}
/* 다크모드에서도 동일 스타일 유지 */
[data-theme="dark"] .sidebar {
  background: #111620;
  border-right-color: #1e2330;
}
[data-theme="dark"] .sidebar-item.active {
  background: rgba(255,102,0,.15);
  color: #ff6600;
}
.sidebar-item i      { font-size: .9rem; width: 18px; text-align: center; }
.sidebar-divider     { height: 1px; background: #2a3040; margin: 8px 0; }
[data-theme="dark"] .sidebar-divider { background: #222; }

.sidebar-item-adult { color: #ef5350 !important; }
.sidebar-item-adult:hover { color: #f44336 !important; }

.sidebar-point-card {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid #2a3040;
}
[data-theme="dark"] .sidebar-point-card { border-top-color: #222; }
.sidebar-point-inner {
  background: #252d40; border-radius: 10px; padding: 12px;
}
[data-theme="dark"] .sidebar-point-inner { background: var(--bg3); }
.sidebar-point-label { font-size: .72rem; color: #5a6380; margin-bottom: 3px; }
.sidebar-point-val   { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.sidebar-point-sub   { font-size: .7rem; color: #5a6380; margin-top: 2px; }
.sidebar-daily-btns  { display: flex; gap: 6px; margin-top: 8px; }
.sidebar-daily-btn   {
  flex: 1; text-align: center; padding: 6px 4px;
  background: #1e2330; border: 1px solid #3a4255;
  border-radius: 6px; font-size: .72rem; color: #8b95ad;
  transition: all .15s;
}
[data-theme="dark"] .sidebar-daily-btn {
  background: var(--bg2); border-color: var(--border); color: var(--text2);
}
.sidebar-daily-btn:hover  { border-color: var(--accent); color: var(--accent); }
.sidebar-daily-btn.done   { background: rgba(22,163,74,.12); color: #16a34a; border-color: #16a34a; }

/* ── 5. 메인 콘텐츠 영역 ─────────────────────────────────────── */
.main-content {
  grid-area: main;
  /* grid 1fr row 높이를 100%로 채움 — no-padding 페이지에서 sp-wrap이 % 기준으로 사용 */
  height: 100%;
  min-height: 0;
  padding: 24px 32px;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
/* 앱 스타일 페이지 (정비소 등) – 패딩 제거, height 100% 상속, flex column */
.main-content.no-padding {
  padding: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  overflow-y: unset !important;
  display: flex !important;
  flex-direction: column !important;
  /* height: 100%는 .main-content 기본값 상속 */
}

/* 페이지 타이틀 */
.page-title {
  font-size: 1.25rem; font-weight: 700; color: var(--text);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.page-title i { color: var(--accent); font-size: 1.1rem; }
.page-title .page-title-sub {
  font-size: .82rem; font-weight: 400; color: var(--text3); margin-left: 6px;
}

/* ── 6. 카드 컴포넌트 ─────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--card-shadow-hover); }
.card-pad       { padding: 20px 24px; }
.card-pad-sm    { padding: 14px 18px; }
.card + .card   { margin-top: 12px; }
.card-header    {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: #fff;
}
[data-theme="dark"] .card-header { background: transparent; }
.card-header-title {
  font-size: .95rem; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  color: var(--text);
}
.card-header-title i { color: var(--accent); }
.card-header-action  { font-size: .78rem; color: var(--text3); }
.card-header-action:hover { color: var(--accent); }

/* ── 7. 그리드 레이아웃 ──────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr;    gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

/* 2컬럼 (메인 + 사이드) */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
.content-grid-wide {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

/* ── 8. 스탯 박스 ─────────────────────────────────────────────── */
.stat-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px;
}
.stat-box-val   { font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-box-label { font-size: .78rem; color: var(--text3); margin-top: 4px; }
.stat-box-icon  { font-size: 1.4rem; margin-bottom: 8px; }

/* ── 9. 카테고리 탭 ──────────────────────────────────────────── */
.cat-tabs {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border2);
}
[data-theme="dark"] .cat-tabs { border-bottom-color: #555; }
.cat-tab {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg2); color: var(--text2);
  font-size: .8rem; font-weight: 500;
  transition: all .15s; cursor: pointer;
  white-space: nowrap;
}
.cat-tab:hover  { border-color: var(--accent); color: var(--accent); background: rgba(232,105,10,.04); }
[data-theme="dark"] .cat-tab:hover { background: rgba(255,102,0,.08); }
.cat-tab.active { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; font-weight: 600; }
.cat-tab.active i { color: #fff !important; }
.cat-tab.active * { color: #fff !important; }
[data-theme="light"] .cat-tab.active { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }
[data-theme="light"] .cat-tab.active i { color: #fff !important; }
[data-theme="light"] .cat-tabs { border-bottom-color: var(--border2); }

/* 인기글 탭 – 빨강 강조 */
a.cat-tab[href*="cat=hot"],
.cat-tab-hot {
  border-color: #e53935;
  color: #e53935;
  font-weight: 600;
}
a.cat-tab[href*="cat=hot"]:hover {
  background: rgba(229,57,53,.1);
}
a.cat-tab[href*="cat=hot"].active {
  background: #e53935 !important;
  border-color: #e53935 !important;
  color: #fff !important;
}

/* ── 뷰 서브탭 (전체/최신 vs 인기 / 인기글 전체·일간·주간·월간) ── */
.view-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  margin-bottom: 12px;
}
.view-subtab {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text2);
  background: var(--bg2);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.view-subtab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.view-subtab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* 인기 서브탭은 빨강 강조 */
.view-subtab[href*="view=hot"],
.view-subtab[href*="cat=hot"] {
  border-color: #e53935;
  color: #e53935;
}
.view-subtab[href*="view=hot"].active,
.view-subtab[href*="cat=hot"].active {
  background: #e53935;
  border-color: #e53935;
  color: #fff;
}
/* [전체] 서브탭 (인기글 탭 안) */
.view-subtab[href*="period=all"].active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── 사이드바 인기글 카드 ── */
.hot-side-card {}
.hot-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  gap: 0;
}
.hot-tab {
  padding: 7px 14px;
  font-size: .8rem; font-weight: 600;
  color: var(--text3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.hot-tab:hover  { color: var(--text); }
.hot-tab.active { color: var(--red); border-bottom-color: var(--red); }

.hot-tab-panel { padding: 4px 0; }

.hot-post-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
  text-decoration: none;
}
.hot-post-item:last-child { border-bottom: none; }
.hot-post-item:hover { background: var(--bg3); }

.hot-rank {
  font-size: .82rem; font-weight: 800;
  color: var(--text3);
  min-width: 18px;
  line-height: 1.5;
  flex-shrink: 0;
}
.hot-rank.top3 { color: var(--red); }

.hot-post-info { flex: 1; min-width: 0; }
.hot-post-title {
  font-size: .83rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.hot-post-meta {
  font-size: .7rem;
  color: var(--text3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

/* ── 10. 게시글 목록 ─────────────────────────────────────────── */
.post-table {
  width: 100%; border-collapse: collapse;
}
.post-table th {
  text-align: left; padding: 10px 16px;
  border-bottom: 2px solid var(--border2);
  font-size: .78rem; font-weight: 700;
  color: var(--text3);
  background: #f9fafb;
  letter-spacing: .03em;
  text-transform: uppercase;
}
[data-theme="dark"] .post-table th {
  background: #222; border-bottom-color: #444;
}
.post-row {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.post-row:hover { background: #f5f7fa; }
[data-theme="dark"] .post-row:hover { background: var(--bg3); }
.post-row td    { padding: 12px 16px; vertical-align: middle; }
.post-row:last-child { border-bottom: none; }

/* 게시판 태그 — 라이트: 흰 배경 + 회색 테두리, 활성: 보라 강조 */
.cat-badge {
  font-size: .65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  white-space: nowrap; display: inline-block;
  background: #fff; color: #555; border: 1px solid #d1d5db;
}
[data-theme="dark"] .cat-badge {
  background: transparent; color: #fff; border: none;
}
.post-title-cell {
  font-size: .88rem; font-weight: 500; color: var(--text);
  max-width: 420px;
}
.post-title-cell a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-title-cell a:hover { color: var(--accent); }
.post-meta-cell { font-size: .75rem; color: var(--text3); white-space: nowrap; }
.post-count-cell { font-size: .78rem; color: var(--text3); white-space: nowrap; }
.post-new-badge {
  font-size: .6rem; color: var(--red); font-weight: 700;
  padding: 1px 4px; border: 1px solid var(--red); border-radius: 3px;
  margin-left: 4px;
}
.post-pin-icon { color: var(--accent); font-size: .7rem; margin-left: 3px; }

/* ── 썸네일 게시글 리스트 (pl-*) ─────────────────────────────── */
.pl-list {
  display: flex;
  flex-direction: column;
}

/* ── 아이템: 썸네일 | 콘텐츠(flex:1) | 좋아요 패널 ── */
.pl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  position: relative;
  min-width: 0;
  background: #fff;
}
[data-theme="dark"] .pl-item { background: transparent; }
.pl-item:last-child  { border-bottom: none; }
.pl-item:hover       { background: #f8fafc; }
[data-theme="dark"] .pl-item:hover { background: var(--bg3); }
.pl-item:hover .pl-title { color: var(--accent); }
.pl-item-notice {
  background: rgba(255,152,0,.03);
  border-left: 3px solid #ff9800;
}

/* ── 좌측 썸네일 ── */
.pl-thumb {
  width: 84px;
  height: 63px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg3);
}
.pl-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pl-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 1.4rem;
  background: var(--bg3);
}

/* ── 중앙 콘텐츠 ── */
.pl-body {
  flex: 1;
  min-width: 0;          /* ← ellipsis 핵심 */
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;      /* 자식 overflow 차단 */
}

/* 제목 행 */
.pl-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.pl-cat-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.pl-pin-icon { color: var(--accent); font-size: .72rem; flex-shrink: 0; }
.pl-hot-icon { color: #e53935;       font-size: .72rem; flex-shrink: 0; }

/* 제목+댓글수 wrapper: 이 박스가 남은 공간을 먹고 ellipsis */
.pl-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}
.pl-title {
  font-size: .96rem;      /* ← 글자 크기 키움 */
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .12s;
  /* flex:1 은 pl-title-wrap 이 담당하므로 여기선 min-width만 */
  min-width: 0;
}
.pl-comment-cnt {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  margin-left: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 구형 .pl-new-badge 유지 (하위호환) */
.pl-new-badge {
  font-size: .58rem;
  color: var(--red);
  font-weight: 700;
  padding: 1px 3px;
  border: 1px solid var(--red);
  border-radius: 3px;
  margin-left: 3px;
  vertical-align: middle;
  flex-shrink: 0;
}
/* 새 공통 배지 시스템 */
.pl-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.6;
  letter-spacing: .02em;
}
.pl-badge-new {
  color: #fff;
  background: #43a047;
  border: 1px solid #2e7d32;
}
.pl-badge-hot {
  color: #fff;
  background: linear-gradient(90deg,#e53935,#ff7043);
  border: 1px solid #c62828;
  letter-spacing: .01em;
}

/* 메타 행: 시간 / 작성자 / 조회수 */
.pl-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .73rem;
  color: var(--text3);
}
.pl-time   { color: var(--text3); white-space: nowrap; }
.pl-sep    { color: var(--text3); opacity: .4; }
.pl-author { color: var(--text2); font-weight: 600; white-space: nowrap; }
.pl-dot    { color: var(--text3); opacity: .4; }
.pl-views  {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text3);
  white-space: nowrap;
}
.pl-views i {
  font-size: .65rem;
  color: var(--text3);
}

/* ── 우측 좋아요 패널 ── */
.pl-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 42px;
  padding: 6px 4px;
  border-radius: 8px;
  background: rgba(29,161,242,.07);
  border: 1px solid rgba(29,161,242,.18);
  transition: background .15s;
}
.pl-item:hover .pl-right {
  background: rgba(29,161,242,.14);
  border-color: rgba(29,161,242,.35);
}
.pl-like-icon {
  font-size: 1.25rem;           /* ← 엄지 크기 */
  color: #1da1f2;               /* 트위터 블루 계열 */
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(29,161,242,.4));
  transition: transform .15s;
}
.pl-item:hover .pl-like-icon {
  transform: translateY(-1px) scale(1.08);
}
.pl-like-num {
  font-size: .82rem;
  font-weight: 800;
  color: #1da1f2;
  line-height: 1;
}

/* 모바일 반응형 */
@media (max-width: 480px) {
  .pl-item      { padding: 10px 12px; gap: 9px; }
  .pl-thumb     { width: 66px; height: 50px; border-radius: 6px; }
  .pl-title     { font-size: .88rem; }
  .pl-meta      { font-size: .68rem; gap: 4px; }
  .pl-cat-badge { font-size: .58rem; }
  .pl-like-icon { font-size: 1.05rem; }
  .pl-like-num  { font-size: .74rem; }
  .pl-right     { min-width: 36px; padding: 5px 3px; }
}

/* ── 스켈레톤 로딩 ── */
@keyframes pl-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.pl-skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: pl-shimmer 1.4s infinite linear;
  border-radius: 6px;
}
.pl-skel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.pl-skel-thumb {
  width: 84px; height: 63px;
  flex-shrink: 0;
  border-radius: 8px;
}
.pl-skel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-skel-title {
  height: 14px; width: 70%; border-radius: 4px;
}
.pl-skel-meta  {
  height: 10px; width: 40%; border-radius: 4px;
}
.pl-skel-right {
  flex-shrink: 0;
  width: 42px; height: 46px;
  border-radius: 8px;
}
@media (max-width: 480px) {
  .pl-skel-thumb  { width: 66px; height: 50px; }
  .pl-skel-right  { width: 36px; height: 40px; }
}

/* 게시글 카드형 (목록) */
.post-card-list { display: flex; flex-direction: column; gap: 0; }
.post-card-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0 16px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.post-card-item:last-child { border-bottom: none; }
.post-card-left  { min-width: 60px; }
.post-card-body  { min-width: 0; }
.post-card-right { text-align: right; min-width: 80px; }
.post-card-title {
  font-size: .92rem; font-weight: 600; color: var(--text);
  margin-bottom: 3px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-card-title:hover { color: var(--accent); }
.post-card-preview {
  font-size: .78rem; color: var(--text2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 5px;
}
.post-card-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: .72rem; color: var(--text3);
}
.post-card-meta-author { color: var(--text2); font-weight: 500; }
.post-card-meta i { font-size: .65rem; margin-right: 2px; }

/* ══════════════════════════════════════════════════════════════
   10-B. 뽐뿌형 1줄 테이블 게시판 (bbd-*)
   ══════════════════════════════════════════════════════════════ */

/* 보드 래퍼: 기존 card 패딩 오버라이드 */
.bbd-board-wrap {
  padding: 0 !important;
  overflow: hidden;
}

/* ── 공통 열 너비 정의 ── */
.bbd-header,
.bbd-row {
  display: flex;
  align-items: center;
}
/* 분류 */
.bbd-col-cat    { flex: 0 0 72px;  text-align: center; padding: 0 6px; }
/* HOT 전용 상태 칼럼 */
.bbd-col-status { flex: 0 0 48px;  display: flex; align-items: center; justify-content: center; padding: 0 3px; }
/* 제목 (나머지 공간 전부) */
.bbd-col-title  { flex: 1 1 auto;  min-width: 0; padding: 0 10px 0 0; overflow: hidden; }
/* 글쓴이 */
.bbd-col-author{ flex: 0 0 86px;  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
/* 날짜 */
.bbd-col-date  { flex: 0 0 56px;  text-align: center; white-space: nowrap; padding: 0 4px; }
/* 추천 */
.bbd-col-likes { flex: 0 0 40px;  text-align: center; padding: 0 4px; }
/* 조회 */
.bbd-col-views { flex: 0 0 52px;  text-align: center; padding: 0 6px; }

/* ── 헤더 바 ── */
.bbd-header {
  background: #f5f6f8;
  border-bottom: 2px solid #e0e0e0;
  padding: 8px 0;
  font-size: .73rem;
  font-weight: 700;
  color: #666;
  letter-spacing: .02em;
}
[data-theme="dark"] .bbd-header {
  background: var(--bg3);
  border-bottom-color: var(--border);
  color: var(--text3);
}

/* ── 게시글 행 ── */
.bbd-list {
  display: flex;
  flex-direction: column;
}

.bbd-row {
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background .1s;
  min-width: 0;
}
.bbd-row:last-child    { border-bottom: none; }
.bbd-row:hover         { background: #fafbfe; }
[data-theme="dark"] .bbd-row:hover { background: var(--bg3); }
.bbd-row-notice {
  background: rgba(255,152,0,.04);
  border-left: 3px solid #ff9800;
}
[data-theme="dark"] .bbd-row-notice { background: rgba(255,152,0,.06); }

/* ── 카테고리 배지 ── */
.bbd-cat-tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  line-height: 1.5;
  letter-spacing: .01em;
}

/* ── 제목 영역 ── */
.bbd-col-title {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bbd-title {
  font-size: var(--text-list-title);  /* 목록 제목 15px (A3 §2-2) */
  font-weight: 500;
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  transition: color .1s;
}
.bbd-row:hover .bbd-title { color: var(--primary); }
[data-theme="dark"] .bbd-row:hover .bbd-title { color: var(--accent); }

.bbd-cmt {
  color: var(--primary);
  font-size: var(--text-meta);  /* 댓글 수 13px 호박 강조 (A3 §2-2) */
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .bbd-cmt { color: var(--accent); }

.bbd-pin-icon {
  color: var(--primary);
  font-size: .7rem;
  flex-shrink: 0;
}

/* 미니 썸네일 (이미지 있을 때만) */
.bbd-mini-thumb {
  width: 30px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
}

/* ── 배지 ── */
.bbd-badge {
  font-size: .58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.6;
  letter-spacing: .03em;
}
.bbd-badge-new {
  color: #fff;
  background: #43a047;
  border: 1px solid #2e7d32;
}
/* HOT 배지는 bbd-col-status 전용 → bbd-hot-badge 사용 */
.bbd-hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: .62rem;
  font-weight: 800;
  color: #d32f2f;
  background: rgba(211,47,47,.10);
  border: 1px solid rgba(211,47,47,.30);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  line-height: 1.5;
  letter-spacing: .02em;
}
.bbd-hot-badge i {
  font-size: .58rem;
  color: #e53935;
}
/* HOT 행 제목 색상 미세 강조 */
.bbd-row-hot .bbd-title {
  color: #1a1a1a;
  font-weight: 700;
}
[data-theme="dark"] .bbd-row-hot .bbd-title {
  color: var(--text);
}

/* ── 메타 셀 (작성자·시간·조회 13px — A3 §2-2) ── */
.bbd-author {
  font-size: var(--text-meta);
  font-weight: 600;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.bbd-date {
  font-size: var(--text-meta);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.bbd-views {
  font-size: var(--text-meta);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.bbd-likes {
  font-size: var(--text-meta);
  font-weight: 700;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.bbd-likes-pos {
  color: var(--danger);   /* 추천 높으면 빨강 (A3 §3-1) */
}

/* ── 반응형: 태블릿 ── */
@media (max-width: 680px) {
  .bbd-col-cat    { flex: 0 0 56px; }
  .bbd-col-status { flex: 0 0 38px; }
  .bbd-col-author { display: none; }
  .bbd-col-date   { flex: 0 0 48px; }
  .bbd-col-likes  { flex: 0 0 32px; }
  .bbd-col-views  { flex: 0 0 40px; }
  .bbd-title      { font-size: .86rem; }
}
@media (max-width: 420px) {
  .bbd-col-cat    { flex: 0 0 44px; }
  .bbd-col-status { flex: 0 0 32px; }
  .bbd-col-date   { display: none; }
  .bbd-col-likes  { display: none; }
  .bbd-col-views  { flex: 0 0 36px; }
  .bbd-row        { padding: 8px 0; }
  .bbd-cat-tag    { font-size: .56rem; padding: 1px 4px; }
  .bbd-hot-badge  { font-size: .58rem; padding: 1px 3px; }
}

/* ── 다크모드 ── */
[data-theme="dark"] .bbd-row       { border-bottom-color: var(--border); }
[data-theme="dark"] .bbd-title     { color: var(--text); }
[data-theme="dark"] .bbd-author    { color: var(--text2); }
[data-theme="dark"] .bbd-date,
[data-theme="dark"] .bbd-views,
[data-theme="dark"] .bbd-likes     { color: var(--text3); }

/* ── 11. 게시글 상세 ─────────────────────────────────────────── */
.post-detail {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 16px;
}
.post-detail-header { padding: 24px 28px 20px; border-bottom: 1px solid var(--border); }
.post-detail-title  { font-size: 1.2rem; font-weight: 700; line-height: 1.5; margin: 10px 0 12px; }
.post-detail-meta   { display: flex; align-items: center; gap: 14px; font-size: .78rem; color: var(--text3); }
.author-chip        { display: flex; align-items: center; gap: 6px; color: var(--text2); font-weight: 500; }
.author-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: #fff; font-weight: 700;
}
.post-detail-body {
  padding: 24px 28px;
  /* 본문 16px / 줄간격 1.8 (A3 §2-2) */
  font-size: var(--text-body); line-height: var(--leading-body); color: var(--fg-1);
  word-break: break-word; overflow-wrap: break-word;
  white-space: normal;
  border-bottom: 1px solid var(--border);
  /* Quill HTML 이미지/iframe 비율 보정 */
  container-type: inline-size;
}
/* ── 이미지: 가로 100% 초과 방지, 비율 유지, 가운데 정렬 ── */
.post-detail-body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 0;
  margin: 12px auto;
  box-shadow: none;
}
/* p 태그 안에 이미지가 들어있어도 블록처럼 처리 */
.post-detail-body p img {
  display: block;
  margin: 10px auto;
}
/* ── 동영상 iframe: 16:9 반응형 ── */
.post-detail-body iframe {
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  border-radius: 0;
  margin: 14px auto;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
/* ── 외부 동영상 임베딩 래퍼 ── */
.embed-video-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 14px auto;
}
.embed-video-wrap iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  border-radius: 8px;
  display: block;
  margin: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
/* ── 직접 업로드 video 태그 ── */
.post-detail-body video {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 0;
  margin: 14px auto;
  background: #000;
}
/* ── Quill 서식 클래스 대응 ── */
.post-detail-body p        { margin: 0 0 8px; min-height: 1.2em; }
.post-detail-body p:last-child { margin-bottom: 0; }
.post-detail-body h1       { font-size:1.5rem; font-weight:700; margin:18px 0 8px; line-height:1.3; }
.post-detail-body h2       { font-size:1.25rem; font-weight:700; margin:14px 0 6px; line-height:1.3; }
.post-detail-body h3       { font-size:1.05rem; font-weight:700; margin:10px 0 4px; line-height:1.3; }
.post-detail-body strong, .post-detail-body b { font-weight:700; }
.post-detail-body em, .post-detail-body i     { font-style:italic; }
.post-detail-body u        { text-decoration:underline; }
.post-detail-body s        { text-decoration:line-through; }
.post-detail-body a        { color:var(--accent); text-decoration:underline; word-break:break-all; }
.post-detail-body ol,
.post-detail-body ul       { padding-left:28px; margin:8px 0 12px; }
.post-detail-body li       { margin-bottom:4px; }
.post-detail-body ol li    { list-style:decimal; }
.post-detail-body ul li    { list-style:disc; }
.post-detail-body blockquote {
  border-left:4px solid var(--accent); padding:10px 16px;
  margin:12px 0; background:rgba(255,102,0,.06);
  border-radius:0 8px 8px 0; color:var(--text2); font-style:italic;
}
.post-detail-body pre {
  background:var(--bg4); border:1px solid var(--border);
  border-radius:8px; padding:14px 18px; font-size:.82rem;
  font-family:'Consolas','Monaco',monospace;
  overflow-x:auto; margin:10px 0; line-height:1.6; white-space:pre;
}
.post-detail-body code {
  background:var(--bg4); border-radius:4px; padding:2px 6px;
  font-size:.82rem; font-family:'Consolas','Monaco',monospace;
}
.post-detail-body .ql-align-center  { text-align:center; }
.post-detail-body .ql-align-right   { text-align:right; }
.post-detail-body .ql-align-justify { text-align:justify; }
.post-detail-body .ql-indent-1 { padding-left:3em; }
.post-detail-body .ql-indent-2 { padding-left:6em; }
.post-detail-body .ql-indent-3 { padding-left:9em; }
[data-theme="dark"] .post-detail-body img    { box-shadow:0 2px 12px rgba(0,0,0,.45); }
[data-theme="dark"] .post-detail-body iframe { box-shadow:0 2px 12px rgba(0,0,0,.5); }
[data-theme="dark"] .post-detail-body blockquote { background:rgba(255,102,0,.09); }
.post-actions {
  display: flex; gap: 8px; padding: 14px 28px;
  border-bottom: 1px solid var(--border);
}
.action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 8px;
  font-size: .82rem; font-weight: 500;
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border);
  transition: all .15s; cursor: pointer;
}
.action-btn:hover     { border-color: var(--accent); color: var(--accent); }
.action-btn.liked     { background: rgba(244,67,54,.1); color: var(--red); border-color: var(--red); }
.action-btn.dislike-btn:hover { border-color: #9e9e9e; color: #9e9e9e; }
.action-btn.disliked  { background: rgba(100,100,100,.12); color: #757575; border-color: #9e9e9e; }

/* ── 인기글/논란글 배지 ── */
.hot-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: .72rem; font-weight: 700;
  background: rgba(229,57,53,.12); color: #e53935;
  border: 1px solid rgba(229,57,53,.3);
}
.hot-badge.controversy {
  background: rgba(255,152,0,.12); color: #e65100;
  border-color: rgba(255,152,0,.3);
}
.comment-section      { padding: 20px 28px; }

/* ── 댓글 헤더 ── */
.cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cmt-title { font-size: .9rem; font-weight: 700; }

/* ── 정렬 탭 ── */
.cmt-sort-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.cmt-sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text3);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: all .15s;
}
.cmt-sort-tab:hover { border-color: var(--accent); color: var(--accent); }
.cmt-sort-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── 댓글 입력창 ── */
.comment-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg3);
}
.comment-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: .85rem;
  color: var(--text);
  resize: none;
  min-height: 44px;
  max-height: 120px;
  outline: none;
}
.comment-input:focus { outline: none; }
.comment-input-wrap:focus-within { border-color: var(--accent); }
.cmt-input-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.cmt-img-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  font-size: .95rem;
  transition: border-color .15s, color .15s, background .15s;
}
.cmt-img-attach-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb, 99,102,241), .08);
}
.comment-submit {
  width: 40px; height: 34px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.comment-submit:hover { opacity: .85; }

/* ── 댓글 이미지 미리보기 (입력창 하단) ── */
.cmt-img-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.cmt-img-preview img {
  max-height: 60px;
  max-width: 120px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.cmt-img-remove {
  width: 22px; height: 22px;
  background: rgba(220,53,69,.12);
  color: #dc3545;
  border-radius: 50%;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(220,53,69,.2);
  transition: background .15s;
}
.cmt-img-remove:hover { background: rgba(220,53,69,.25); }

/* ── 댓글 아이템 ── */
.comment-item         { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-author {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 5px; font-size: .8rem; color: var(--text2); font-weight: 600;
}
.comment-content      { font-size: .85rem; color: var(--text); line-height: 1.6; }
.comment-level        { font-size: .75rem; color: var(--text3); }
.comment-nick         { font-weight: 700; color: var(--text); }
.comment-time         { margin-left: auto; font-weight: 400; color: var(--text3); font-size: .74rem; }

/* ── 댓글 첨부 이미지 ── */
.cmt-img-wrap {
  margin-top: 8px;
  max-width: 340px;
}
.cmt-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity .15s;
  display: block;
}
.cmt-img:hover { opacity: .9; }

/* ── 댓글 액션 바 (좋아요) ── */
.cmt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.cmt-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text3);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.cmt-like-btn i {
  font-size: .82rem;
  transition: transform .15s;
}
.cmt-like-btn:hover {
  border-color: #7c3aed;
  color: #7c3aed;
  background: rgba(124,58,237,.06);
}
.cmt-like-btn:hover i { transform: translateY(-1px) scale(1.1); }
.cmt-like-btn.liked {
  border-color: #7c3aed;
  background: rgba(124,58,237,.12);
  color: #7c3aed;
}
.cmt-like-btn.liked i { color: #7c3aed; }
.cmt-like-num { font-variant-numeric: tabular-nums; }

/* 답글 버튼 */
.reply-btn {
  margin-left: 8px; padding: 2px 8px; background: transparent;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: .72rem; color: var(--text3); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.reply-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 답글 아이템 (들여쓰기) */
.comment-reply {
  margin-left: 28px;
  border-left: 2px solid var(--border);
  padding-left: 10px;
  background: rgba(0,0,0,.04);
  border-radius: 0 4px 4px 0;
}
[data-theme="light"] .comment-reply { background: rgba(0,0,0,.02); }

/* 답글 입력 폼 */
.reply-form { margin-left: 28px; margin-bottom: 4px; padding: 8px 0; }
.reply-input-wrap {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--bg3); border: 1px solid var(--accent);
  border-radius: 8px; padding: 8px 10px;
}
.reply-at {
  font-size: .82rem; color: var(--accent); font-weight: 700;
  padding-top: 6px; white-space: nowrap;
}
.reply-textarea {
  flex: 1; min-height: 38px; max-height: 100px;
  border: none; background: transparent;
  font-size: .84rem; color: var(--text); resize: none; outline: none; padding: 4px 0;
}
.reply-cancel-btn {
  width: 32px; height: 32px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text3); font-size: .85rem; cursor: pointer; flex-shrink: 0;
}
.reply-cancel-btn:hover { color: var(--red); border-color: var(--red); }

/* ── 12. 폼 컴포넌트 ─────────────────────────────────────────── */
.form-group   { margin-bottom: 16px; }
.form-label   {
  display: block; font-size: .8rem; font-weight: 600; color: var(--text2); margin-bottom: 6px;
}
.form-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  font-size: .9rem; color: var(--text); outline: none; transition: border-color .15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
.form-select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  font-size: .9rem; color: var(--text); outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; cursor: pointer;
}
.form-textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  font-size: .88rem; color: var(--text); outline: none; resize: vertical;
  min-height: 180px;
}
.form-textarea:focus { border-color: var(--accent); }
.radio-group  { display: flex; gap: 7px; flex-wrap: wrap; }
.radio-btn {
  padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg3);
  font-size: .8rem; color: var(--text2); font-weight: 500;
  transition: all .15s; cursor: pointer;
}
.radio-btn:hover  { border-color: var(--accent); color: var(--accent); }
.radio-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.submit-btn {
  width: 100%; padding: 12px;
  background: var(--accent); color: #fff;
  border-radius: 10px; font-size: .92rem; font-weight: 700;
  transition: opacity .15s; cursor: pointer;
}
.submit-btn:hover   { opacity: .88; }
.submit-btn:disabled { opacity: .45; cursor: not-allowed; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: 8px; font-size: .82rem; font-weight: 600;
  transition: all .15s; cursor: pointer;
  /* A11y(모바일 QA): 최소 터치 타깃 44x44pt 보장. padding 은 유지하고 하한선만 추가
     (inline-flex+center 라 텍스트 정렬에 영향 없음). 메타/타임스탬프 등 비인터랙티브는 대상 아님. */
  min-height: 44px; min-width: 44px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(244,67,54,.1); border: 1px solid var(--red); color: var(--red); }

/* ── 13. 수익/랭킹 ───────────────────────────────────────────── */
.ranking-list    { }
.ranking-item    {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.ranking-item:last-child { border-bottom: none; }
.rank-num {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: .82rem; font-weight: 700;
  background: var(--bg3); color: var(--text3); flex-shrink: 0;
}
.rank-num.gold   { background: linear-gradient(135deg,#f0a500,#ffd54f); color: #fff; }
.rank-num.silver { background: linear-gradient(135deg,#9e9e9e,#bdbdbd); color: #fff; }
.rank-num.bronze { background: linear-gradient(135deg,#a1683a,#c49a6c); color: #fff; }
.rank-info       { flex: 1; min-width: 0; }
.rank-nickname   { font-size: .9rem; font-weight: 600; color: var(--text); }
.rank-sub        { font-size: .75rem; color: var(--text3); }
.rank-amount     { font-size: 1rem; font-weight: 700; color: var(--accent); }

.earning-entry {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.earning-entry:last-child { border-bottom: none; }
.earning-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,102,0,.12); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
}
.earning-info    { flex: 1; min-width: 0; }
.earning-platform { font-size: .85rem; font-weight: 600; color: var(--text); }
.earning-date    { font-size: .75rem; color: var(--text3); }
.earning-amount  { font-size: 1rem; font-weight: 700; color: var(--text); }
.verify-badge {
  font-size: .65rem; padding: 2px 7px; border-radius: 4px; font-weight: 600;
  white-space: nowrap;
}
.verify-badge.verified { background: rgba(76,175,80,.12); color: var(--green); }
.verify-badge.pending  { background: rgba(240,165,0,.12);  color: var(--yellow); }

/* ── 14. 게임 ────────────────────────────────────────────────── */
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.attendance-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 16px 20px;
}
.att-day {
  aspect-ratio: 1; border-radius: 8px;
  background: var(--bg3); border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--text3); font-weight: 500;
}
.att-day.checked { background: rgba(255,102,0,.12); color: var(--accent); border-color: var(--accent); }
.att-day.today   { background: var(--accent); color: #fff; }
.att-day .att-date { font-size: .75rem; font-weight: 700; }
.att-day .att-icon { font-size: .9rem; margin-top: 2px; }

.streak-banner {
  margin: 0 20px 14px; padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255,102,0,.1), rgba(255,140,66,.07));
  border: 1px solid rgba(255,102,0,.25); border-radius: 10px;
  display: flex; align-items: center; gap: 12px;
}
.streak-fire  { font-size: 1.8rem; }
.streak-days  { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.streak-label { font-size: .75rem; color: var(--text2); }
.streak-reward { font-size: .85rem; font-weight: 600; color: var(--yellow); }

.roulette-wrap  {
  display: flex; flex-direction: column; align-items: center; padding: 24px 20px;
}
.roulette-pointer { font-size: 2rem; margin-bottom: -8px; z-index: 2; }
.roulette-play-btn {
  margin-top: 20px;
  padding: 14px 48px;
  background: var(--accent); color: #fff;
  border-radius: 30px; font-size: 1rem; font-weight: 700;
  box-shadow: 0 4px 18px rgba(255,102,0,.35);
  transition: all .15s; cursor: pointer;
}
.roulette-play-btn:disabled { opacity: .4; cursor: not-allowed; }
.roulette-play-btn:hover:not(:disabled) { transform: translateY(-2px); }
.games-remain { font-size: .82rem; color: var(--text2); margin-top: 8px; }

/* ── 15. 서비스센터 ──────────────────────────────────────────── */
.shop-layout    { display: grid; grid-template-columns: 360px 1fr; gap: 0; min-height: 600px; }
.shop-list-panel {
  border-right: 1px solid var(--border); overflow-y: auto;
  max-height: calc(100vh - var(--gnb-h) - 100px);
}
.shop-filter-bar {
  display: flex; gap: 6px; padding: 12px 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); background: var(--bg2);
  position: sticky; top: 0; z-index: 10;
}
.shop-chip {
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg2);
  font-size: .75rem; color: var(--text2); font-weight: 500;
  transition: all .15s; cursor: pointer; white-space: nowrap;
}
.shop-chip:hover  { border-color: var(--accent); color: var(--accent); }
.shop-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.shop-card {
  display: flex; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s;
}
.shop-card:hover  { background: var(--bg3); }
.shop-thumb {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--bg3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.shop-info    { flex: 1; min-width: 0; }
.shop-name    { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.shop-addr    { font-size: .75rem; color: var(--text2); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-tags    { display: flex; gap: 4px; flex-wrap: wrap; }
.shop-tag     { font-size: .65rem; padding: 2px 6px; border-radius: 4px; background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }
.shop-rating  { display: flex; align-items: center; gap: 3px; font-size: .78rem; margin-bottom: 4px; }
.stars        { color: var(--yellow); }
.map-panel    { position: relative; background: var(--bg3); }
.map-container { width: 100%; height: 100%; min-height: 600px; }
.map-controls { position: absolute; top: 12px; right: 12px; z-index: 10; display: flex; flex-direction: column; gap: 6px; }
.map-ctrl-btn {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--bg2); box-shadow: var(--card-shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--text2); cursor: pointer; border: 1px solid var(--border);
}
.map-ctrl-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   15-B. 정비소 상세 시트 — 내비 + 영수증 인증 리뷰 (Module 24-B)
   ══════════════════════════════════════════════════════════════ */

/* ── 정비소 헤더 ── */
.sh-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0 10px;
}
.sh-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--bg3);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.sh-info { flex: 1; min-width: 0; }
.sh-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}
.sh-addr {
  font-size: .77rem;
  color: var(--text2);
  margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sh-addr i { margin-right: 4px; color: var(--primary); font-size: .7rem; }
.sh-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .77rem;
  flex-wrap: wrap;
}
.sh-stars       { color: #f9a825; letter-spacing: 1px; }
.sh-rating-val  { font-weight: 700; color: var(--text); }
.sh-review-cnt  { color: var(--text3); }
.sh-price       { font-size: .72rem; padding: 1px 6px; border-radius: 10px; background: var(--bg3); }

/* ── 액션 버튼 행 (전화 / 카카오내비 / 티맵) ── */
.sh-action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.sh-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform .1s, box-shadow .1s;
  min-height: 64px;
}
.sh-btn:active { transform: scale(.97); }
.sh-btn-icon { font-size: 1.3rem; line-height: 1; }
.sh-btn-call {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
}
.sh-btn-call:hover { background: #c8e6c9; }
.sh-btn-kakao {
  background: #FEE500;
  color: #3A1D1D;
  border: 1.5px solid #e6cf00;
}
.sh-btn-kakao:hover { background: #f5d800; }
.sh-btn-tmap {
  background: #1A73E8;
  color: #fff;
  border: 1.5px solid #1557b0;
}
.sh-btn-tmap:hover { background: #1557b0; }
[data-theme="dark"] .sh-btn-call  { background: #1b3d1c; color: #81c784; border-color: #2e7d32; }
[data-theme="dark"] .sh-btn-kakao { background: #3a3000; color: #FEE500; border-color: #665800; }
[data-theme="dark"] .sh-btn-tmap  { background: #0d47a1; color: #fff; border-color: #1565c0; }

/* ── 영수증 인증 CTA ── */
.sh-review-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-bottom: 0;
}
.rcpt-cta-wrap {
  background: #f0f7ff;
  border: 1.5px dashed #90caf9;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
[data-theme="dark"] .rcpt-cta-wrap {
  background: rgba(25,118,210,.08);
  border-color: rgba(25,118,210,.3);
}
.rcpt-cta-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: .82rem;
  color: var(--text2);
}
.rcpt-cta-msg i {
  color: #1976d2;
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.rcpt-upload-btn {
  width: 100%;
  padding: 11px;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s;
}
.rcpt-upload-btn:hover { background: #1565c0; }

/* ── 인증 완료 배지 ── */
.rcpt-verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  color: #2e7d32;
  background: #e8f5e9;
  border: 1.5px solid #a5d6a7;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.rcpt-verified-badge i { color: #43a047; font-size: .9rem; }
[data-theme="dark"] .rcpt-verified-badge {
  background: rgba(46,125,50,.12);
  border-color: rgba(46,125,50,.35);
  color: #81c784;
}

/* ── 리뷰 폼 ── */
.sh-review-form { margin-top: 4px; }
.sh-star-btn {
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #f9a825;
  padding: 0 2px;
  line-height: 1;
  transition: transform .1s;
}
.sh-star-btn:hover { transform: scale(1.2); }

/* ── 리뷰 아이템 ── */
.sh-review-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.sh-review-item:last-child { border-bottom: none; }
.sh-review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.sh-reviewer {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}
.sh-lv {
  font-size: .68rem;
  color: var(--accent);
  font-weight: 600;
}
.rcpt-verified-mini {
  font-size: .62rem;
  color: #2e7d32;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  padding: 1px 5px;
  font-weight: 700;
}
.sh-review-stars { color: #f9a825; font-size: .8rem; letter-spacing: 1px; }
.sh-review-content { font-size: .8rem; color: var(--text2); line-height: 1.5; margin-bottom: 3px; }
.sh-owner-reply {
  font-size: .75rem;
  color: #1976d2;
  background: #e3f2fd;
  border-left: 3px solid #1976d2;
  padding: 5px 8px;
  border-radius: 0 6px 6px 0;
  margin: 4px 0;
}
[data-theme="dark"] .sh-owner-reply { background: rgba(25,118,210,.12); color: #64b5f6; }
.sh-review-date { font-size: .7rem; color: var(--text3); }

/* ══════════════════════════════════════════════════════════════
   15-C. 영수증 업로드 모달 (rcpt-*)
   ══════════════════════════════════════════════════════════════ */
.rcpt-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  padding: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.rcpt-modal-title i { color: var(--primary); }
.rcpt-guide {
  font-size: .8rem;
  color: var(--text2);
  background: #fffbe6;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  line-height: 1.6;
}
[data-theme="dark"] .rcpt-guide {
  background: rgba(255,193,7,.07);
  border-color: rgba(255,193,7,.25);
  color: var(--text2);
}
.rcpt-upload-area {
  border: 2px dashed #d0d7de;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 14px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
}
.rcpt-upload-area:hover { border-color: #1976d2; }
[data-theme="dark"] .rcpt-upload-area { border-color: var(--border); }
.rcpt-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 6px;
}
.rcpt-item-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.rcpt-add-btn {
  font-size: .78rem;
  color: #1976d2;
  background: #e3f2fd;
  border: 1.5px solid #90caf9;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  margin-bottom: 4px;
  font-weight: 600;
}
.rcpt-add-btn:hover { background: #bbdefb; }
.rcpt-del-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: .85rem;
  padding: 4px 6px;
}
.rcpt-del-btn:hover { color: #e53935; }
.rcpt-submit-btn {
  width: 100%;
  padding: 13px;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* ── PC 사이드패널 (24-C) ─────────────────────────────────────── */
.sh-side-panel {
  position: fixed;
  top: 0; right: -400px;
  width: 380px; max-width: 96vw;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.13);
  z-index: 1200;
  display: flex; flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sh-side-panel.open { right: 0; }
.sh-side-header {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sh-side-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--text2); padding: 6px 10px;
  border-radius: 8px; line-height: 1;
}
.sh-side-close:hover { background: var(--bg3); }
/* 모바일에서 사이드패널 숨김 */
@media (max-width: 767px) {
  .sh-side-panel { display: none !important; }
}
/* PC에서 바텀시트 숨김 (기기 분기는 JS에서 하므로 CSS는 보조) */
@media (min-width: 768px) {
  /* 바텀시트는 JS 분기로 열리지 않음 — 추가 override 없음 */
}

/* ── 16. 마이페이지 ──────────────────────────────────────────── */
.profile-header {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 24px 28px;
}
.profile-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
  border: 3px solid var(--accent);
}
.profile-info-block { flex: 1; min-width: 0; }
.profile-nickname   { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.level-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 12px; color: #fff; margin-bottom: 8px;
}
.profile-bio { font-size: .82rem; color: var(--text2); }
.xp-bar-wrap { padding: 0 28px 16px; }
.xp-bar-track { height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.xp-bar-fill  { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; transition: width .6s ease; }
.xp-bar-label { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text3); margin-top: 5px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
/* 모바일 QA: 4열 그리드에서 긴 값(예 "18,650P")이 셀을 넘어 잘리던 것 보정.
   grid item 기본 min-width:auto 가 overflow 를 유발 → min-width:0 로 셀 폭에 맞춤. */
.stat-item  { text-align: center; padding: 16px 10px; border-right: 1px solid var(--border); min-width: 0; }
.stat-item:last-child { border-right: none; }
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--accent); max-width: 100%; overflow-wrap: anywhere; }
.stat-label { font-size: .72rem; color: var(--text3); margin-top: 3px; max-width: 100%; overflow-wrap: anywhere; }

.menu-list  { }
.menu-item  {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px; border-bottom: 1px solid var(--border);
  font-size: .88rem; color: var(--text); cursor: pointer; transition: background .1s;
}
.menu-item:hover { background: var(--bg3); }
.menu-item:last-child { border-bottom: none; }
.menu-item i { width: 18px; text-align: center; color: var(--accent); }
.menu-item .chevron { margin-left: auto; color: var(--text3); font-size: .75rem; }

/* ── 17. 포인트 로그 ─────────────────────────────────────────── */
.point-log-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; border-bottom: 1px solid var(--border);
}
.point-log-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.point-log-icon.plus  { background: rgba(76,175,80,.12);  color: var(--green); }
.point-log-icon.minus { background: rgba(244,67,54,.12);  color: var(--red); }
.point-log-info  { flex: 1; min-width: 0; }
.point-log-action { font-size: .85rem; font-weight: 600; color: var(--text); }
.point-log-time   { font-size: .72rem; color: var(--text3); }
.point-log-amount { font-size: .92rem; font-weight: 700; }
.point-log-amount.plus  { color: var(--green); }
.point-log-amount.minus { color: var(--red); }

/* ── 18. 토스트 ──────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg2); border: 1px solid var(--border);
  padding: 11px 18px; border-radius: 10px;
  font-size: .84rem; color: var(--text);
  box-shadow: var(--card-shadow);
  animation: toastIn .2s ease, toastOut .2s ease 2.5s forwards;
  white-space: nowrap;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
@keyframes toastIn  { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: none; } }
@keyframes toastOut { to   { opacity:0; transform: translateY(10px); } }

/* ── 19. 모달 ────────────────────────────────────────────────── */
/* 공통 모달 X 닫기 버튼 */
.modal-close-x {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  border: none; background: var(--bg2);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text2); line-height: 1;
  transition: background .15s, color .15s; z-index: 10;
}
.modal-close-x:hover { background: var(--border); color: var(--text1); }
/* modal-sheet / modal-box 공통 relative */
.modal-sheet, .modal-box { position: relative; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 32px;
  min-width: 360px; max-width: 500px; width: 90%;
  transform: scale(.96); transition: transform .2s;
  max-height: 80vh; overflow-y: auto;
}
.modal-backdrop.open .modal-box { transform: scale(1); }
.modal-title {
  font-size: 1rem; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

/* ── 20. 글쓰기 ──────────────────────────────────────────────── */
.write-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }

/* ── 21. 뱃지 / 태그 ─────────────────────────────────────────── */
.point-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,102,0,.12); color: var(--accent);
  font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
}
.notice-banner {
  padding: 12px 16px; background: rgba(33,150,243,.08);
  border: 1px solid rgba(33,150,243,.25); border-radius: 10px;
  font-size: .8rem; color: var(--blue);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}

/* ── 22. 빈 상태 ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--text3);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: .88rem; }

/* ── 23. 스켈레톤 ────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 4px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── 24. 구분선/여백 ─────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── 25. 페이지네이션 ────────────────────────────────────────── */
.pagination {
  display: flex; justify-content: center; gap: 4px; padding: 20px 0 4px;
}
.page-btn {
  min-width: 34px; height: 34px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; transition: all .15s;
}
.page-btn:hover  { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── 26. 라이트모드 보정 ──────────────────────────────────────── */
[data-theme="light"] .form-input    { background: #fff; }
[data-theme="light"] .form-select   { background: #fff; }
[data-theme="light"] .form-textarea { background: #fff; }
[data-theme="light"] .comment-input { background: #fff; }
[data-theme="light"] .cat-tab       { background: #fff; }
[data-theme="light"] .cat-tab.active { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }
[data-theme="light"] .radio-btn     { background: #fff; }

/* ── 27. 반응형 (태블릿) ─────────────────────────────────────── */
@media (max-width: 1280px) {
  .main-content { padding: 22px 24px; max-width: 1080px; }
  .main-content.no-padding { padding: 0; max-width: 100%; height: calc(100vh - var(--gnb-h)); min-height: unset; overflow: hidden; display: flex; flex-direction: column; }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 200px; }
  .main-content { padding: 20px 20px; max-width: 100%; }
  .main-content.no-padding { padding: 0; height: calc(100vh - var(--gnb-h)); min-height: unset; overflow: hidden; display: flex; flex-direction: column; }
  .content-grid { grid-template-columns: 1fr 260px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  /* v11 P0-2: 1fr 트랙은 자식 min-content 만큼 팽창 → minmax(0,1fr) 로 뷰포트에 클램프 */
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "gnb" "main"; }
  .main-content { padding: 16px; }
  .main-content.no-padding { padding: 0; height: calc(100vh - var(--gnb-h)); min-height: unset; overflow: hidden; display: flex; flex-direction: column; }
  /* v12 QA M3-a: 글 상세(.content-grid-wide)도 모바일 단일컬럼화.
     누락 시 393/375px 에서 본문 50% 폭·사이드바 잘림·가로 스크롤 불가. */
  .content-grid, .content-grid-wide, .write-layout { grid-template-columns: minmax(0, 1fr); }
  .game-grid { grid-template-columns: minmax(0, 1fr); }
  .shop-layout { grid-template-columns: minmax(0, 1fr); }

  /* v12 모바일 상단 = "보기 전용" 최소화 (M1 §2-1). 데스크톱 GNB 군더더기 제거:
     - 가운데 nav(6탭) → 하단 탭바로 대체, 숨김
     - 테마 토글 → 더보기 시트로 이동, 상단에서 숨김
     - DEV 계정 전환 → 개발 도구(모바일 군더더기), 숨김
     - 관리자 버튼 → 별도 페이지, 모바일 상단에서 숨김
     - 닉네임/포인트 텍스트 숨겨 폭 확보, 아바타만 유지 */
  .gnb { padding: 0 12px; gap: 8px; overflow: hidden; }
  .gnb-nav { display: none; }
  .gnb-right { gap: 6px; min-width: 0; }
  #themeToggleBtn,
  .dev-switcher,
  .gnb-admin-btn { display: none !important; }
  .gnb-user-chip #gnbNickname { display: none; }
  .gnb-user-chip .gnb-points { display: none; }
  .gnb-user-chip { padding: 5px; }
  .dev-switcher-label { max-width: 48px; }

  /* 하단 탭바 + FAB 가 마지막 콘텐츠를 가리지 않게 main 하단 여백 확보 (M1 §4-3).
     탭바(64) + safe-area + FAB 여유(76). (.no-padding 풀스크린은 자체 처리하므로 제외) */
  .main-content:not(.no-padding) {
    padding-bottom: calc(var(--m-tab-h, 64px) + var(--m-safe-bot, 0px) + 76px);
  }
}

/* v12 QA P2: 댓글 액션 버튼 모바일 터치영역 44pt+ (Apple HIG 최소 44px).
   기존: 답글 47×22 · 좋아요 47×26 · 등록 h34 → 손가락 오조작 빈발.
   home.tsx 글상세 인라인 <style> 가 외부 style.css 보다 늦게 로드되어
   동일 명시도로는 덮어쓰므로 모바일 한정 !important 로 강제(데스크톱 영향 없음). */
@media (max-width: 900px) {
  .reply-btn,
  .cmt-like-btn,
  .comment-submit,
  .reply-cancel-btn {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* 작은 글씨는 유지하되 세로 패딩으로 탭 영역 확보 */
  .reply-btn {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .cmt-like-btn {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .comment-submit {
    min-width: 44px !important;
  }
  .reply-cancel-btn {
    min-width: 44px !important;
    width: auto !important;
    height: auto !important;
  }
}

/* v12: 하단 탭바 + FAB 는 Layout(.app-shell)에서 직접 렌더 → 단일 브레이크(900px).
   ≤900px = 모바일(노출), ≥901px = PC(숨김). M1 §4-1 브레이크 통일. */
.app-tabbar { display: none; }
.fab-container { display: none; }
/* v13: 풀스크린(noPadding) 페이지가 하단 탭바 높이만큼 위로 띄우도록 (지도/도구에서 탭바가 콘텐츠를 가리지 않게).
   PC=0(탭바 없음), 모바일=탭바 높이+safe-area. layout.tsx 의 no-padding main height 계산에서 사용. */
:root { --mobile-tabbar-h: 0px; }
@media (max-width: 900px) {
  .app-tabbar { display: grid; }
  .fab-container { display: block; }
  :root { --mobile-tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 901px) {
  .app-tabbar,
  .fab-container,
  body > .more-sheet,
  body > .more-sheet-overlay { display: none !important; }
}

/* ═══════════════════════════════════════════════
   Weather Widget — Module 18  (화이트 테마 개편)
   ═══════════════════════════════════════════════ */

/* 공통 카드 베이스 */
.ww-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
[data-theme="dark"] .ww-card {
  background: linear-gradient(135deg, #1e1e2e 0%, rgba(124,58,237,.08) 100%);
  border-color: rgba(124,58,237,.25);
}
.ww-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(232,105,10,.06) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .ww-card::before {
  background: radial-gradient(circle, rgba(124,58,237,.12) 0%, transparent 70%);
}

/* ── 스켈레톤 ── */
.ww-skeleton-wrap { animation: wwSkPulse 1.5s ease-in-out infinite; }
@keyframes wwSkPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .5; }
}
.ww-sk-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bg3);
  flex-shrink: 0;
}
.ww-sk-lines { display: flex; flex-direction: column; gap: 7px; }
.ww-sk-line  {
  border-radius: 6px;
  background: var(--bg3);
  height: 10px;
}
[data-theme="dark"] .ww-sk-icon,
[data-theme="dark"] .ww-sk-line { background: rgba(255,255,255,.08); }
.ww-sk-lg  { width: 90px; }
.ww-sk-md  { width: 70px; }
.ww-sk-sm  { width: 50px; }

/* ── 실제 날씨 콘텐츠 ── */
.ww-icon-box {
  font-size: 2.6rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
}
[data-theme="dark"] .ww-icon-box { filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.ww-temp-main {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.ww-desc {
  font-size: .78rem;
  color: var(--text3);
  margin-top: 3px;
}
.ww-location {
  font-size: .7rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
[data-theme="dark"] .ww-location { color: #9c27b0; }
.ww-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
  flex-shrink: 0;
}
[data-theme="dark"] .ww-divider { background: rgba(255,255,255,.1); }
.ww-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .76rem;
  color: var(--text2);
}
.ww-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.ww-meta-icon {
  width: 16px;
  text-align: center;
  opacity: .7;
  font-size: .68rem;
  color: var(--text3);
}
.ww-meta-val { font-weight: 600; color: var(--text); }
.ww-badge {
  margin-left: auto;
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(232,105,10,.1);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(232,105,10,.2);
  flex-shrink: 0;
  align-self: flex-start;
}
[data-theme="dark"] .ww-badge {
  background: rgba(124,58,237,.18);
  color: #b39ddb;
  border-color: rgba(124,58,237,.3);
}

/* ── 에러 상태 ── */
.ww-error-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: var(--text3);
}
.ww-retry-btn {
  margin-left: auto;
  flex-shrink: 0;
  font-size: .75rem;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
}
.ww-retry-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(232,105,10,.05); }
[data-theme="dark"] .ww-retry-btn {
  border-color: rgba(124,58,237,.4);
  background: rgba(124,58,237,.1);
  color: #b39ddb;
}
[data-theme="dark"] .ww-retry-btn:hover { background: rgba(124,58,237,.25); }

/* 모바일 대응 */
@media (max-width: 600px) {
  .ww-card { padding: 11px 13px; gap: 10px; }
  .ww-icon-box { font-size: 2rem; }
  .ww-temp-main { font-size: 1.35rem; }
  .ww-divider { display: none; }
  .ww-meta { display: none; }
}

/* ================================================================
   Module 19: 수익·랭킹 페이지 (er- prefix)
   R-02 랭킹 / R-03 빈 상태 / R-04 수익 인증 입력
================================================================ */

/* ── 헤더 카드 (오늘 수익 요약) — 화이트 테마 ──────────────── */
.er-header-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 12px 12px 0;
  padding: 20px 20px 16px;
  color: var(--text);
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
[data-theme="dark"] .er-header-card {
  background: linear-gradient(145deg, #1e3a6e 0%, #0d2140 100%);
  color: #fff;
  border-color: #1e4080;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.er-header-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(232,105,10,.06) 0%, transparent 70%);
  border-radius: 50%;
}
[data-theme="dark"] .er-header-card::before {
  background: rgba(255,255,255,.05);
}
.er-header-date {
  font-size: .8rem;
  color: var(--text3);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}
[data-theme="dark"] .er-header-date { opacity: .75; color: #fff; }
.er-header-amount-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}
.er-header-amount {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--accent);
}
[data-theme="dark"] .er-header-amount { color: #fff; }
.er-header-unit {
  font-size: 1.3rem;
  font-weight: 600;
  margin-left: 2px;
  color: var(--text2);
}
[data-theme="dark"] .er-header-unit { opacity: .85; color: #fff; }
.er-header-rank-badge {
  background: rgba(232,105,10,.1);
  border: 1px solid rgba(232,105,10,.25);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 6px;
}
[data-theme="dark"] .er-header-rank-badge {
  background: rgba(255,200,0,.2);
  border-color: rgba(255,200,0,.4);
  color: #ffd54f;
}

/* 주간 트렌드 */
.er-trend-section { margin-bottom: 14px; }
.er-trend-label {
  font-size: .72rem;
  color: var(--text3);
  margin-bottom: 8px;
}
[data-theme="dark"] .er-trend-label { opacity: .6; color: #fff; }
.er-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 44px;
}
.er-trend-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}
.er-trend-bar {
  width: 100%;
  max-width: 20px;
  background: #e5e8ed;
  border-radius: 4px 4px 0 0;
  min-height: 6px;
  transition: height .3s;
}
[data-theme="dark"] .er-trend-bar { background: rgba(255,255,255,.25); }
.er-trend-bar--today {
  background: var(--accent);
}
.er-trend-diff {
  font-size: .75rem;
  color: var(--text3);
  margin-top: 6px;
  text-align: right;
}
[data-theme="dark"] .er-trend-diff { opacity: .8; color: #fff; }
.er-trend-up   { color: var(--green);  font-weight: 600; }
.er-trend-down { color: var(--red);    font-weight: 600; }
[data-theme="dark"] .er-trend-up   { color: #ffd54f; }
[data-theme="dark"] .er-trend-down { color: #ff8080; }

/* 수익 인증하기 히어로 버튼 */
.er-submit-hero-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s, transform .1s;
  box-shadow: 0 3px 12px rgba(232,105,10,.3);
  position: relative;
}
.er-submit-hero-btn:hover {
  background: #d45d06;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(232,105,10,.4);
}
[data-theme="dark"] .er-submit-hero-btn {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  box-shadow: none;
}
[data-theme="dark"] .er-submit-hero-btn:hover { background: rgba(255,255,255,.2); transform: none; }
.er-btn-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  position: absolute;
  right: 16px;
}
.er-btn-status-dot.verified { background: #4caf50; }
.er-btn-status-dot.pending  { background: #f0a500; }

/* ── 랭킹 섹션 ──────────────────────────────────────────── */
.er-ranking-section {
  background: var(--bg2);
  margin: 12px 12px 80px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
.er-ranking-header { padding: 16px 16px 0; }
.er-ranking-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.er-ranking-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.er-ranking-time {
  font-size: .72rem;
  color: var(--text3);
}

/* 기간 탭 */
.er-period-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 0 -16px;
  padding: 0 16px;
}
.er-period-tab {
  padding: 9px 18px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text3);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.er-period-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.er-period-viewall {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text3);
  text-decoration: none;
  padding: 9px 0 9px 8px;
}

/* ── 랭킹 리스트 아이템 ─────────────────────────────────── */
.er-ranking-list { padding: 0; margin: 0; list-style: none; }
.er-ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.er-ranking-item:last-child { border-bottom: none; }
.er-ranking-item:hover { background: var(--hover); }
.er-ranking-item--me { background: rgba(255,102,0,.05); }

/* 순위 배지 */
.er-rank-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text3);
  flex-shrink: 0;
}
.er-rank-1 {
  background: linear-gradient(135deg, #f0a500, #ffd54f);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
}
.er-rank-2 {
  background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
  color: #fff;
}
.er-rank-3 {
  background: linear-gradient(135deg, #a1683a, #c49a6c);
  color: #fff;
}

/* 아바타 */
.er-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.er-avatar--sm { width: 32px; height: 32px; font-size: .85rem; }

/* 랭킹 정보 */
.er-rank-info { flex: 1; min-width: 0; }
.er-rank-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}
.er-rank-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.er-verified-badge {
  color: #1a73e8;
  font-size: .85rem;
  flex-shrink: 0;
}
.er-rank-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.er-level-chip {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}
.er-platform-tag {
  font-size: .7rem;
  color: var(--text3);
  background: var(--bg2);
  padding: 2px 7px;
  border-radius: 8px;
}
.er-rank-amount {
  font-size: 1rem;
  font-weight: 800;
  color: #1a73e8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 빈 상태 (R-03) ─────────────────────────────────────── */
.er-empty-state {
  padding: 40px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.er-empty-podium {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 16px;
  height: 80px;
}
.er-podium-block {
  width: 56px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: rgba(0,0,0,.3);
}
.er-podium-1 { height: 72px; background: linear-gradient(180deg, #e8eaf6, #c5cae9); }
.er-podium-2 { height: 52px; background: linear-gradient(180deg, #f3f4f8, #e0e1e8); }
.er-podium-3 { height: 40px; background: linear-gradient(180deg, #f5f5f5, #e8e8e8); }
.er-empty-icon { font-size: 1.5rem; margin-bottom: 8px; }
.er-empty-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.er-empty-sub {
  font-size: .84rem;
  color: var(--text3);
  margin-bottom: 20px;
}
.er-empty-cta {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, transform .1s;
  box-shadow: 0 3px 12px rgba(232,105,10,.3);
}
.er-empty-cta:hover { background: #d45d06; transform: translateY(-1px); }

/* ── 내 순위 Sticky 바 ──────────────────────────────────── */
.er-my-rank-sticky {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  max-width: 520px;
  margin: 0 auto;
  background: #ffffff;          /* 라이트: 완전 불투명 흰색 */
  border-top: 2px solid #e8eaf0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 -6px 24px rgba(0,0,0,.15);
}
[data-theme="dark"] .er-my-rank-sticky {
  background: #1c1c1e;          /* 다크: 완전 불투명 다크 */
  border-top-color: #2c2c2e;
  box-shadow: 0 -6px 24px rgba(0,0,0,.45);
}
.er-my-rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.er-my-rank-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.er-my-rank-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  margin-left: 6px;
}
.er-my-rank-amount {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
}
.er-my-rank-sticky--empty .er-my-rank-label {
  color: var(--text3);
  font-weight: 500;
}
.er-sticky-cta {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.er-sticky-cta:hover { background: var(--accent-d, #e55a00); }

/* ══════════════════════════════════════════════════════════════
   수익 입력 모달 (R-04) — Module 19-B Polish
   1. z-index 최상위 (9999) — 네비바 위
   2. 블러 백드롭 + 불투명 모달 본체
   3. 슬라이드업 + 슬라이드다운 닫힘 애니메이션
   4. 라이트/다크 모드 완전 분리
══════════════════════════════════════════════════════════════ */

/* ── 오버레이(백드롭) ──────────────────────────────────────── */
.er-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  /* 배경 블러 + 반투명 딤 */
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* 네비바(z:100), 토스트(z:9999) 위 */
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
  /* 오버레이 자체 페이드 */
  opacity: 0;
  transition: opacity .25s ease;
}
.er-modal-overlay.open {
  display: flex;
  opacity: 1;
}
.er-modal-overlay.closing {
  opacity: 0;
}

/* ── 모달 컨테이너 ─────────────────────────────────────────── */
.er-modal {
  /* 라이트 모드 기본: 순백 */
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;        /* dvh: 모바일 주소바 고려 */
  overflow-y: auto;
  /* 그림자로 하단 콘텐츠와 완전 분리 */
  box-shadow:
    0 -8px 40px rgba(0, 0, 0, 0.28),
    0 -2px 12px rgba(0, 0, 0, 0.14);
  /* 슬라이드업 */
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  /* 내부 요소가 배경색을 덮어쓰지 못하게 격리 */
  isolation: isolate;
}
.er-modal-overlay.open .er-modal {
  transform: translateY(0);
}
.er-modal-overlay.closing .er-modal {
  transform: translateY(100%);
}

/* 손잡이(drag handle) */
.er-modal::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #d0d0d0;
  margin: 12px auto 0;
}

/* ── 모달 헤더 ─────────────────────────────────────────────── */
.er-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  /* 헤더도 불투명하게 고정 */
  background: #ffffff;
  z-index: 10;
}
.er-modal-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  border: none;
  border-radius: 50%;
  color: #1a1a1a;
  font-size: .95rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.er-modal-back:hover { background: #e5e5e5; }
.er-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a1a1a;
  flex: 1;
  text-align: center;
  /* 버튼 너비만큼 오프셋 → 시각적 센터 정렬 */
  margin-right: 36px;
}

/* ── 금액 표시 영역 ────────────────────────────────────────── */
.er-modal-amount-display {
  text-align: center;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #efefef;
  background: #f7f8fa;
}
.er-modal-amount-label {
  font-size: .78rem;
  font-weight: 500;
  color: #888;
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.er-modal-amount-value {
  font-size: 2.6rem;
  font-weight: 900;
  color: #111;
  letter-spacing: -2px;
  line-height: 1.1;
}
.er-modal-amount-value span {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #333;
  margin-left: 2px;
}

/* ── 모달 바디 ─────────────────────────────────────────────── */
.er-modal-body {
  padding: 18px 20px 28px;
  background: #ffffff;
}

/* ── 폼 섹션 ───────────────────────────────────────────────── */
.er-form-section { margin-bottom: 22px; }
.er-form-label {
  font-size: .84rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 9px;
  display: block;
}
.er-form-label-row { margin-bottom: 10px; }
.er-form-label-sub {
  font-size: .73rem;
  color: #999;
  display: block;
  margin-top: 3px;
  line-height: 1.5;
}

/* ── 업로드 안내 문구 ──────────────────────────────────────── */
.er-upload-guide-text {
  font-size: .8rem;
  color: #888;
  margin: 0 0 10px;
  line-height: 1.5;
}
[data-theme="dark"] .er-upload-guide-text { color: #aaa; }

/* ── 금액 입력 필드 ────────────────────────────────────────── */
.er-amount-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.er-amount-input {
  width: 100%;
  padding: 15px 52px 15px 18px;
  border: 2px solid #d8d8d8;
  border-radius: 14px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #111;
  background: #f7f8fa;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  text-align: right;
}
.er-amount-input::placeholder { color: #c0c0c0; font-weight: 400; font-size: 1rem; }
.er-amount-input:focus {
  border-color: #1e3a6e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 58, 110, .12);
}
.er-amount-suffix {
  position: absolute;
  right: 16px;
  font-size: 1rem;
  color: #555;
  font-weight: 700;
  pointer-events: none;
}

/* ── 플랫폼 탭 ─────────────────────────────────────────────── */
.er-platform-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.er-platform-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid #d8d8d8;
  background: #f5f5f5;
  color: #444;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.er-platform-tab:hover { border-color: var(--accent); color: var(--accent); }
.er-platform-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(232,105,10,.3);
}

/* ── 이미지 업로드 영역 ────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════
   업로드 영역 – State Machine CSS
   data-upload-state = idle | uploading | success | error
   각 상태의 슬롯(er-upload-slot--*)은 해당 상태일 때만 표시.
   JS의 display 조작 없이 CSS만으로 show/hide 제어.
 ══════════════════════════════════════════════════════════ */

/* ── 컨테이너 기본 ─────────────────────────────────────────── */
.er-upload-area {
  border: 2px dashed #d0d0d0;
  border-radius: 14px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #f5f6f8;
  transition: border-color .2s, background .2s;
}
.er-upload-area:hover {
  border-color: var(--accent);
  background: rgba(232,105,10,.03);
}
/* uploading / success 상태에서는 hover 효과 제거 */
.er-upload-area[data-upload-state="uploading"]:hover,
.er-upload-area[data-upload-state="success"]:hover {
  border-color: #d0d0d0;
  background: #f5f6f8;
  cursor: default;
}
/* error 상태 – 빨간 테두리 */
.er-upload-area[data-upload-state="error"] {
  border-color: #e53935;
  background: rgba(229,57,53,.04);
}

/* ── 슬롯 공통: 기본 숨김 ──────────────────────────────────── */
.er-upload-slot {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  width: 100%;
  text-align: center;
  user-select: none;
}

/* ── IDLE 슬롯 ──────────────────────────────────────────────── */
.er-upload-area[data-upload-state="idle"] .er-upload-slot--idle {
  display: flex;
}
.er-upload-slot--idle i     { font-size: 2rem; color: #b0b0b0; }
.er-upload-slot--idle p     { font-size: .84rem; color: #999; margin: 0; }

/* ── UPLOADING 슬롯 ─────────────────────────────────────────── */
.er-upload-area[data-upload-state="uploading"] .er-upload-slot--uploading {
  display: flex;
}
.er-upload-slot--uploading i { font-size: 1.6rem; color: var(--accent); }
.er-upload-slot--uploading p { font-size: .84rem; color: #555; margin: 0; }

/* ── SUCCESS 슬롯 ───────────────────────────────────────────── */
.er-upload-area[data-upload-state="success"] .er-upload-slot--success {
  display: flex;
  padding: 14px;
  position: relative;
}
.er-upload-slot--success img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ── ERROR 슬롯 ─────────────────────────────────────────────── */
.er-upload-area[data-upload-state="error"] .er-upload-slot--error {
  display: flex;
}
.er-upload-slot--error i    { font-size: 1.6rem; color: #e53935; }
.er-upload-slot--error p    { font-size: .84rem; color: #e53935; margin: 0; font-weight: 600; }

/* ── 인식됨/상태 배지 ───────────────────────────────────────── */
.er-upload-verified-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  background: #4caf50;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(76,175,80,.35);
  white-space: nowrap;
}
/* ── 배지 상태별 색상 (SM 기반) ─────────────────────────────── */
/* 기본(verified) = 초록 */
.er-upload-verified-badge.verified {
  background: #4caf50;
  box-shadow: 0 2px 8px rgba(76,175,80,.35);
}
/* OCR 실패 – 빨강 */
.er-upload-verified-badge.fail {
  background: #e53935;
  box-shadow: 0 2px 8px rgba(229,57,53,.35);
}

/* 이미지 로딩 실패 UI – 레거시 호환 (ERROR 슬롯으로 대체됨) */
.er-img-load-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  color: #e53935;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
}
.er-img-load-error .fas { font-size: 1.6rem; }

/* OCR 실패 안내 메시지 */
.er-ocr-fail-notice {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(229,57,53,.08);
  border: 1px solid rgba(229,57,53,.25);
  border-radius: 10px;
  font-size: .78rem;
  color: #e53935;
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="dark"] .er-ocr-fail-notice {
  background: rgba(229,57,53,.15);
  border-color: rgba(229,57,53,.35);
}


.er-upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: .74rem;
  color: #888;
  gap: 8px;
}
.er-upload-meta span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.er-retake-btn {
  background: #f2f2f2;
  border: 1px solid #d8d8d8;
  color: #444;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background .15s;
}
.er-retake-btn:hover { background: #e5e5e5; }

/* ── 시간대 선택 ───────────────────────────────────────────── */
.er-slot-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.er-slot-btn {
  padding: 8px 15px;
  border-radius: 20px;
  border: 1.5px solid #d8d8d8;
  background: #f5f5f5;
  color: #444;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.er-slot-btn:hover { border-color: var(--accent); color: var(--accent); }
.er-slot-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(255,102,0,.25);
}

/* ── 안내 및 포인트 ────────────────────────────────────────── */
.er-point-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #eef4ff;
  border: 1px solid #d0e0ff;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .74rem;
  color: #445;
  margin-bottom: 14px;
  line-height: 1.55;
}
.er-point-reward-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.er-point-chip {
  padding: 6px 13px;
  border-radius: 20px;
  background: rgba(255,102,0,.1);
  color: #cc5500;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid rgba(255,102,0,.25);
}
.er-point-chip--screenshot {
  background: rgba(76,175,80,.1);
  color: #2e7d32;
  border-color: rgba(76,175,80,.3);
}

/* ── 인증 완료 버튼 ────────────────────────────────────────── */
.er-modal-submit-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 17px;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background .2s, box-shadow .2s, transform .1s;
  box-shadow: 0 4px 16px rgba(232,105,10,.3);
}
.er-modal-submit-btn:hover {
  background: #d45d06;
  box-shadow: 0 6px 20px rgba(232,105,10,.4);
  transform: translateY(-1px);
}
.er-modal-submit-btn:active  { transform: scale(.98); }
.er-modal-submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ══════════════════════════════════════════════════════════════
   다크 모드 — 모달 전체 덮어쓰기
══════════════════════════════════════════════════════════════ */
[data-theme="dark"] .er-modal {
  background: #1c1c1e;
  color: #f0f0f0;
  box-shadow:
    0 -8px 40px rgba(0, 0, 0, 0.6),
    0 -2px 12px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .er-modal::before { background: #3a3a3c; }

[data-theme="dark"] .er-modal-header {
  background: #1c1c1e;
  border-bottom-color: #2c2c2e;
}
[data-theme="dark"] .er-modal-back {
  background: #2c2c2e;
  color: #f0f0f0;
}
[data-theme="dark"] .er-modal-back:hover { background: #3a3a3c; }
[data-theme="dark"] .er-modal-title { color: #f0f0f0; }

[data-theme="dark"] .er-modal-amount-display {
  background: #141416;
  border-bottom-color: #2c2c2e;
}
[data-theme="dark"] .er-modal-amount-label { color: #888; }
[data-theme="dark"] .er-modal-amount-value { color: #f5f5f5; }
[data-theme="dark"] .er-modal-amount-value span { color: #ccc; }

[data-theme="dark"] .er-modal-body { background: #1c1c1e; }

[data-theme="dark"] .er-form-label { color: #e5e5e5; }
[data-theme="dark"] .er-form-label-sub { color: #777; }

[data-theme="dark"] .er-amount-input {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #f0f0f0;
}
[data-theme="dark"] .er-amount-input::placeholder { color: #555; }
[data-theme="dark"] .er-amount-input:focus {
  border-color: #4a7fcb;
  background: #252528;
  box-shadow: 0 0 0 3px rgba(74,127,203,.18);
}
[data-theme="dark"] .er-amount-suffix { color: #aaa; }

[data-theme="dark"] .er-platform-tab {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #ccc;
}
[data-theme="dark"] .er-platform-tab:hover { border-color: #4a7fcb; color: #7aa8e8; }
[data-theme="dark"] .er-platform-tab.active {
  background: #2a4a8a;
  border-color: #2a4a8a;
  color: #fff;
}

[data-theme="dark"] .er-upload-area {
  background: #252528;
  border-color: #3a3a3c;
}
[data-theme="dark"] .er-upload-area:hover {
  border-color: #4a7fcb;
  background: #2a2a2e;
}
[data-theme="dark"] .er-upload-area[data-upload-state="error"] {
  background: rgba(229,57,53,.08);
  border-color: #e53935;
}
[data-theme="dark"] .er-upload-slot--idle i  { color: #555; }
[data-theme="dark"] .er-upload-slot--idle p  { color: #666; }
[data-theme="dark"] .er-upload-slot--uploading i { color: #4a7fcb; }
[data-theme="dark"] .er-upload-slot--uploading p { color: #888; }
[data-theme="dark"] .er-upload-slot--error i { color: #ef5350; }
[data-theme="dark"] .er-upload-slot--error p { color: #ef5350; }

[data-theme="dark"] .er-retake-btn {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #ccc;
}
[data-theme="dark"] .er-retake-btn:hover { background: #3a3a3c; }
[data-theme="dark"] .er-upload-meta { color: #777; }

[data-theme="dark"] .er-slot-btn {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #ccc;
}
[data-theme="dark"] .er-slot-btn:hover { border-color: var(--accent); color: var(--accent); }

[data-theme="dark"] .er-point-notice {
  background: rgba(74,127,203,.1);
  border-color: rgba(74,127,203,.25);
  color: #b0c4e8;
}
[data-theme="dark"] .er-point-chip {
  background: rgba(255,102,0,.12);
  color: #ff8c42;
  border-color: rgba(255,102,0,.3);
}
[data-theme="dark"] .er-point-chip--screenshot {
  background: rgba(76,175,80,.12);
  color: #66bb6a;
  border-color: rgba(76,175,80,.3);
}

[data-theme="dark"] .er-modal-submit-btn {
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(232,105,10,.35);
}
[data-theme="dark"] .er-modal-submit-btn:hover {
  background: #d45d06;
  box-shadow: 0 6px 20px rgba(232,105,10,.45);
}

/* ── 기타 다크 모드 컴포넌트 ───────────────────────────────── */
[data-theme="dark"] .er-header-card {
  background: linear-gradient(145deg, #1a2f5e 0%, #0a1830 100%);
}
[data-theme="dark"] .er-podium-1 { background: linear-gradient(180deg,#2a3050,#1e2540); }
[data-theme="dark"] .er-podium-2 { background: linear-gradient(180deg,#232840,#1a2030); }
[data-theme="dark"] .er-podium-3 { background: linear-gradient(180deg,#1e2438,#181e2e); }
[data-theme="dark"] .er-podium-block { color: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════════════════
   Module 19-E: OCR 스캔 애니메이션 + 히스토리 UI + 배지
══════════════════════════════════════════════════════════ */

/* ── OCR 스캔 컨테이너 ─────────────────────────────────── */
.er-scan-container {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}
.er-scan-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .7;
  display: block;
}
.er-scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 스캔 라인 애니메이션 */
.er-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00e5ff, transparent);
  box-shadow: 0 0 10px #00e5ff, 0 0 20px #00e5ff44;
  animation: scanLine 1.8s ease-in-out infinite;
}
@keyframes scanLine {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* 코너 마커 */
.er-scan-corners { position: absolute; inset: 8px; }
.er-scan-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #00e5ff;
  border-style: solid;
  opacity: .9;
}
.er-scan-corner--tl { top: 0; left: 0;  border-width: 2px 0 0 2px; }
.er-scan-corner--tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.er-scan-corner--bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.er-scan-corner--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* 진행 텍스트 */
.er-scan-progress-text {
  font-size: .84rem;
  color: #555;
  margin: 4px 0 6px;
  text-align: center;
}

/* 점 로딩 인디케이터 */
.er-scan-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.er-scan-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #1a73e8);
  animation: dotBounce .9s ease-in-out infinite;
}
.er-scan-dots span:nth-child(2) { animation-delay: .15s; }
.er-scan-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: .4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ── OCR 검토 패널 ─────────────────────────────────────── */
.er-ocr-review-panel {
  margin-top: 10px;
  border: 1px solid #e8f0ff;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fbff;
}
.er-ocr-review-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #e8f0fe, #f0f4ff);
  font-size: .8rem;
  font-weight: 600;
  color: #1a73e8;
}
.er-ocr-review-badge {
  margin-left: auto;
  background: #1a73e8;
  color: #fff;
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
}
.er-ocr-review-body {
  padding: 8px 12px;
}
.er-ocr-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #eef2ff;
  gap: 8px;
}
.er-ocr-review-row:last-of-type { border-bottom: none; }
.er-ocr-review-label {
  font-size: .74rem;
  color: #888;
  flex-shrink: 0;
}
.er-ocr-review-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.er-ocr-review-value {
  font-size: .84rem;
  font-weight: 600;
  color: #222;
}
.er-ocr-apply-btn {
  background: #e8f0fe;
  border: none;
  border-radius: 6px;
  color: #1a73e8;
  font-size: .72rem;
  padding: 3px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: background .2s;
}
.er-ocr-apply-btn:hover { background: #c5d8fc; }
.er-ocr-review-note {
  font-size: .74rem;
  color: #888;
  margin: 4px 0 0;
  line-height: 1.4;
}

/* ── 히스토리 섹션 ─────────────────────────────────────── */
.er-history-section {
  padding: 0 0 8px;
  border-bottom: 6px solid var(--bg, #f4f6f8);
}

/* 통계 카드 행 */
.er-stats-row {
  display: flex;
  gap: 8px;
  padding: 14px 16px 10px;
  overflow-x: auto;
}
.er-stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 90px;
  background: var(--card, #fff);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.er-stat-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  background: rgba(255,107,0,.1);
  color: #ff6b00;
  flex-shrink: 0;
}
.er-stat-icon--month { background: rgba(26,115,232,.1); color: #1a73e8; }
.er-stat-icon--total { background: rgba(76,175,80,.1);  color: #4caf50; }
.er-stat-value {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text, #222);
  line-height: 1.2;
}
.er-stat-label {
  font-size: .7rem;
  color: #888;
  margin-top: 1px;
}

/* 목표 달성률 위젯 */
.er-goal-widget {
  margin: 0 16px 12px;
  background: var(--card, #fff);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.er-goal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.er-goal-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text, #222);
  display: flex;
  align-items: center;
  gap: 5px;
}
.er-goal-title i { color: #ff6b00; }
.er-goal-pct {
  font-size: .9rem;
  font-weight: 700;
  color: #1a73e8;
}
.er-goal-bar-wrap {
  height: 8px;
  background: #e8ecf0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}
.er-goal-bar {
  height: 100%;
  background: linear-gradient(90deg, #1a73e8, #0d47a1);
  border-radius: 4px;
  transition: width .6s ease;
  min-width: 4px;
}
.er-goal-footer {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: #888;
}

/* 히스토리 헤더 */
.er-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}
.er-history-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text, #222);
}

/* 상태 필터 버튼 */
.er-history-filters {
  display: flex;
  gap: 4px;
}
.er-hf-btn {
  background: none;
  border: 1px solid #dde1ea;
  border-radius: 20px;
  font-size: .7rem;
  padding: 3px 9px;
  color: #777;
  cursor: pointer;
  transition: all .15s;
}
.er-hf-btn.active,
.er-hf-btn:hover {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}

/* 히스토리 목록 */
.er-history-list {
  padding: 0 16px;
}
.er-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #f0f2f5);
  gap: 8px;
}
.er-history-item:last-child { border-bottom: none; }
.er-history-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.er-history-status-icon {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.er-history-amount {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text, #222);
}
.er-history-meta {
  font-size: .72rem;
  color: #888;
  margin-top: 1px;
}
.er-history-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.er-history-reject-reason {
  font-size: .68rem;
  color: #e53935;
  max-width: 120px;
  text-align: right;
  line-height: 1.3;
}

/* 히스토리 상태 배지 */
.er-history-badge {
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.er-history-badge--verified  { background: #e8f5e9; color: #2e7d32; }
.er-history-badge--pending   { background: #fff8e1; color: #f57f17; }
.er-history-badge--rejected  { background: #fce4ec; color: #c62828; }
.er-history-badge--flagged   { background: #fff3e0; color: #e65100; }

/* 히스토리 빈 상태 */
.er-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  gap: 8px;
  color: #aaa;
  font-size: .84rem;
}
.er-history-empty i { font-size: 1.6rem; opacity: .5; }

/* ── 다크 모드: OCR + 히스토리 ───────────────────────────── */
[data-theme="dark"] .er-ocr-review-panel {
  background: #1a1c24;
  border-color: #252840;
}
[data-theme="dark"] .er-ocr-review-header {
  background: rgba(232,105,10,.08);
  color: var(--accent);
}
[data-theme="dark"] .er-ocr-review-value { color: #e0e6ff; }
[data-theme="dark"] .er-ocr-review-label { color: #666; }
[data-theme="dark"] .er-ocr-review-row   { border-color: #252840; }
[data-theme="dark"] .er-ocr-apply-btn    { background: rgba(232,105,10,.1); color: var(--accent); }
[data-theme="dark"] .er-ocr-apply-btn:hover { background: rgba(232,105,10,.2); }
[data-theme="dark"] .er-scan-progress-text { color: #888; }

[data-theme="dark"] .er-stat-card    { background: #1a1c24; }
[data-theme="dark"] .er-stat-value   { color: #e0e6ff; }
[data-theme="dark"] .er-goal-widget  { background: #1a1c24; }
[data-theme="dark"] .er-goal-title   { color: #e0e6ff; }
[data-theme="dark"] .er-goal-bar-wrap { background: #252840; }
[data-theme="dark"] .er-goal-footer  { color: #666; }
[data-theme="dark"] .er-history-title { color: #e0e6ff; }
[data-theme="dark"] .er-hf-btn        { border-color: #252840; color: #888; }
[data-theme="dark"] .er-hf-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .er-history-amount { color: #e0e6ff; }
[data-theme="dark"] .er-history-item  { border-color: #252840; }
[data-theme="dark"] .er-history-badge--verified { background: #1a3a1e; color: #66bb6a; }
[data-theme="dark"] .er-history-badge--pending  { background: #3a2e10; color: #ffa726; }
[data-theme="dark"] .er-history-badge--rejected { background: #3a1010; color: #ef9a9a; }
[data-theme="dark"] .er-history-badge--flagged  { background: #3a2010; color: #ffb74d; }

/* ══════════════════════════════════════════════════════════
   Module 22: 메인 탭 네비게이션 + 슬라이드 패널
══════════════════════════════════════════════════════════ */

/* ── 메인 탭 바 ─────────────────────────────────────────── */
.er-main-tabs {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

.er-main-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 0 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: .86rem;
  font-weight: 500;
  color: #999;
  cursor: pointer;
  transition: color .2s, border-color .2s, font-weight .2s;
  white-space: nowrap;
  position: relative;
}

.er-main-tab i {
  font-size: .8rem;
  opacity: .7;
  transition: opacity .2s;
}

.er-main-tab.active {
  color: var(--primary);        /* 기존 포인트 컬러와 통일 */
  font-weight: 700;
  border-bottom-color: var(--primary);
}

.er-main-tab.active i {
  opacity: 1;
}

.er-main-tab:hover:not(.active) {
  color: #555;
}

/* ── 탭 뷰포트 (overflow hidden) ───────────────────────── */
.er-tab-viewport {
  overflow: hidden;
  width: 100%;
}

/* ── 탭 트랙 (두 패널을 가로로 나란히 배치) ──────────────── */
.er-tab-track {
  display: flex;
  width: 200%;          /* 패널 2개 × 100% */
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── 각 탭 패널 ─────────────────────────────────────────── */
.er-tab-panel {
  width: 50%;           /* 트랙의 절반 = 뷰포트 전체 너비 */
  flex-shrink: 0;
  min-height: 300px;
}

/* ── 다크 모드 ──────────────────────────────────────────── */
[data-theme="dark"] .er-main-tabs {
  background: #1a1c24;
  border-bottom-color: #252840;
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}

[data-theme="dark"] .er-main-tab {
  color: #666;
}

[data-theme="dark"] .er-main-tab.active {
  color: #ff8533;
  border-bottom-color: #ff8533;
}

[data-theme="dark"] .er-main-tab:hover:not(.active) {
  color: #aaa;
}

/* ════════════════════════════════════════════════════════════
   Module 23: 스코프 필터 탭 (전체/내 지역/내 팀)
   + 지역/팀 집계 뷰
   ════════════════════════════════════════════════════════════ */

/* ── 스코프 탭 바 ─────────────────────────────────────────── */
.er-scope-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 4px;
  background: transparent;
}

.er-scope-tab {
  flex: 1;
  padding: 7px 0;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  background: transparent;
  color: #666;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s ease;
  text-align: center;
}

.er-scope-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(232,105,10,.25);
}

.er-scope-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* 기간 탭: link → button 변환 후 스타일 정렬 */
.er-period-tabs .er-period-tab {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: .8rem;
  color: #888;
  transition: all .15s ease;
}

.er-period-tabs .er-period-tab.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.er-period-tabs .er-period-tab:hover:not(.active) {
  color: var(--primary);
}

/* ── 지역/팀 집계 리스트 ──────────────────────────────────── */
.er-region-team-list {
  padding: 8px 16px 24px;
}

.er-rt-header {
  font-size: .75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 0 10px;
}

.er-region-team-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.er-region-team-item:last-child {
  border-bottom: none;
}

.er-rt-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #555;
  flex-shrink: 0;
}

.er-region-team-item:nth-child(2) .er-rt-rank { background: #ffd700; color: #7a5c00; }
.er-region-team-item:nth-child(3) .er-rt-rank { background: #c0c0c0; color: #444; }
.er-region-team-item:nth-child(4) .er-rt-rank { background: #cd7f32; color: #fff; }

.er-rt-info {
  flex: 1;
  min-width: 0;
}

.er-rt-name {
  font-size: .9rem;
  font-weight: 600;
  color: #222;
  display: flex;
  align-items: center;
  gap: 5px;
}

.er-rt-name i {
  color: var(--primary);
  font-size: .75rem;
}

.er-rt-meta {
  font-size: .72rem;
  color: #999;
  margin-top: 2px;
}

.er-rt-total {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* ── 지역 태그 (랭킹 리스트 내) ────────────────────────────── */
.er-region-tag {
  font-size: .68rem;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 8px;
  padding: 1px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.er-region-tag i { font-size: .6rem; }

/* ── 다크 모드 ──────────────────────────────────────────────── */
[data-theme="dark"] .er-scope-tab {
  border-color: #333;
  color: #888;
}

[data-theme="dark"] .er-scope-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="dark"] .er-period-tabs .er-period-tab {
  color: #666;
}

[data-theme="dark"] .er-period-tabs .er-period-tab.active {
  background: rgba(232,105,10,.15);
  color: #ff8533;
}

[data-theme="dark"] .er-region-team-item {
  border-bottom-color: #252840;
}

[data-theme="dark"] .er-rt-rank {
  background: #252840;
  color: #aaa;
}

[data-theme="dark"] .er-rt-name {
  color: #eee;
}

[data-theme="dark"] .er-rt-meta {
  color: #666;
}

[data-theme="dark"] .er-region-tag {
  background: rgba(25,118,210,.15);
  color: #64b5f6;
}


/* ══════════════════════════════════════════════════════════════
   Module 16-B: 뽐뿌 스타일 가로 2단 Split View
   왼쪽 40% 지도 | 오른쪽 60% 리스트 | 화이트 테마
   ══════════════════════════════════════════════════════════════ */

/* ── sp-wrap: 가로(row) flex 컨테이너 ─────────────────────── */
/* main-content.no-padding(flex col)의 유일한 자식으로 height:100% 채움 */
.sp-wrap {
  display: flex;
  flex-direction: row;   /* ★ 가로 분할 핵심 */
  width: 100%;
  height: 100%;          /* flex:1과 함께 부모 높이 100% 채움 */
  flex: 1;               /* flex-grow:1 → 부모(column flex) 세로 공간 전부 차지 */
  min-height: 0;         /* flex 자식 오버플로우 방지 */
  overflow: hidden;
  background: #fff;
}

/* ── 왼쪽 패널: 지도 40% ──────────────────────────────────── */
.sp-left-panel {
  flex: 0 0 40%;
  min-width: 300px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid #e5e7eb;
  background: #f8f9fa;
}

/* 지도 영역: 패널 전체 채우기 */
.sp-map-area {
  width: 100%;
  height: 100%;
  position: relative;
}
.sp-map {
  width: 100%;
  height: 100%;
  display: block;
}
.sp-map-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #f0f0f0;
  color: #999;
}

/* 지도 컨트롤 버튼 */
.sp-map-controls {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 10;
}
.sp-ctrl-btn {
  width: 36px; height: 36px;
  background: #fff; border: 1px solid #ddd;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: #555;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: background .15s;
}
.sp-ctrl-btn:hover { background: #f5f5f5; }

/* 내 위치 바 */
.sp-location-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 8px 12px;
  font-size: .76rem;
  display: flex; align-items: center; gap: 6px;
  z-index: 10;
}
.sp-location-bar span { flex: 1; font-weight: 500; }
.sp-rescan-btn {
  background: #FF6B35; color: #fff;
  border: none; border-radius: 20px;
  padding: 4px 10px; font-size: .7rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.sp-rescan-btn:hover { opacity: .88; }

/* ── 오른쪽 패널: 필터 + 리스트 60% ─────────────────────── */
.sp-right-panel {
  flex: 1;           /* 나머지 60% */
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

/* 필터 + 정렬 바 */
.sp-filter-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
  overflow: hidden;
}
.sp-chip-wrap {
  display: flex; gap: 6px;
  overflow-x: auto; flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sp-chip-wrap::-webkit-scrollbar { display: none; }
.sp-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  font-size: .72rem; font-weight: 600;
  color: #555; background: #fff;
  white-space: nowrap; text-decoration: none;
  transition: all .15s;
}
.sp-chip:hover { border-color: #FF6B35; color: #FF6B35; }
.sp-chip.active { background: #FF6B35; border-color: #FF6B35; color: #fff; }

/* 정렬 버튼 */
.sp-sort-wrap { display: flex; gap: 4px; flex-shrink: 0; }
.sp-sort-btn {
  padding: 4px 9px;
  border: 1.5px solid #e0e0e0;
  border-radius: 16px;
  font-size: .68rem; font-weight: 600;
  color: #777; background: #fff; cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.sp-sort-btn:hover { border-color: #FF6B35; color: #FF6B35; }
.sp-sort-btn.active { background: #FF6B35; border-color: #FF6B35; color: #fff; }

/* ── 리스트 영역 (h-0 트릭으로 스크롤) ────────────────────── */
.sp-list-area {
  flex: 1;
  min-height: 0;      /* ★ h-0 트릭 핵심 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}
.sp-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 6px;
  font-size: .78rem; font-weight: 700; color: #333;
  border-bottom: 1px solid #f0f0f0;
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.sp-card-list { padding: 4px 0; }

/* ── 뽐뿌 스타일 Rich Card ─────────────────────────────────── */
.sp-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  transition: background .12s;
  position: relative;
  background: #fff;
}
.sp-card:hover { background: #fafafa; }
.sp-card-active {
  background: #fff8f5 !important;
  border-left: 3px solid #FF6B35;
}

/* 썸네일 (컬러 아이콘) */
.sp-thumb {
  flex: 0 0 52px;
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem;
}

/* 카드 본문 */
.sp-card-body { flex: 1; min-width: 0; }
.sp-card-row1 {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 3px;
}
.sp-card-name {
  font-size: .92rem; font-weight: 700; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.sp-dist-badge {
  font-size: .7rem; font-weight: 600;
  color: #FF6B35; background: #fff3ee;
  padding: 2px 7px; border-radius: 10px;
  white-space: nowrap; flex-shrink: 0;
}
.sp-card-row2 {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 4px; font-size: .78rem;
}
.sp-rating-num { font-weight: 700; color: #111; }
.sp-review-cnt { color: #999; }
.sp-price-tag {
  font-size: .66rem; font-weight: 700;
  padding: 1px 6px; border-radius: 8px;
  margin-left: auto;
}
.sp-card-row3 { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.sp-tag {
  font-size: .66rem; color: #666;
  background: #f5f5f5; border: 1px solid #eee;
  padding: 2px 7px; border-radius: 10px;
}
.sp-card-row4 { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 3px; }

/* 배지 */
.sp-bdg {
  font-size: .63rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}
.sp-bdg-rcpt { background: #e3f2fd; color: #1565c0; }
.sp-bdg-hot  { background: #fff3e0; color: #e65100; }
.sp-bdg-best { background: #fce4ec; color: #880e4f; }

/* 한줄 리뷰 */
.sp-review-line {
  font-size: .72rem; color: #888;
  font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

/* 전화 버튼 */
.sp-call-btn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff3ee; color: #FF6B35;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; text-decoration: none;
  border: 1px solid #ffddd0;
  align-self: center;
}
.sp-call-btn:hover { background: #FF6B35; color: #fff; }

/* 로딩 / 빈 상태 */
.sp-loading, .sp-empty {
  text-align: center; padding: 48px 24px;
  color: #bbb; font-size: .85rem;
}
.sp-empty i { font-size: 2rem; margin-bottom: 10px; display: block; }

/* ── PC 상세 오버레이 ──────────────────────────────────────── */
.sp-detail-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.35);
  z-index: 400;
  align-items: flex-start;
  justify-content: flex-end;
}
.sp-detail-overlay.open { display: flex; }
.sp-detail-panel {
  width: 400px; max-width: 95vw;
  height: 100%;
  background: #fff;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  overflow: hidden;
  position: relative;
  animation: slideInRight .22s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.sp-detail-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px;
  background: #f5f5f5; border: 1px solid #e0e0e0;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: #666; z-index: 2;
}
.sp-detail-close:hover { background: #eee; }

/* ── 모바일 FAB ────────────────────────────────────────────── */
.sp-fab {
  display: none;
  position: fixed;
  bottom: 24px; right: 20px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #FF6B35; color: #fff;
  border: none; cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(255,107,53,.4);
  z-index: 300;
  transition: transform .15s;
}
.sp-fab:active { transform: scale(.93); }

/* ── 반응형: 모바일 (< 768px) 세로 스택 ──────────────────── */
@media (max-width: 767px) {
  .sp-fab { display: flex; }

  /* 모바일: 세로(column) 전환 */
  .sp-wrap {
    flex-direction: column;
  }

  /* 왼쪽 패널 → 상단 지도 (기본 숨김) */
  .sp-left-panel {
    flex: 0 0 0;
    min-width: unset;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid #eee;
    transition: flex-basis .2s ease;
  }

  /* 오른쪽 패널 → 전체 화면 리스트 */
  .sp-right-panel {
    flex: 1;
    min-height: 0;
  }

  /* FAB으로 지도 전체보기 토글 */
  .sp-wrap.mobile-map-full .sp-left-panel {
    flex: 0 0 100%;
  }
  .sp-wrap.mobile-map-full .sp-right-panel {
    flex: 0 0 0;
    overflow: hidden;
  }

  .sp-sort-wrap { display: none; }
  .sp-filter-row { gap: 4px; padding: 7px 10px; }
  .sp-detail-panel { width: 100%; }
}

/* ── 반응형: 태블릿 (768~1023px) ─────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .sp-left-panel  { flex: 0 0 38%; }
  .sp-right-panel { flex: 1; }
  .sp-fab { display: none; }
}

/* ── 반응형: PC (>= 1024px) ───────────────────────────────── */
@media (min-width: 1024px) {
  .sp-left-panel  { flex: 0 0 40%; }
  .sp-right-panel { flex: 1; }
  .sp-fab { display: none; }
}

/* ── 다크테마 오버라이드 ──────────────────────────────────── */
[data-theme="dark"] .sp-wrap,
[data-theme="dark"] .sp-right-panel,
[data-theme="dark"] .sp-list-area,
[data-theme="dark"] .sp-card,
[data-theme="dark"] .sp-filter-row,
[data-theme="dark"] .sp-list-header { background: #1a1a2e; }
[data-theme="dark"] .sp-card { border-bottom-color: #2a2a3e; }
[data-theme="dark"] .sp-card:hover { background: #22223a; }
[data-theme="dark"] .sp-card-active { background: rgba(255,107,53,.1) !important; }
[data-theme="dark"] .sp-card-name { color: #f0f0f0; }
[data-theme="dark"] .sp-chip { background: #22223a; border-color: #333; color: #ccc; }
[data-theme="dark"] .sp-left-panel { background: #111; border-right-color: #2a2a3e; }
[data-theme="dark"] .sp-tag { background: #2a2a3e; border-color: #333; color: #aaa; }
[data-theme="dark"] .sp-detail-panel { background: #1a1a2e; }

/* ============================================================
   라이더세상 v11 정체성·게시판 컴포넌트 (A3 §2~§6)
   라이트 기본 + 다크 토글. color-mix 로 테마 자동 추종.
   ============================================================ */

/* ── §2-3 큰 숫자 (평단가·무휴일차) ── */
.metric        { font-variant-numeric: tabular-nums; line-height: 1.05; }
.metric-xl     { font-size: 3rem; font-weight: 800; letter-spacing: -0.04em; color: var(--positive); }
.metric-unit   { font-size: 0.42em; font-weight: 600; color: var(--fg-2); margin-left: 0.12em; }
.metric-label  { font-size: 0.75rem; font-weight: 500; color: var(--fg-3);
  letter-spacing: 0.06em; text-transform: uppercase; }

/* ── §3-2 분류 칩 6탭 색 (전체뷰에서만 노출) ── */
.bbd-cat-tag--home   { background: var(--cat-home); }
.bbd-cat-tag--info   { background: var(--cat-info); }
.bbd-cat-tag--safety { background: var(--cat-safety); }
.bbd-cat-tag--me     { background: var(--cat-me); }
.bbd-cat-tag--gear   { background: var(--cat-gear); }
.bbd-cat-tag--local  { background: var(--cat-local); }

/* 상태 뱃지 (SOS·신규) */
.bbd-badge-sos { color: #fff; background: var(--critical);
  font-size: .62rem; font-weight: 800; padding: 1px 6px; border-radius: 4px; }

/* ── §6-3 칩 (필터/말머리 — 6탭 서브) ── */
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px var(--page-pad);
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 6px 13px; border-radius: var(--radius-pill);
  background: var(--bg-2); color: var(--fg-2); font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  transition: background .12s, border-color .12s; }
.chip:active { transform: scale(0.96); }
.chip.is-active { background: var(--chip-c, var(--primary)); color: #fff;
  border-color: var(--chip-c, var(--primary)); font-weight: 600; }
.chip--tool { background: transparent; border-style: dashed; }  /* 도구(계산기) = 테두리 */

/* ── §4-1 등급 6단 (배린이 → 배달왕) ── */
.grade { display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.69rem; font-weight: 700; padding: 1px 7px 1px 5px;
  border-radius: var(--radius-pill); line-height: 1.5; white-space: nowrap;
  color: var(--grade-c); background: color-mix(in oklab, var(--grade-c) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--grade-c) 30%, transparent); }
.grade__icon { font-size: 0.8em; }
.grade--baerini   { --grade-c: var(--fg-3); border-color: transparent; background: transparent; }
.grade--baedalreo { --grade-c: var(--cat-info); }
.grade--baedalkkun{ --grade-c: var(--cat-local); }
.grade--baedalsa  { --grade-c: var(--cat-gear); border-width: 1.5px; }
.grade--master    { --grade-c: var(--primary); border-width: 2px;
  background: color-mix(in oklab, var(--primary) 16%, transparent); }
.grade--king      { --grade-c: var(--primary-hover); border-width: 2px;
  background: linear-gradient(110deg,
    color-mix(in oklab, var(--primary) 22%, transparent) 0%,
    color-mix(in oklab, var(--primary) 8%, transparent) 50%,
    color-mix(in oklab, var(--primary) 22%, transparent) 100%);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 40%, transparent) inset; }
/* 인라인(글목록·댓글 옆)은 한 단계 작게 */
.bbd-author .grade, .cmt-author .grade { margin-left: 4px; transform: translateY(-1px);
  font-size: 0.62rem; padding: 0 5px; }

/* ── §4-3 뱃지 10종 × 4단계 ── */
.badge { display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--badge-c); background: color-mix(in oklab, var(--badge-c) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--badge-c) 28%, transparent); }
.badge--lifetime  { --badge-c: #EA580C; }
.badge--efficient { --badge-c: var(--primary); }
.badge--district  { --badge-c: var(--cat-local); }
.badge--mission   { --badge-c: var(--cat-info); }
.badge--help      { --badge-c: #DB2777; }
.badge--mentor    { --badge-c: var(--cat-gear); }
.badge--safety    { --badge-c: #16A34A; }
.badge--mechanic  { --badge-c: #64748B; }
.badge--kindness  { --badge-c: var(--danger); }
.badge--guide     { --badge-c: #0891B2; }
.badge[data-tier="bronze"]  { opacity: 0.85; }
.badge[data-tier="silver"]  { border-width: 1.5px; }
.badge[data-tier="gold"]    { border-width: 2px; font-weight: 700;
  box-shadow: 0 0 0 1px color-mix(in oklab,var(--badge-c) 25%,transparent) inset; }
.badge[data-tier="platinum"]{ border-width: 2px; font-weight: 800;
  background: linear-gradient(110deg,
    color-mix(in oklab,var(--badge-c) 22%,transparent),
    color-mix(in oklab,var(--badge-c) 9%,transparent) 50%,
    color-mix(in oklab,var(--badge-c) 22%,transparent));
  box-shadow: 0 0 0 1px color-mix(in oklab,var(--badge-c) 45%,transparent) inset,
              0 1px 6px color-mix(in oklab,var(--badge-c) 25%,transparent); }
.badge[data-tier]::after { font-size: 0.85em; opacity: 0.7; }
.badge[data-tier="silver"]::after   { content: "II"; }
.badge[data-tier="gold"]::after     { content: "III"; }
.badge[data-tier="platinum"]::after { content: "IV"; }

/* ── §4-4 무휴 N일차 히어로 카드 ── */
.streak-hero { position: relative; overflow: hidden;
  background: linear-gradient(150deg,
    color-mix(in oklab, var(--primary) 10%, var(--bg-2)) 0%, var(--bg-2) 55%);
  border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--border));
  border-radius: var(--radius-xl); padding: var(--space-6) var(--space-5);
  text-align: center; }
.streak-hero::before { content: ''; position: absolute; top: -50px; right: -50px;
  width: 180px; height: 180px; pointer-events: none;
  background: radial-gradient(circle, color-mix(in oklab,var(--primary) 22%,transparent) 0%, transparent 70%); }
.streak-hero__flame { font-size: 2.2rem; line-height: 1;
  filter: drop-shadow(0 2px 8px color-mix(in oklab,var(--primary) 50%,transparent));
  animation: flame-flicker 2.4s ease-in-out infinite; }
.streak-hero__label { font-size: 0.8rem; font-weight: 600; color: var(--primary);
  letter-spacing: 0.18em; margin-top: 6px; }
.streak-hero__count { font-size: 1.1rem; font-weight: 600; color: var(--fg-2); }
.streak-hero__num { font-size: 3.6rem; font-weight: 800; letter-spacing: -0.04em;
  color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1.0;
  display: inline-block; vertical-align: -0.05em; margin-right: 4px; }
.streak-hero__sub { font-size: 0.82rem; color: var(--fg-3); margin-top: 6px; }
.streak-hero__bar { height: 8px; border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--primary) 14%, var(--bg-3));
  margin: var(--space-4) 0 8px; overflow: hidden; }
.streak-hero__fill { height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  box-shadow: 0 0 8px color-mix(in oklab,var(--primary) 50%,transparent);
  transition: width 0.6s var(--ease-spring); }
.streak-hero__next { font-size: 0.78rem; color: var(--fg-2); }
.streak-hero__next b { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.streak-hero.is-milestone { animation: milestone-pop 0.8s var(--ease-spring); }
.streak-hero.is-milestone .streak-hero__flame { font-size: 3rem; }
@keyframes flame-flicker { 0%,100% { transform: scale(1) rotate(-1deg); } 50% { transform: scale(1.08) rotate(1deg); } }
@keyframes milestone-pop { 0%{transform:scale(.96)} 50%{transform:scale(1.03)} 100%{transform:scale(1)} }
/* 인라인 무휴 칩 (글목록 옆) */
.streak-chip { display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.7rem; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 1px 7px; border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums; }

/* ── §5 4종 리액션 (박수·존경·공감·응원, 비추천 없음) ── */
.reactions { display: flex; gap: 8px; flex-wrap: wrap; }
.reaction { display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 13px; border-radius: var(--radius-pill);
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--fg-2); font-weight: 500;
  transition: background .15s, border-color .15s, transform .1s; }
.reaction b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg-1); }
.reaction:hover { border-color: var(--border-strong); background: var(--bg-3); }
.reaction:active { transform: scale(0.94); }
.reaction.is-active { background: var(--primary-soft); border-color: var(--primary); }
.reaction.is-active, .reaction.is-active b { color: var(--primary-hover); }
.reaction.just-tapped { animation: react-pop .42s var(--ease-spring); }
@keyframes react-pop { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }

/* ── §6-5 FAB SOS 모드 (빨강 펄스) ── */
.fab--sos { background: var(--critical); }
.fab--sos::after { content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--critical); animation: pulse-ring 2.2s ease-out infinite; }
@keyframes pulse-ring { 0%{transform:scale(.9);opacity:.8} 100%{transform:scale(1.25);opacity:0} }

/* ── 하단 탭바: 6탭(4 메인 + 더보기) 대응 ── */
.tabbar-more .tabbar-icon { color: var(--fg-3); }
.tabbar-item.active .tabbar-more-dot { display: inline-block; }

/* ── 더보기 바텀시트 (모바일 — 장비·동네 + 설정/테마) ── */
.more-sheet-overlay { position: fixed; inset: 0; z-index: 110;
  background: var(--bg-overlay); opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease-out); }
.more-sheet-overlay.open { opacity: 1; pointer-events: auto; }
.more-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 111;
  background: var(--bg-2); border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  padding: 10px 16px calc(20px + var(--m-safe-bot));
  transform: translateY(110%); transition: transform .26s var(--ease-out); }
.more-sheet.open { transform: translateY(0); }
.more-sheet-handle { width: 40px; height: 4px; border-radius: 999px;
  background: var(--border-strong); margin: 4px auto 14px; }
.more-sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.more-sheet-item { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border-radius: var(--radius-md); text-decoration: none;
  color: var(--fg-2); font-size: 0.75rem; font-weight: 500;
  background: var(--bg-3); border: 1px solid transparent; }
.more-sheet-item.active { color: var(--primary); border-color: var(--primary);
  background: var(--primary-soft); font-weight: 700; }
.more-sheet-emoji { font-size: 1.4rem; line-height: 1; }
/* v12: 더보기 시트 브레이크 통일 → 901px (탭바·셸과 일치). M1 §4-1 */
@media (min-width: 901px) { .more-sheet, .more-sheet-overlay { display: none; } }

/* ── 사이드바 서브아이템 (탭 펼침 시 칩 목록 — v11) ── */
.sidebar-subitem { padding-left: 34px !important; font-size: .82rem; color: var(--fg-2); }
.sidebar-subitem i { font-size: .78rem; }
.sidebar-subitem--tool { font-style: italic; opacity: .92; }
.sidebar-subitem--tool::after { content: '계산'; margin-left: auto; font-size: .6rem;
  font-style: normal; color: var(--fg-3); border: 1px dashed var(--border-strong);
  border-radius: 4px; padding: 0 4px; }
