@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Pretendard:wght@400;500;600;700;800&display=swap');

:root {
  /* Haruism GDD Design System */
  --bg-primary: #0F172A;       /* Deep Slate / Dark Mode Base */
  --bg-secondary: #1E293B;     /* Elevated Panel / Cards */
  --bg-card: #1E293B;
  --bg-card-hover: #273549;
  --primary-accent: #6366F1;   /* Indigo Blue */
  --primary-hover: #4F46E5;
  --secondary-accent: #06B6D4; /* Cyan Accent */
  --highlight: #10B981;        /* Emerald Accent */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --border-color: rgba(148, 163, 184, 0.15);
  --border-focus: rgba(99, 102, 241, 0.5);
  --accent-glow: rgba(99, 102, 241, 0.25);
  --cyan-glow: rgba(6, 182, 212, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header & Nav */
.header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.8rem 1.5rem;
  transition: var(--transition);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.nav-link.active {
  color: var(--primary-accent);
  background: rgba(99, 102, 241, 0.1);
}

.menu-toggle-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition-fast);
  font-family: inherit;
}

.menu-toggle-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: rgba(99, 102, 241, 0.12);
}

/* ==========================================================================
   Header Dropdown Menu Bar (At-a-Glance Navigation)
   ========================================================================== */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-fast);
  font-family: inherit;
}

.nav-dropdown-btn .dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.nav-dropdown:hover .nav-dropdown-btn,
.nav-dropdown.active .nav-dropdown-btn {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: rgba(148, 163, 184, 0.2);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 320px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.15);
  padding: 0.5rem;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Hover or active show */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.subpage-quick-dropdown .nav-dropdown-menu {
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) !important;
}

.subpage-quick-dropdown:hover .nav-dropdown-menu,
.subpage-quick-dropdown.open .nav-dropdown-menu {
  transform: translateY(0) !important;
}

.nav-dropdown-header {
  padding: 0.4rem 0.6rem 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  margin-bottom: 0.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.nav-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateX(2px);
}

.nav-dropdown-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.nav-dropdown-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-dropdown-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-dropdown-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}

@media (max-width: 820px) {
  .nav-dropdown {
    display: none; /* Hide heavy dropdowns on mobile */
  }
  .header {
    padding: 0.65rem 1rem; /* Keep compact */
  }
  .header-container {
    gap: 0.5rem;
  }
  .header-nav {
    gap: 0.4rem;
  }
  /* 모바일 헤더 사이트맵 링크 숨김 (전체 메뉴와 중복 제거) */
  .header-nav a[href*="sitemap"],
  .header-nav .nav-link[href*="sitemap"] {
    display: none !important;
  }
  .nav-link {
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .menu-toggle-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .logo-sub {
    display: none; /* 모바일 헤더 공간 확보를 위해 HARUISM 영문 뱃지 숨김 */
  }
  .header {
    padding: 0.55rem 0.75rem 0;
  }
  .header-container {
    padding-bottom: 0.35rem;
  }
  .nav-link {
    font-size: 0.78rem;
    padding: 0.3rem 0.45rem;
  }
  .menu-toggle-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }
}

/* ==========================================================================
   Global Quick Drawer (All Services at a Glance)
   ========================================================================== */
.global-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.global-drawer-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.global-drawer {
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: #0F172A;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.global-drawer-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #F8FAFC;
}

.drawer-brand strong {
  color: var(--primary-accent);
}

.drawer-close-btn {
  background: rgba(148, 163, 184, 0.1);
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: var(--danger-accent);
  color: white;
}

.global-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.drawer-group-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.drawer-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.drawer-item-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.drawer-item-link:hover {
  border-color: var(--primary-accent);
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

.drawer-item-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.drawer-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #F8FAFC;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.drawer-item-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 2px;
}

.drawer-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.policy-chip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.policy-chip:hover {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
}

.global-drawer-footer {
  padding: 0.8rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo span {
  background: linear-gradient(135deg, #F8FAFC 30%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-accent) !important;
  -webkit-text-fill-color: var(--secondary-accent) !important;
  background: none !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.1) !important;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.header-badge {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary-accent);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, #FFFFFF 20%, #C7D2FE 60%, #67E8F9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Controls: Search & Filters */
.controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3rem;
  align-items: center;
}

.search-box {
  width: 100%;
  max-width: 520px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.filter-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: rgba(148, 163, 184, 0.3);
}

.filter-btn.active {
  background: var(--primary-accent);
  color: #ffffff;
  border-color: var(--primary-accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* App Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
  opacity: 0;
  transition: var(--transition);
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.45), 0 0 18px var(--accent-glow);
  background: var(--bg-card-hover);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.app-card-icon {
  font-size: 1.55rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.app-card:hover .app-card-icon {
  transform: scale(1.15) rotate(4deg);
}

.app-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.app-card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 1rem;
}

.app-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-game {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-utility {
  background: rgba(6, 182, 212, 0.15);
  color: #67E8F9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-toy {
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-secondary);
}

/* Subpage Navigation Bar */
.subpage-nav {
  padding: 0.9rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-sizing: border-box;
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.back-link:hover {
  color: var(--text-primary);
}

.subpage-nav-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.subpage-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  justify-content: flex-end;
}

.nav-pill-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-pill-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary-accent);
  background: rgba(99, 102, 241, 0.1);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  background: rgba(15, 23, 42, 0.6);
}

@media (max-width: 640px) {
  .header {
    padding: 0.8rem 1rem;
  }
  .header-container {
    gap: 0.5rem;
  }
  .logo {
    font-size: 1.15rem;
    gap: 0.4rem;
  }
  .logo-sub {
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
  }
  .header-badge {
    display: none;
  }
  .container {
    padding: 1.75rem 0.85rem 3rem;
  }
  .hero {
    margin-bottom: 2rem;
  }
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.8rem;
  }
  .hero h1 {
    font-size: clamp(1.4rem, 6.2vw, 1.95rem);
    letter-spacing: -0.02em;
    word-break: keep-all;
    line-height: 1.3;
  }
  .hero p {
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: keep-all;
  }
  .controls {
    margin-bottom: 2rem;
    gap: 1rem;
    width: 100%;
  }
  .search-box {
    width: 100%;
  }
  .search-input {
    min-height: 44px;
    font-size: 0.92rem;
    padding: 0.75rem 1rem;
  }
  .filter-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.2rem 0.1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.5rem;
  }
  .filter-tabs::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.1rem;
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .app-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .app-card {
    padding: 1.25rem;
  }
  .app-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  .app-card-title {
    font-size: 1.15rem;
  }
  .app-card-desc {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }
  .subpage-nav {
    padding: 0.55rem 0.75rem;
    min-height: 48px;
    gap: 0.35rem;
    grid-template-columns: auto 1fr auto;
  }
  .back-link {
    font-size: 0;
    gap: 0;
    padding: 0.35rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-height: 34px;
    box-sizing: border-box;
  }
  .back-link::before {
    content: "← 홈";
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .back-link:hover::before {
    color: var(--text-primary);
  }
  .subpage-nav-title {
    font-size: 0.88rem;
    max-width: 100%;
    padding: 0 0.25rem;
    text-align: center;
    justify-content: center;
    font-weight: 600;
  }
  .subpage-nav-actions {
    gap: 0.3rem;
  }
  /* 모바일 네비 바 여백 확보: 사이트맵 링크 숨김 (전체 메뉴 드로어와 중복 제거) */
  .subpage-nav-actions a[href*="sitemap"] {
    display: none !important;
  }
  /* 모바일 네비 바 여백 확보: ⚡ 바로가기 드롭다운 숨김 (사이드 드로어 메뉴에 상주) */
  .subpage-quick-dropdown {
    display: none !important;
  }
  .subpage-nav-actions .menu-toggle-btn {
    padding: 0.35rem 0.65rem;
    min-height: 34px;
    font-size: 0.82rem;
    box-sizing: border-box;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .header {
    padding: 0.75rem 0.75rem;
  }
  .logo {
    font-size: 1.05rem;
  }
  .container {
    padding: 1.5rem 0.75rem 2.5rem;
  }
  .hero h1 {
    font-size: clamp(1.25rem, 5.8vw, 1.55rem);
  }
  .subpage-nav {
    padding: 0.45rem 0.5rem;
  }
  .subpage-nav-actions a[href*="sitemap"] {
    display: none !important;
  }
  .subpage-nav-title {
    font-size: 0.84rem;
  }
}


/* ==========================================================================
   AdSense & Ad Layout Slot Containers (CLS Prevention)
   ========================================================================== */
.ad-slot-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.75rem auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Ad Label */
.ad-slot-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  display: block;
  user-select: none;
}

/* Ad Frame with Shimmer Skeleton to Reserve Dimensions and Prevent CLS */
.ad-slot-frame {
  width: 100%;
  max-width: 970px;
  min-height: 100px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: min-height 0.2s ease, border-color 0.2s ease;
}

/* Common Standard Ad Slot Sizes */
.ad-slot-banner .ad-slot-frame {
  min-height: 100px; /* Leaderboard & mobile responsive */
}

.ad-slot-rectangle .ad-slot-frame {
  max-width: 336px;
  min-height: 280px; /* Medium/Large Rectangle */
}

.ad-slot-infeed .ad-slot-frame {
  min-height: 140px;
}

/* Skeleton Shimmer Wave */
.ad-slot-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  animation: ad-shimmer 2.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes ad-shimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(300%); }
}

/* Hide skeleton styling once AdSense script injects real iframe */
.ad-slot-frame ins.adsbygoogle[data-ad-status="filled"] {
  background: transparent;
}
