/* ===== 친구패밀리 · 시그니처 옐로우 테마 ===== */
:root {
  --yellow: #f59e0b;
  --yellow-light: #fbbf24;
  --yellow-pale: #fef3c7;
  --yellow-bg: #fffbeb;
  --yellow-border: #fde68a;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-darker: #92400e;
  --white: #ffffff;
  --bg: #fafaf9;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --text: #1c1917;
  --text-soft: #78716c;
  --text-faint: #a8a29e;
  --text-hint: #d6d3d1;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button, input { font: inherit; }

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}
main { padding: 0 0 48px; }

/* ===== 네비게이션 ===== */
.site-header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--yellow-border);
  backdrop-filter: blur(12px);
}
.site-header-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-emoji { font-size: 24px; line-height: 1; }
.brand-title { font-size: 1.1rem; font-weight: 700; color: var(--amber-darker); line-height: 1; }
.brand-sub { font-size: 0.72rem; color: var(--amber); margin-top: 2px; }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-faint);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.nav-link:hover { color: var(--amber); background: var(--yellow-bg); }
.nav-link.is-active {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  color: var(--amber-dark);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-nav-panel { display: none; border-top: 1px solid var(--border); background: var(--white); }
.mobile-nav-links { display: grid; gap: 6px; padding: 12px 0 16px; }
.mobile-nav-panel.is-open { display: block; }
.mobile-nav-links .nav-link {
  border-radius: var(--radius-md);
  height: 44px;
  padding: 0 16px;
}

/* ===== 히어로 섹션 ===== */
.home-hero {
  background: var(--yellow-bg);
  border-bottom: 1px solid var(--yellow-border);
  padding: 40px 0 32px;
  margin-bottom: 0;
}
.hero-inner { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--amber-dark);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--yellow-border);
  margin-bottom: 16px;
}
.hero-dot { width: 6px; height: 6px; background: var(--yellow); border-radius: 50%; }
.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}
.hero-title .accent { color: var(--amber); }
.hero-desc { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 6px; }
.hero-update { color: var(--text-faint); font-size: 0.8rem; margin-bottom: 24px; }
.hero-update .time { color: var(--amber); font-weight: 500; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  background: var(--yellow);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.cta-btn:hover { background: var(--amber); }
.kpi-card {
  background: var(--white);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.kpi-label { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 6px; }
.kpi-value { font-size: 1.3rem; font-weight: 700; color: var(--amber); }
.kpi-value.dark { color: var(--text); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--amber-dark);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--yellow-border);
  margin-bottom: 16px;
}
.hero-dot {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
}
.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}
.hero-title .accent { color: var(--amber); }
.hero-desc { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 6px; }
.hero-update { color: var(--text-faint); font-size: 0.8rem; margin-bottom: 24px; }
.hero-update .time { color: var(--amber); font-weight: 500; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  background: var(--yellow);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.cta-btn:hover { background: var(--amber); }

/* KPI 그리드 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.kpi-card {
  background: var(--white);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.kpi-label { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 6px; }
.kpi-value { font-size: 1.3rem; font-weight: 700; color: var(--amber); }
.kpi-value.dark { color: var(--text); }

/* ===== 섹션 공통 ===== */
.section-block {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: 28px 0;
}
.section-block:last-child { border-bottom: none; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.section-sub { font-size: 0.8rem; color: var(--text-faint); margin-top: 3px; }
.section-link { font-size: 0.82rem; color: var(--amber); font-weight: 500; }

/* ===== 길드별 현황 카드 ===== */
.family-board-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.guild-board-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: border-color 0.15s;
}
.guild-board-card.active {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
}
.guild-board-card:hover { border-color: var(--yellow-border); }
.guild-board-emoji { font-size: 28px; margin-bottom: 8px; }
.guild-board-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber-darker);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.guild-board-lv {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
}
.guild-board-card.full {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.guild-board-card.full .guild-board-name { color: #166534; }
.guild-board-card.full .guild-board-stat-val.accent { color: #16a34a; }
.guild-board-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 10px;
  margin-bottom: 2px;
}
.guild-board-badge.full { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.guild-board-badge.recruit { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.guild-board-more {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--amber);
  font-weight: 600;
}
.guild-board-card.full .guild-board-more { color: #16a34a; }
.guild-board-card:hover .guild-board-more { text-decoration: underline; }

/* ===== 모달 ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.modal-title-wrap { display: flex; align-items: center; gap: 12px; }
.modal-emoji { font-size: 28px; }
.modal-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.modal-sub { font-size: 0.78rem; color: var(--text-faint); margin-top: 2px; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-soft);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--border); }
.modal-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.modal-stat-item {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 12px;
}
.modal-stat-label { font-size: 0.72rem; color: var(--text-faint); margin-bottom: 4px; }
.modal-stat-value { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-stat-value.accent { color: var(--amber); }
.modal-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  padding: 14px 20px 8px;
}
.modal-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
}
.modal-member-row:last-child { border-bottom: none; }
.modal-member-rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  width: 18px;
  flex-shrink: 0;
}
.modal-member-info { flex: 1; min-width: 0; }
.modal-member-name { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.modal-member-meta { font-size: 0.75rem; color: var(--text-faint); margin-top: 2px; }
.modal-member-power { font-size: 0.88rem; font-weight: 700; color: var(--amber); white-space: nowrap; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}
.modal-more-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-lg);
  color: var(--amber-dark);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.modal-more-btn:hover { background: var(--yellow-pale); }

/* ===== 길드 모달 ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--yellow-border);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-title-wrap { display: flex; align-items: center; gap: 10px; }
.modal-emoji { font-size: 24px; }
.modal-guild-name { font-size: 1.1rem; font-weight: 700; color: var(--amber-darker); }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-soft);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--yellow-bg); border-color: var(--yellow-border); color: var(--amber); }
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.modal-stat {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: center;
}
.modal-stat-label { font-size: 0.7rem; color: var(--text-faint); margin-bottom: 4px; }
.modal-stat-value { font-size: 0.95rem; font-weight: 700; color: var(--amber-dark); }
.modal-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  padding: 14px 20px 8px;
}
.modal-member-list { padding: 0 20px 20px; display: grid; gap: 8px; }
.modal-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
}
.modal-member-row:hover { border-color: var(--yellow-border); }
.modal-member-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  flex: 0 0 auto;
}
.modal-member-info { flex: 1; min-width: 0; }
.modal-member-name { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.modal-member-sub { font-size: 0.75rem; color: var(--text-faint); margin-top: 2px; }
.modal-member-power { font-size: 0.88rem; font-weight: 700; color: var(--amber); white-space: nowrap; }
.guild-board-card { cursor: pointer; }
.guild-board-more {
  margin-top: 10px;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--amber-darker); }
.modal-sub { font-size: 0.75rem; color: var(--text-faint); margin-top: 2px; }
.modal-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
}
.modal-stat-item {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.modal-stat-label { font-size: 0.7rem; color: var(--text-faint); margin-bottom: 4px; }
.modal-stat-value { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.modal-stat-value.accent { color: var(--amber); }
.modal-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  padding: 14px 20px 8px;
}
.modal-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin: 0 20px 8px;
  transition: border-color 0.15s;
}
.modal-member-row:hover { border-color: var(--yellow-border); }
.modal-member-rank {
  width: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  flex: 0 0 auto;
  text-align: center;
}
.modal-member-info { flex: 1; min-width: 0; }
.modal-member-name { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.modal-member-meta { font-size: 0.72rem; color: var(--text-faint); margin-top: 2px; }
.modal-member-power { font-size: 0.88rem; font-weight: 700; color: var(--amber); white-space: nowrap; }
.modal-footer {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
}
.modal-more-btn {
  display: block;
  text-align: center;
  padding: 10px;
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
  color: var(--amber-dark);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.modal-more-btn:hover { background: var(--yellow-pale); }
.guild-board-stat { margin-bottom: 6px; }
.guild-board-stat-label { font-size: 0.72rem; color: var(--text-faint); }
.guild-board-stat-val { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.guild-board-stat-val.accent { color: var(--amber); }
.guild-board-meta { font-size: 0.72rem; color: var(--text-faint); margin-top: 8px; }

/* ===== TOP 3 ===== */
.top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.top-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
}
.top-card.gold {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
}
.top-rank-icon { font-size: 24px; margin-bottom: 8px; }
.top-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.top-power { font-size: 0.85rem; color: var(--amber); font-weight: 600; margin-bottom: 4px; }
.top-meta { font-size: 0.75rem; color: var(--text-faint); }

/* ===== 주간 변화 ===== */
.summary-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.summary-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.sub-head {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.mini-card-list { display: grid; gap: 6px; }
.mini-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.mini-summary-rank { font-size: 0.8rem; font-weight: 700; color: var(--amber); width: 16px; }
.mini-summary-main { flex: 1; min-width: 0; }
.mini-summary-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.mini-summary-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-faint);
}
.mini-summary-side { font-size: 0.82rem; font-weight: 600; color: var(--amber); white-space: nowrap; }

/* ===== 캐릭터 아바타 ===== */
.character-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
}
.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(3.2);
  transform-origin: center center;
}
.character-avatar.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-weight: 700;
  font-size: 1.2rem;
}
.character-avatar .avatar-fallback { display: none; }
.character-avatar.no-image .avatar-fallback { display: inline; }

/* ===== 랭킹 페이지 ===== */
.page-card {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: 28px 0;
}
.toolbar-card {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--border);
}
.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text);
}
.ghost-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.ghost-btn:hover { border-color: var(--yellow-border); color: var(--amber); background: var(--yellow-bg); }

.tab-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { border-color: var(--yellow-border); color: var(--amber); }
.tab-btn.is-active {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  color: var(--amber-dark);
  font-weight: 600;
}

/* ===== 카드 리스트 ===== */
.scroll-panel { overflow: auto; }
.ranking-scroll, .members-scroll, .weekly-scroll { max-height: 80vh; }
.stack-list { display: grid; gap: 10px; }
.list-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s;
}
.list-card:hover { border-color: var(--yellow-border); }
.list-card.highlight-card {
  border-color: var(--yellow);
  background: var(--yellow-bg);
}
.list-card.dim-card { opacity: 0.45; }
.card-left { display: flex; align-items: center; gap: 12px; }
.card-main { min-width: 0; }
.card-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.rank-name { font-size: 1.1rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.rank-subline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
}
.rank-subline .job-text { color: var(--text-soft); }
.rank-subline .level-text { color: var(--text); font-weight: 600; }
.rank-power { font-size: 1rem; font-weight: 700; color: var(--amber); text-align: right; white-space: nowrap; }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.meta-grid.four { grid-template-columns: repeat(4, 1fr); }
.mini-stat {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg);
}
.mini-stat span { display: block; font-size: 0.74rem; font-weight: 500; color: var(--text-soft); margin-bottom: 4px; }
.mini-stat strong { display: block; font-size: 0.92rem; color: var(--amber-dark); font-weight: 700; word-break: break-word; }

/* ===== 랭크 칩 ===== */
.rank-chip {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 2rem;
  flex: 0 0 auto;
}
.rank-chip.medal-gold { background: var(--yellow-pale); color: var(--amber-darker); border: 1px solid var(--yellow-border); }
.rank-chip.medal-silver { background: #f1f5f9; color: #42566f; border: 1px solid #cad4de; }
.rank-chip.medal-bronze { background: #ffeedd; color: #7c3810; border: 1px solid #f5c4a0; }
.rank-chip.rank-default { background: var(--bg); color: var(--text-soft); border: 1px solid var(--border); font-size: 1.1rem; font-weight: 700; }

/* ===== 길드 배지 ===== */
.guild-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
/* 친구들: 주황 (메인 길드 강조) */
.guild-badge.guild-f1 { background: #fff7ed; border-color: #f97316; color: #c2410c; font-weight: 700; }
/* 친구둘: 파랑 */
.guild-badge.guild-f2 { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
/* 친구삼: 초록 */
.guild-badge.guild-f3 { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
/* 친구넷: 보라 */
.guild-badge.guild-f4 { background: #faf5ff; border-color: #a855f7; color: #7e22ce; }
/* 친구닷: 회색 */
.guild-badge.guild-f5 { background: #f8fafc; border-color: #94a3b8; color: #475569; }
.guild-badge.guild-none { background: var(--bg); border-color: var(--border); color: var(--text-faint); }

/* ===== 순위 트렌드 ===== */
.rank-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.rank-trend.up { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.rank-trend.down { background: #fff5f5; color: #dc2626; border: 1px solid #fca5a5; }
.rank-trend.neutral { background: var(--bg); color: var(--text-faint); border: 1px solid var(--border); }

/* ===== 메트릭 ===== */
.metric-up { color: #059669; font-weight: 600; }
.metric-down { color: #dc2626; font-weight: 600; }
.metric-neutral { color: var(--text-soft); }
/* 성장량 전용: 증가=파랑, 감소=빨강 */
.metric-growth-up { color: #2563eb !important; font-weight: 700 !important; }
.metric-growth-down { color: #dc2626 !important; font-weight: 700 !important; }
/* 서버순위 변동: 상승=초록, 하락=빨강 */
.metric-rank-up { color: #059669 !important; font-weight: 700 !important; }
.metric-rank-down { color: #dc2626 !important; font-weight: 700 !important; }

/* ===== 공지/팁 ===== */
.notice-stack { display: grid; gap: 10px; }
.notice-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.notice-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.notice-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--yellow-bg);
  color: var(--amber-dark);
  border: 1px solid var(--yellow-border);
}
.notice-pin {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.notice-title { margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.notice-content { margin: 0; color: var(--text-soft); font-size: 0.88rem; }

/* ===== 빈 상태 / 로딩 / 에러 ===== */
.empty-box, .loading-box, .error-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text-faint);
  text-align: center;
  font-size: 0.88rem;
}
.error-box { background: #fff5f5; color: #b42318; border-color: #fca5a5; }

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .family-board-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .hero-title { font-size: 1.6rem; }
  .family-board-grid { grid-template-columns: repeat(2, 1fr); }
  .top3-grid { grid-template-columns: 1fr; }
  .summary-split { grid-template-columns: 1fr; }
  .meta-grid.four { grid-template-columns: repeat(2, 1fr); }
  .card-topline { display: block; }
  .rank-power { margin-top: 6px; text-align: left; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 24px); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .family-board-grid { grid-template-columns: repeat(2, 1fr); }
  .rank-chip { width: 44px; height: 44px; font-size: 0.95rem; }
  .character-avatar { width: 80px; height: 80px; }
  .meta-grid.four { grid-template-columns: repeat(2, 1fr); }
}
/* =============================================
   공지사항 페이지 스타일 (style.css 하단에 추가)
   ============================================= */

/* 페이지 헤더 */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 1.5rem;
}
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber-darker);
  margin-bottom: 0.3rem;
}
.page-subtitle {
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* 공지 목록 */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 780px;
  margin: 0 auto;
}

/* 공지 카드 - 기존 .notice-card 클래스와 충돌 방지를 위해 상세 선택자 사용 */
#notice-page .notice-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.18s, box-shadow 0.18s;
  padding: 0;
}
#notice-page .notice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
#notice-page .notice-card.notice-important {
  border-color: var(--yellow);
  border-width: 2px;
}

/* 카드 헤더 */
.notice-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--yellow-bg);
  border-bottom: 1px solid var(--yellow-border);
  padding: 1.2rem 1.4rem;
  flex-wrap: wrap;
}
.notice-header-left {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.notice-emoji {
  font-size: 2rem;
  line-height: 1;
  margin-top: 2px;
}
.notice-category-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--yellow);
  color: var(--white);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 5px;
  letter-spacing: 0.04em;
}
#notice-page .notice-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber-darker);
  margin: 0;
  line-height: 1.4;
}
.notice-date {
  font-size: 0.8rem;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 2px;
}

/* 카드 바디 */
.notice-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 인트로 */
.notice-intro {
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.75;
  border-left: 3px solid var(--yellow);
  padding-left: 0.85rem;
  margin: 0;
}

/* 섹션 */
.notice-section {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.notice-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber-dark);
}
.section-icon { font-size: 0.9rem; }
.section-desc {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.6;
}

/* 테이블형 항목 */
.section-table {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.section-table li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.86rem;
  align-items: flex-start;
}
.section-table .label {
  background: var(--yellow-pale);
  color: var(--amber-dark);
  border: 1px solid var(--yellow-border);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  min-width: 64px;
  text-align: center;
  margin-top: 1px;
  flex-shrink: 0;
}
.section-table .value {
  color: var(--text);
  line-height: 1.55;
}

/* 노트 */
.section-note {
  font-size: 0.83rem;
  color: var(--text-soft);
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  line-height: 1.6;
}

/* 불릿 리스트 */
.section-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.section-bullets li {
  font-size: 0.86rem;
  color: var(--text);
  padding-left: 1.3em;
  position: relative;
  line-height: 1.65;
}
.section-bullets li::before {
  content: "👉";
  position: absolute;
  left: -0.2em;
  font-size: 0.75rem;
  top: 1px;
}

/* 보조 텍스트 */
.section-sub {
  font-size: 0.78rem;
  color: var(--text-faint);
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  line-height: 1.7;
}

/* 스케줄 */
.section-schedule {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.section-schedule ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.section-schedule li {
  display: flex;
  gap: 0.8rem;
}
.sched-day {
  color: var(--amber-dark);
  font-weight: 700;
  min-width: 52px;
}
.sched-time { color: var(--text); }

/* 하이라이트 */
.section-highlight {
  background: var(--yellow-pale);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--amber-darker);
  text-align: center;
}

/* 아웃트로 */
.notice-outro {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.85;
  text-align: center;
}

/* 모바일 대응 */
@media (max-width: 480px) {
  .notice-card-header { flex-direction: column; gap: 0.4rem; }
  .notice-date { align-self: flex-end; }
  .page-title { font-size: 1.3rem; }
  .notice-card-body { padding: 1rem; }
}
/* ===== 월간성장 카드 레이아웃 ===== */
.monthly-card { align-items: flex-start; position: relative; }

/* 1등 카드 강조 */
.monthly-card-first {
  border: 2px solid var(--yellow) !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 60%) !important;
  box-shadow: 0 4px 20px rgba(245,158,11,0.18) !important;
}
.monthly-first-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  background: var(--yellow);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.03em;
}

/* 카드 상단 */
.monthly-card-top {
  margin-bottom: 10px;
}
.monthly-name-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.monthly-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.monthly-guild-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.monthly-guild-badge.guild-f1 { background:#fff7ed; border-color:#f97316; color:#c2410c; font-weight:700; }
.monthly-guild-badge.guild-f2 { background:#eff6ff; border-color:#3b82f6; color:#1d4ed8; }
.monthly-guild-badge.guild-f3 { background:#f0fdf4; border-color:#22c55e; color:#15803d; }
.monthly-guild-badge.guild-f4 { background:#faf5ff; border-color:#a855f7; color:#7e22ce; }
.monthly-guild-badge.guild-f5 { background:#f8fafc; border-color:#94a3b8; color:#475569; }
.monthly-guild-badge.guild-none { background:var(--bg); border-color:var(--border); color:var(--text-faint); }
.monthly-meta-line {
  font-size: 0.78rem;
  color: var(--text-faint);
  width: 100%;
}

/* 카드 바디 2칸 */
.monthly-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.monthly-growth-block,
.monthly-rank-block {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.monthly-block-label {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.monthly-growth-value { line-height: 1; }
.monthly-power-sub {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 2px;
}
.monthly-rank-current {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin: 2px 0;
  letter-spacing: -0.5px;
}
.monthly-rank-diff {
  line-height: 1.3;
  margin-top: 1px;
}

@media (max-width: 480px) {
  .monthly-card-body { grid-template-columns: 1fr; }
  .monthly-name { font-size: 1.15rem; }
  .monthly-rank-current { font-size: 1.25rem; }
}

/* ===== 랭킹 페이지 개편 ===== */

/* TOP3 히어로 영역 */
.rk-hero-wrap {
  background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 50%, #fffbeb 100%);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-xl);
  padding: 28px 16px 20px;
  margin: 16px 0 0;
}
.rk-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 12px;
  align-items: flex-end;
}
.rk-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 16px 8px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-lg);
  transition: transform 0.15s;
}
.rk-hero-card:hover { transform: translateY(-2px); }
.rk-hero-center {
  background: var(--white);
  border-color: var(--yellow);
  border-width: 2px;
  box-shadow: 0 6px 24px rgba(245,158,11,0.2);
  padding: 20px 12px;
}
.rk-hero-medal { font-size: 2rem; line-height: 1; }
.rk-hero-center .rk-hero-medal { font-size: 2.6rem; }
.rk-hero-avatar-wrap { width: 72px; height: 72px; }
.rk-hero-center .rk-hero-avatar-wrap { width: 88px; height: 88px; }
.rk-hero-avatar-wrap .character-avatar { width: 100%; height: 100%; }
.rk-hero-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.rk-hero-center .rk-hero-name { font-size: 1.1rem; }
.rk-hero-guild { margin: -2px 0; }
.rk-hero-power {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amber);
}
.rk-hero-center .rk-hero-power { font-size: 1rem; color: var(--amber-dark); }
.rk-hero-server { font-size: 0.72rem; color: var(--text-faint); }

/* 컷라인 구분선 */
.rk-cutline-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
}
.rk-cutline-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
}
.rk-cutline-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-dark);
  background: var(--yellow-pale);
  border: 1px solid var(--yellow-border);
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}

/* 컷라인 이하 표시 */
.rk-below-line {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin: 8px 0 4px;
}

/* 압축형 카드 */
.rk-list { display: grid; gap: 6px; }
.rk-compact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.rk-compact-card:hover {
  border-color: var(--yellow-border);
  transform: translateX(2px);
}
.rk-compact-card.highlight-card {
  border-color: var(--yellow);
  background: var(--yellow-bg);
}
.rk-compact-card.dim-card { opacity: 0.35; }

/* TOP3 카드 */
.rk-top3-card {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  border-width: 1.5px;
}

/* 컷라인 카드 */
.rk-cut-card {
  border-color: var(--yellow) !important;
  border-width: 2px !important;
  box-shadow: 0 2px 12px rgba(245,158,11,0.15);
}
.rk-cut-marker {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 28px;
  background: var(--yellow);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
}

/* 위험/도전 카드 */
.rk-danger-card {
  border-color: #fde68a !important;
  background: #fffbeb;
}
.rk-danger-card .rk-c-power span:first-child { color: var(--amber-dark) !important; font-size: 1.15rem !important; }
.rk-challenge-card {
  border-color: #fca5a5 !important;
  background: #fff5f5;
}
.rk-challenge-card .rk-c-power span:first-child { color: #b45309 !important; font-size: 1.15rem !important; }

/* 카드 내부 요소 */
.rk-c-rank {
  width: 40px;
  flex-shrink: 0;
  text-align: center;
}
.rk-c-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-soft);
}
.rk-num-danger { color: var(--amber-dark) !important; }
.rk-num-challenge { color: #dc2626 !important; }

.rk-c-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.rk-c-avatar .character-avatar { width: 44px; height: 44px; }

.rk-c-info { flex: 1; min-width: 0; }
.rk-c-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rk-c-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.rk-c-job { font-size: 0.75rem; color: var(--text-faint); }

.rk-c-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.rk-c-power {
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  line-height: 1.3;
}
.rk-c-server { font-size: 0.72rem; color: var(--text-faint); }
.rk-c-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid;
  margin-top: 2px;
}

/* 반응형 */
@media (max-width: 600px) {
  .rk-hero-grid { grid-template-columns: 1fr 1.2fr 1fr; gap: 6px; }
  .rk-hero-avatar-wrap { width: 56px; height: 56px; }
  .rk-hero-center .rk-hero-avatar-wrap { width: 68px; height: 68px; }
  .rk-hero-name { font-size: 0.82rem; }
  .rk-c-avatar { width: 36px; height: 36px; }
  .rk-c-avatar .character-avatar { width: 36px; height: 36px; }
}

/* ===== 길드 디렉토리 (members) ===== */

/* 탭 인원수 뱃지 */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--border);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  margin-left: 3px;
}
.tab-btn.is-active .tab-count {
  background: var(--amber);
  color: var(--white);
}

/* 길드 요약 카드 그리드 */
.mb-guild-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.mb-guild-summary-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.mb-guild-summary-card:hover {
  border-color: var(--yellow-border);
  background: var(--yellow-bg);
  transform: translateY(-1px);
}
.mb-guild-full {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.mb-gs-name { margin-bottom: 8px; display: flex; justify-content: center; }
.mb-gs-count {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.mb-gs-count span { font-size: 0.8rem; color: var(--text-soft); font-weight: 500; margin-left: 1px; }
.mb-gs-power {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber);
  margin-top: 4px;
}
.mb-gs-label {
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-top: 1px;
}
.mb-gs-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.mb-gs-status.full { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mb-gs-status.recruit { background: var(--yellow-pale); color: var(--amber-dark); border: 1px solid var(--yellow-border); }

/* 멤버 카드 */
.mb-list { display: grid; gap: 6px; }
.mb-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, background 0.15s;
}
.mb-card:hover { border-color: var(--yellow-border); background: var(--yellow-bg); }
.mb-card.highlight-card { border-color: var(--yellow); background: var(--yellow-bg); }
.mb-card.dim-card { opacity: 0.3; }

.mb-rank {
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.mb-rank-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-soft);
}
.mb-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.mb-avatar .character-avatar { width: 44px; height: 44px; }

.mb-info { flex: 1; min-width: 0; }
.mb-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.mb-master-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--yellow);
  color: var(--white);
  padding: 1px 6px;
  border-radius: 999px;
}
.mb-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.mb-job { font-size: 0.78rem; color: var(--text-soft); }
.mb-level { font-size: 0.75rem; color: var(--text-faint); font-weight: 600; }

/* 역할 뱃지 */
.mb-role {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}
.mb-role-dealer { background: #fff0f0; color: #dc2626; border: 1px solid #fca5a5; }
.mb-role-support { background: #eff6ff; color: #2563eb; border: 1px solid #93c5fd; }

.mb-power-block {
  text-align: right;
  flex-shrink: 0;
}
.mb-power {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
}
.mb-server {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* 반응형 */
@media (max-width: 768px) {
  .mb-guild-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .mb-guild-summary { grid-template-columns: repeat(2, 1fr); }
  .mb-avatar { width: 36px; height: 36px; }
  .mb-avatar .character-avatar { width: 36px; height: 36px; }
}

/* 길드 요약 카드 힌트 */
.mb-gs-hint {
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.mb-guild-summary-card:hover .mb-gs-hint { opacity: 1; }

/* 정렬 버튼 */
.mb-sort-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.sort-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.sort-btn:hover { border-color: var(--yellow-border); color: var(--amber); }
.sort-btn.is-active {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  color: var(--amber-dark);
  font-weight: 700;
}

/* 길드 그룹 묶음 */
.mb-group { margin-bottom: 16px; }
.mb-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--yellow-border);
}
.mb-group-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
}
.mb-group-power {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-left: auto;
}
.mb-group-list { display: grid; gap: 5px; }

/* 선택된 길드 요약 카드 강조 */
.mb-guild-active {
  border-color: var(--yellow) !important;
  border-width: 2px !important;
  box-shadow: 0 2px 12px rgba(245,158,11,0.2) !important;
  background: var(--yellow-bg) !important;
}
.mb-guild-active.mb-guild-full {
  border-color: #22c55e !important;
  box-shadow: 0 2px 12px rgba(34,197,94,0.15) !important;
}

/* 홈 Hero 두 번째 CTA (아웃라인) */
.cta-btn-outline {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  background: var(--white);
  color: var(--amber-dark);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--yellow-border);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.cta-btn-outline:hover {
  background: var(--yellow-bg);
  border-color: var(--yellow);
}

/* 길드 카드 가입 문의 버튼 */
.guild-board-inquiry {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amber-dark);
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
  transition: all 0.15s;
}
.guild-board-inquiry:hover {
  background: var(--yellow-pale);
  border-color: var(--yellow);
}



/* ===== 길드 라이벌전 v3 ===== */

/* 이번 주 승자 배너 */
.rv2-winner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid;
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  margin-bottom: 0;
}
.rv2-winner-crown {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
  display: block;
  margin-bottom: 4px;
}
.rv2-winner-name {
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rv2-winner-sub {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 3px;
}
.rv2-winner-right { font-size: 2.5rem; }
.rv2-us-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--yellow);
  color: var(--white);
  padding: 2px 7px;
  border-radius: 999px;
}

/* 결과판 */
.rv2-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.rv2-result-card {
  border: 1.5px solid;
  border-radius: var(--radius-xl);
  padding: 20px 14px 16px;
  text-align: center;
  position: relative;
  transition: transform 0.15s;
}
.rv2-result-card:hover { transform: translateY(-2px); }

/* 우리 길드 강조 */
.rv2-result-us {
  border-width: 2.5px !important;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.15), 0 8px 24px rgba(245,158,11,0.2) !important;
  transform: scale(1.02);
}
.rv2-result-us:hover { transform: scale(1.03) translateY(-2px); }
.rv2-us-crown {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--white);
  padding: 3px 12px;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
}
.rv2-result-medal { font-size: 2rem; margin-bottom: 4px; }
.rv2-result-guild { font-size: 1rem; font-weight: 800; margin: 4px 0 2px; }
.rv2-result-power {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
}
.rv2-result-sub { font-size: 0.68rem; color: var(--text-faint); margin-bottom: 10px; }
.rv2-result-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}
.rv2-rs-item { font-size: 0.78rem; color: var(--text-soft); }
.rv2-rs-winner { color: #059669 !important; font-weight: 700; }
.rv2-result-top1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
}

/* 항목별 메달 */
.rv2-medal-board {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.rv2-medal-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}
.rv2-medal-row:last-child { border-bottom: none; }
.rv2-medal-header { background: var(--bg); }
.rv2-medal-label { font-size: 0.82rem; font-weight: 600; color: var(--text-soft); padding: 10px 14px; }
.rv2-medal-guild {
  font-size: 0.82rem; font-weight: 700; text-align: center; padding: 10px 6px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.rv2-medal-guild img {
  display: inline !important;
  vertical-align: middle !important;
  margin: 0 !important;
}
.rv2-medal-cell {
  font-size: 0.82rem; text-align: center; padding: 10px 6px;
  border-left: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.rv2-medal-best { font-weight: 700; }

/* 전원 대전 */
.rv2-battle-grid { display: flex; flex-direction: column; gap: 3px; }
.rv2-member-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.rv2-header-row { margin-bottom: 4px; gap: 4px; }
.rv2-col-header {
  border: 1.5px solid;
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
}
.rv2-mini-bar-track { height: 5px; background: var(--border-light); border-radius: 999px; overflow: hidden; margin: 5px 0 3px; }
.rv2-mini-bar-fill { height: 100%; border-radius: 999px; }
.rv2-member-cell {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 8px;
  background: var(--white);
  border: 1px solid;
  border-radius: var(--radius-md);
  transition: background 0.1s;
}
.rv2-member-cell:hover { background: var(--bg); }
.rv2-empty-cell { background: var(--bg) !important; min-height: 50px; }
.rv2-member-rank { font-size: 0.75rem; font-weight: 700; width: 18px; flex-shrink: 0; text-align: center; }
.rv2-member-avatar { width: 36px; height: 36px; flex-shrink: 0; }
.rv2-member-avatar .character-avatar { width: 36px; height: 36px; }
.rv2-member-info { flex: 1; min-width: 0; }
.rv2-member-name { font-size: 0.8rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv2-member-meta { font-size: 0.68rem; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv2-member-power { font-size: 0.72rem; font-weight: 700; white-space: nowrap; }

/* 모바일 */
@media (max-width: 768px) {
  .rv2-result-grid { grid-template-columns: 1fr; gap: 8px; }
  .rv2-result-us { transform: none; }
  .rv2-medal-row { grid-template-columns: 1fr repeat(3, 0.9fr); }
}
@media (max-width: 600px) {
  .rv2-member-cell { padding: 5px 4px; gap: 4px; flex-direction: column; align-items: flex-start; }
  .rv2-member-rank { display: none; }
  .rv2-member-avatar { width: 30px; height: 30px; align-self: center; }
  .rv2-member-avatar .character-avatar { width: 30px; height: 30px; }
  .rv2-member-name { font-size: 0.72rem; }
  .rv2-member-meta { font-size: 0.62rem; }
  .rv2-member-power { font-size: 0.68rem; }
  .rv2-col-header { padding: 8px 4px; }
  .rv2-medal-label { padding: 8px 6px; font-size: 0.74rem; }
  .rv2-medal-cell { padding: 8px 4px; font-size: 0.74rem; }
  .rv2-medal-guild { padding: 8px 4px; font-size: 0.74rem; }
}

/* 길드 카드 성향 설명 */
.guild-board-desc {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  margin: 6px 0 4px;
  line-height: 1.4;
}

/* ===== 컷라인 경쟁 로그 ===== */
.cutline-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cl-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--white);
  transition: background 0.1s;
}
.cl-row:hover { background: var(--bg); }
.cl-safe { border-color: var(--border-light); }
.cl-danger {
  background: #fffbeb !important;
  border-color: #fde68a !important;
}
.cl-challenge {
  background: #fff5f5 !important;
  border-color: #fecaca !important;
}
.cl-cut-row {
  border-width: 2px !important;
  border-color: var(--yellow) !important;
  background: var(--yellow-bg) !important;
  box-shadow: 0 2px 8px rgba(245,158,11,0.15);
}
.cl-cutline-bar {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-faint);
  padding: 4px 0;
  font-weight: 600;
}
.cl-cutline-below { color: #dc2626 !important; }
.cl-rank {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-soft);
  text-align: center;
}
.cl-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-guild { flex-shrink: 0; }
.cl-power {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
}
.cl-trend { font-size: 0.82rem; font-weight: 700; min-width: 36px; text-align: center; }
.cl-up { color: #059669; }
.cl-down { color: #dc2626; }
.cl-flat { color: var(--text-faint); }
.cl-dist { font-size: 0.75rem; font-weight: 600; white-space: nowrap; min-width: 60px; text-align: right; }
.cl-dist-safe { color: #059669; }
.cl-dist-danger { color: #dc2626; }

/* ===== 성장왕 그리드 ===== */
.growth-king-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gk-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: transform 0.15s;
}
.gk-card:hover { transform: translateY(-2px); }
.gk-first {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  border-width: 2px;
  box-shadow: 0 4px 16px rgba(245,158,11,0.15);
}
.gk-medal { font-size: 1.8rem; margin-bottom: 6px; }
.gk-name { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.gk-guild { margin-bottom: 8px; }
.gk-growth { font-size: 1.1rem; font-weight: 900; color: var(--amber); }
.gk-rate { font-size: 0.75rem; color: var(--text-soft); margin-top: 2px; }

@media (max-width: 600px) {
  .cl-row { grid-template-columns: 28px 1fr auto auto; gap: 6px; }
  .cl-guild { display: none; }
  .cl-dist { display: none; }
  .growth-king-grid { grid-template-columns: 1fr; }
}

/* 컷라인 레이블 */
.cl-cut-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--amber-dark);
  background: var(--yellow);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 활동 로그 */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.activity-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: background 0.1s;
}
.activity-row:hover { background: var(--bg); }
.activity-special {
  background: var(--yellow-bg) !important;
  border-color: var(--yellow-border) !important;
  border-width: 1.5px !important;
}
.activity-icon { font-size: 1rem; text-align: center; }
.activity-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.activity-guild { flex-shrink: 0; }
.activity-desc { font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.activity-up { color: #059669; }
.activity-down { color: #dc2626; }
.activity-rank { font-size: 0.75rem; color: var(--text-faint); white-space: nowrap; }
.activity-empty { text-align: center; padding: 20px; color: var(--text-faint); font-size: 0.85rem; }

@media (max-width: 600px) {
  .activity-row { grid-template-columns: 20px 1fr auto auto; gap: 6px; }
  .activity-guild { display: none; }
}