@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block');

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  width: 1em;
  height: 1em;
  overflow: hidden;
  flex-shrink: 0;
}

/* Prevent flash of unstyled theme */
body { opacity: 0; }
body.theme-ready { opacity: 1; transition: opacity 0.15s ease; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* CSS Variables */
:root {
  --primary-blue: #1E5AA8;
  --primary-teal: #00AFAE;
  --gradient-primary: linear-gradient(135deg, #1E5AA8 0%, #00AFAE 100%);
  --primary-light-blue: rgba(30, 90, 168, 0.06);

  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;

  --bg-page: #ffffff;
  --bg-card: #fafafa;
  --bg-section: #eef3fb;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;
  --border: #e4e4e7;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  --transition-base: 200ms ease;
  --navbar-height: 72px;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-blue: #4A7FC8;
  --primary-teal: #20CFCE;
  --gradient-primary: linear-gradient(135deg, #4A7FC8 0%, #20CFCE 100%);
  --primary-light-blue: rgba(74, 127, 200, 0.08);

  --bg-page: #18181b;
  --bg-card: #27272a;
  --bg-section: #27272a;
  --text-primary: #fafafa;
  --text-secondary: #d4d4d8;
  --text-tertiary: #a1a1aa;
  --border: #3f3f46;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -1px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -2px rgba(0,0,0,.4);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.6), 0 10px 10px -5px rgba(0,0,0,.5);
}

/* Base */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1002;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

[data-theme="dark"] .navbar { background: rgba(24,24,27,.8); }

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-wordmark { height: 44px; width: auto; display: block; }

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: block; }

.nav-logo-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 2px 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: center;
}

[data-theme="dark"] .nav-logo-badge { background: var(--bg-card); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: 1rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color var(--transition-base);
}

@media (hover: hover) and (pointer: fine) { .nav-link:hover { color: var(--primary-blue); } }

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

/* Theme toggle + mobile menu */
.theme-toggle,
.mobile-menu-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.06);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover,
  .mobile-menu-toggle:hover { background: rgba(0,0,0,.1); }
}

.theme-toggle:active,
.mobile-menu-toggle:active { opacity: 0.7; }

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .mobile-menu-toggle { background: rgba(0,0,0,.25); }

@media (hover: hover) and (pointer: fine) {
  [data-theme="dark"] .theme-toggle:hover,
  [data-theme="dark"] .mobile-menu-toggle:hover { background: rgba(0,0,0,.4); }
}

.theme-toggle .material-symbols-rounded { font-size: 20px; color: var(--text-primary); }

.theme-icon {
  position: absolute;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.theme-icon.hidden {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

.mobile-menu-toggle { display: none; }
.mobile-menu-toggle .material-symbols-rounded {
  font-size: 20px;
  color: var(--text-primary);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.mobile-menu-toggle.is-open .material-symbols-rounded { transform: rotate(90deg); }

@keyframes iconSwapOut {
  from { opacity: 1; transform: rotate(0deg) scale(1); }
  to   { opacity: 0; transform: rotate(-90deg) scale(0.6); }
}

@keyframes iconSwapIn {
  from { opacity: 0; transform: rotate(90deg) scale(0.6); }
  to   { opacity: 1; transform: rotate(0deg) scale(1); }
}

.mobile-menu-toggle .material-symbols-rounded.swap-out { animation: iconSwapOut 0.18s ease forwards; }
.mobile-menu-toggle .material-symbols-rounded.swap-in  { animation: iconSwapIn  0.18s ease forwards; }

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1001;
  pointer-events: none;
}

.mobile-drawer.open { display: block; pointer-events: all; }

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  animation: drawerFadeIn 0.22s ease forwards;
}

.drawer-sheet {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  padding: 72px 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-xl);
  animation: drawerDropIn 0.28s cubic-bezier(0.05,0.7,0.1,1) forwards;
}

[data-theme="dark"] .drawer-sheet { background: rgba(24,24,27,.85); }

@keyframes drawerFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes drawerDropIn  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drawerDropOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-12px); } }

.mobile-drawer.closing .drawer-scrim { animation: drawerFadeOut 0.22s ease forwards; }
.mobile-drawer.closing .drawer-sheet { animation: drawerDropOut 0.22s ease forwards; }

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 1rem;
  margin: 0 0.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition-base), color var(--transition-base);
}

.drawer-link .material-symbols-rounded { font-size: 22px; color: var(--text-tertiary); }
@media (hover: hover) and (pointer: fine) { .drawer-link:hover { background: var(--gray-100); color: var(--text-primary); } }
.drawer-link:active { background: var(--gray-200); color: var(--text-primary); }
[data-theme="dark"] .drawer-link:active { background: #3f3f46; }
@media (hover: hover) and (pointer: fine) { [data-theme="dark"] .drawer-link:hover { background: #27272a; color: var(--text-primary); } }

.drawer-divider { height: 1px; background: var(--border); border: none; margin: 0.25rem 1rem; }

/* Hero */
.hero {
  position: relative;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #1E5AA8 0%, transparent 70%);
  top: -150px;
  left: -100px;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #00AFAE 0%, transparent 70%);
  bottom: -100px;
  right: -80px;
  opacity: 0.25;
}

[data-theme="dark"] .hero-orb-1 { opacity: 0.2; }
[data-theme="dark"] .hero-orb-2 { opacity: 0.15; }

.hero-container {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-blue);
  background: var(--primary-light-blue);
  border: 1px solid rgba(30, 90, 168, 0.15);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-eyebrow { border-color: rgba(74,127,200,.25); }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.hero-stat { text-align: center; }

.hero-stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,90,168,.3);
}

@media (hover: hover) { .btn-primary:hover { box-shadow: 0 8px 24px rgba(30,90,168,.4); transform: translateY(-1px); } }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 1.5px solid var(--primary-blue);
}

@media (hover: hover) { .btn-outline:hover { background: var(--primary-light-blue); } }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 3rem; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* Shared card base */
.card,
.bundle-card,
.app-card,
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
  .bundle-card:hover,
  .app-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

  .step-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
  }
}

/* How to Add */
.how-to-add {
  padding: 5rem 0;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .how-to-add { background: var(--bg-card); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.step-card {
  position: relative;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  background: var(--bg-page);
}

.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light-blue);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary-blue);
}

.step-icon .material-symbols-rounded { font-size: 26px; }

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-card p a {
  color: var(--primary-blue);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .step-card p a:hover { text-decoration: underline; }
}

.expert-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(30,90,168,.06);
  border: 1px solid rgba(30,90,168,.15);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.expert-note .material-symbols-rounded { color: var(--primary-blue); flex-shrink: 0; margin-top: 1px; }

/* Bundles Section */
.bundles-section { padding: 5rem 0; }

/* Search + View Tabs */
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-filter-bar .search-box { flex: 1; min-width: 0; }
.search-filter-bar .view-tab { flex: 1; justify-content: center; }

.search-box {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 2.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30,90,168,.1);
}

[data-theme="dark"] .search-input { background: var(--bg-card); }

.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.search-clear.visible { opacity: 1; pointer-events: auto; }

/* View Tabs */
.view-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.25rem;
  flex-shrink: 0;
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: calc(var(--radius-xl) - 2px);
  background: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.view-tab .material-symbols-rounded { font-size: 18px; }
.view-tab:hover { color: var(--text-primary); }

.view-tab.active {
  background: var(--bg-page);
  color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .view-tab.active { background: var(--gray-700); }

/* Grids */
.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.bundles-grid.hidden,
.apps-grid.hidden { display: none; }

/* Cards - shared base */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.bundle-card,
.app-card {
  cursor: pointer;
  animation: cardIn 0.35s ease both;
}

.bundle-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.app-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Skeleton */
.bundle-card.skeleton {
  pointer-events: none;
  animation: pulse 1.5s ease-in-out infinite;
}

.bundle-card.skeleton::before {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--gray-200);
  margin-bottom: 0.75rem;
}

.bundle-card.skeleton::after {
  content: '';
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--gray-200);
  width: 60%;
}

[data-theme="dark"] .bundle-card.skeleton::before,
[data-theme="dark"] .bundle-card.skeleton::after { background: var(--gray-700); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Bundle Card */
.bundle-card-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.bundle-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--gray-100);
}

[data-theme="dark"] .bundle-avatar { border-color: var(--gray-700); }

.bundle-card-meta { flex: 1; min-width: 0; }

.bundle-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bundle-name-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.bundle-author {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.bundle-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--primary-blue);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.15s;
  margin-top: 0.2rem;
}

@media (hover: hover) { .bundle-repo-link:hover { opacity: 1; } }

.bundle-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card .bundle-desc {
  -webkit-line-clamp: 3;
}

.bundle-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

.bundle-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

/* Pills */
.pill,
.app-stat-pill,
.modal-stat-pill {
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
  color: var(--primary-blue);
  background: var(--primary-light-blue);
}

.pill {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  background: var(--primary-light-blue);
  color: var(--primary-blue);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-count {
  background: var(--gray-100);
  color: var(--text-tertiary);
}

[data-theme="dark"] .pill-count { background: var(--gray-700); }

.pill-pre-release {
  background: #f59e0b;
  color: #fff;
}

[data-theme="dark"] .pill-pre-release {
  background: #d97706;
}

.app-stat-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
}

.app-stat-pill.secondary {
  color: var(--text-secondary);
  background: var(--gray-100);
}

[data-theme="dark"] .app-stat-pill.secondary { background: var(--gray-700); }

.modal-stat-pill {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
}

.bundle-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-add-morphe {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}

@media (hover: hover) { .btn-add-morphe:hover { opacity: 0.9; transform: scale(1.02); } }

/* App Card */
.app-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.2s ease;
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-card-icon-fallback {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--bg-section);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.app-card-top .bundle-avatar {
  width: 56px;
  height: 56px;
}

.app-card-title {
  flex: 1;
  min-width: 0;
}

.app-card-desc {
  -webkit-line-clamp: 2;
  margin-top: 0.2rem;
  font-size: 0.8rem;
}

.app-total-pill {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

/* Patch preview block */
.app-patch-preview {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.7rem 0.875rem;
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

[data-theme="dark"] .app-patch-preview { background: rgba(255,255,255,.03); }

.app-patch-preview-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.app-patch-preview-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-patch-preview-more {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding-left: 1.5rem;
  font-weight: 500;
}

/* Bundle rows inside app card */
.app-bundles-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
}

.app-bundle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-page);
  transition: border-color var(--transition-base);
}

[data-theme="dark"] .app-bundle-row { background: rgba(255,255,255,.03); }

.app-bundle-row-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.app-bundle-row-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.app-bundle-row-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bundle-row-count {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.app-bundle-row-more {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: center;
  padding: 0.3rem 0;
}

.btn-add-morphe-sm {
  padding: 0.28rem 0.6rem;
  font-size: 0.72rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.app-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.app-bundle-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  text-decoration: none;
  transition: border-color var(--transition-base), color var(--transition-base);
}

@media (hover: hover) and (pointer: fine) {
  a.app-bundle-chip:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
  }
}

.app-bundle-chip img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-tertiary);
}

.no-results .material-symbols-rounded { font-size: 48px; display: block; margin-bottom: 1rem; }
.no-results.hidden { display: none; }

/* Shared scrollbar mixin applied to modal-body and changelog-content */
.modal-body,
.changelog-content {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.modal-body::-webkit-scrollbar,
.changelog-content::-webkit-scrollbar { width: 6px; }

.modal-body::-webkit-scrollbar-track,
.changelog-content::-webkit-scrollbar-track { background: transparent; }

.modal-body::-webkit-scrollbar-thumb,
.changelog-content::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 9999px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.changelog-content::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

[data-theme="dark"] .modal-body,
[data-theme="dark"] .changelog-content { scrollbar-color: var(--gray-600) transparent; }

[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb,
[data-theme="dark"] .changelog-content::-webkit-scrollbar-thumb { background: var(--gray-600); }

[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .changelog-content::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* Shared backdrop for modal and changelog */
.modal-backdrop,
.changelog-popover {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: backdropIn 0.2s ease;
}

@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

.changelog-popover { z-index: 3000; }

@media (max-width: 639px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
}

/* Shared panel for modal and changelog */
.modal,
.changelog-popover-inner {
  background: var(--bg-page);
  border-radius: var(--radius-2xl);
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.modal {
  max-width: 680px;
  max-height: 90vh;
  animation: modalIn 0.25s cubic-bezier(.34,1.56,.64,1);
}

.changelog-popover-inner {
  max-width: 600px;
  max-height: 80vh;
  animation: modalIn 0.2s ease;
}

@media (max-width: 639px) {
  .modal {
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    max-height: 85vh;
  }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shared panel header */
.modal-header,
.changelog-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header {
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1;
  min-width: 0;
}

.modal-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

#modal-avatar-fallback.modal-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
}

.modal-bundle-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-author {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.modal-header-add { display: none; }

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Icon button (close, etc.) */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.icon-btn .material-symbols-rounded { font-size: 18px; }

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    border-color: var(--text-tertiary);
    color: var(--text-primary);
    background: var(--gray-100);
  }
}

[data-theme="dark"] .icon-btn:hover { background: rgba(255,255,255,.06); }

/* Modal body */
.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-search-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-search-box { flex: 1; }
.modal-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Patches List */
.patches-list { display: flex; flex-direction: column; gap: 1.5rem; }
.patches-list > div { display: flex; flex-direction: column; gap: 0.5rem; }

.patch-group-header {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.patch-item {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .patch-item:hover { border-color: var(--primary-blue); background: var(--primary-light-blue); }
}

.patch-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.patch-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.patch-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.patch-version-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-teal);
  background: rgba(0,175,174,.1);
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.patch-version-badge.any {
  color: var(--text-tertiary);
  background: var(--gray-100);
}

[data-theme="dark"] .patch-version-badge.any { background: var(--gray-700); }

.patch-options {
  margin-top: 0.75rem;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  animation: optionsIn 0.2s ease;
}

.patch-item.expanded .patch-options { display: flex; }

@keyframes optionsIn { from { opacity: 0; } to { opacity: 1; } }

.patch-option {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.1rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.6rem;
  background: var(--bg-page);
  border-radius: var(--radius-md);
}

[data-theme="dark"] .patch-option { background: rgba(255,255,255,.03); }

.patch-option-name {
  font-weight: 600;
  color: var(--text-primary);
  grid-column: 1;
  grid-row: 1;
}

.patch-option-value {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
  grid-column: 1;
  grid-row: 2;
}

.patch-option-default {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-teal);
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  text-align: right;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.expand-icon {
  transition: transform 0.2s;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.patch-item.expanded .expand-icon { transform: rotate(180deg); }

.no-patches-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* App modal - bundle group headers */
.app-modal-bundle-group { margin-bottom: 1.25rem; }

.app-modal-bundle-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.app-modal-bundle-header img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Changelog button on bundle card */
.btn-changelog {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (hover: hover) {
  .btn-changelog:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--primary-light-blue);
  }
}

/* Changelog content */
.changelog-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.cl-h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.25rem 0 0.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.cl-h1:first-child { margin-top: 0; }
.cl-h1 a { color: var(--primary-blue); text-decoration: none; }

.cl-h2 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1rem 0 0.25rem;
}

.cl-h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.75rem 0 0.35rem;
}

.cl-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cl-list li {
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  border-left: 2px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.cl-list li strong { color: var(--text-primary); font-weight: 600; }

.cl-list li code {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  background: var(--gray-100);
  color: var(--primary-teal);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .cl-list li code { background: var(--gray-800); }

.cl-list li a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.78rem;
}

.cl-p { margin: 0.25rem 0; }
.cl-spacer { height: 0.5rem; }
.cl-hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

.changelog-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.cl-full-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--primary-light-blue);
  transition: all 0.15s ease;
}

@media (hover: hover) {
  .cl-full-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
  }
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 0 2rem;
}

[data-theme="dark"] .footer { background: #0f1015; }

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.footer-logo { width: 36px; height: 36px; flex-shrink: 0; }

.footer-brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.footer-tagline { font-size: 0.85rem; color: var(--gray-500); }

@media (hover: hover) { .footer-link:hover { color: var(--gray-100); } }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.analytics-details {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-top: 0.75rem;
}

.analytics-details summary {
  cursor: pointer;
  color: var(--gray-600);
  user-select: none;
  list-style: none;
  transition: color var(--transition-base);
}

.analytics-details summary::-webkit-details-marker { display: none; }

@media (hover: hover) and (pointer: fine) {
  .analytics-details summary:hover { color: var(--gray-400); }
}

.analytics-details[open] { line-height: 1.6; }

.analytics-details .inline-link { color: var(--primary-blue); text-decoration: none; }
.analytics-details .inline-link:hover { text-decoration: underline; }

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.scroll-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Responsive - 768px */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-toggle { display: flex; }
  .nav-actions { gap: 0.375rem; }
  .theme-toggle { order: 1; }
  .mobile-menu-toggle { order: 2; }

  .hero { padding: 5rem 1.25rem 3.5rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat-num { font-size: 1.4rem; }

  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .how-to-add { padding: 3.5rem 0; }
  .bundles-section { padding: 3.5rem 0; }

  .bundles-grid { grid-template-columns: 1fr; }

  .modal-header { flex-wrap: wrap; gap: 0.75rem; }
  .modal-title-row { flex: 1; min-width: 0; }
  .modal-header-add { display: flex; flex: 1 1 100%; order: 3; }
  .modal-header-add .btn { flex: 1; justify-content: center; }
  .modal-header-actions { order: 2; flex-shrink: 0; }
  .modal-add-btn-desktop { display: none; }

  .app-modal-bundle-header .btn-add-morphe {
    flex: 1 1 100%;
    justify-content: center;
    margin-left: 0 !important;
  }

  .footer-inner { flex-direction: column; }
  .scroll-to-top { bottom: 1.25rem; right: 1.25rem; }
}

/* Responsive - 480px */
@media (max-width: 480px) {
  .hero-stats { flex-wrap: wrap; }
  .hero-stat-divider { display: none; }
  .search-filter-bar { flex-wrap: wrap; }
  .search-filter-bar .search-box { flex: unset; width: 100%; }
  .search-filter-bar .view-tabs { flex: unset; width: 100%; min-width: 0; }
  .search-filter-bar .view-tab { flex: 1; justify-content: center; }
  .steps-grid { grid-template-columns: 1fr; }
}

/* Contact modal form */
.contact-form-group {
  margin-bottom: 0.75rem;
}

.contact-form-label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.contact-form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  box-sizing: border-box;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.contact-form-input:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px var(--primary-light-blue);
}

.contact-form-textarea {
  min-height: 90px;
  resize: vertical;
}

.contact-status {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  text-align: center;
}

.contact-status.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.contact-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

[data-theme="dark"] .contact-status.success {
  background: #064e3b;
  color: #34d399;
  border-color: #065f46;
}

[data-theme="dark"] .contact-status.error {
  background: #7f1d1d;
  color: #f87171;
  border-color: #991b1b;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer contact button */

.footer-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem 0.45rem 0.75rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--gray-400);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.footer-contact-btn .material-symbols-rounded {
  font-size: 16px;
  width: 16px;
  height: 16px;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .footer-contact-btn:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.22);
    color: var(--gray-200);
  }
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-row p { margin: 0; }

#contact-modal .modal-body {
  gap: 0;
  padding: 1rem 1.5rem 1.25rem;
}

#whats-new-modal .modal-body {
  gap: 0;
  padding: 0.75rem 1.5rem 1.25rem;
}

/* Captcha widget wrapper */
.captcha-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

@media (max-width: 360px) {
  .captcha-wrapper {
    transform-origin: left center;
    transform: scale(0.85);
    margin-right: auto;
  }
}

/* What's New button (nav + drawer) */
.nav-link-btn,
.drawer-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: inherit;
  color: inherit;
}

.drawer-link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 1rem;
  margin: 0 0.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  width: calc(100% - 1rem);
  text-align: left;
  transition: background var(--transition-base), color var(--transition-base);
}

.drawer-link-btn .material-symbols-rounded { font-size: 22px; color: var(--text-tertiary); }
@media (hover: hover) and (pointer: fine) { .drawer-link-btn:hover { background: var(--gray-100); color: var(--text-primary); } }
.drawer-link-btn:active { background: var(--gray-200); color: var(--text-primary); }
[data-theme="dark"] .drawer-link-btn:active { background: #3f3f46; color: var(--text-primary); }
@media (hover: hover) and (pointer: fine) { [data-theme="dark"] .drawer-link-btn:hover { background: #27272a; color: var(--text-primary); } }

/* What's New modal */
.whats-new-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--text-tertiary);
}

.whats-new-loading .material-symbols-rounded {
  font-size: 36px;
  opacity: 0.4;
}

.whats-new-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  color: var(--text-tertiary);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
}

.whats-new-empty .material-symbols-rounded {
  font-size: 36px;
  opacity: 0.35;
}

.wn-entry {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.wn-entry:first-child {
  padding-top: 0;
}

.wn-entry:last-child {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.wn-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 0.3rem;
}

.wn-sections-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wn-section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  padding: 0.85rem 1rem;
}

.wn-section-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.wn-section-label .material-symbols-rounded {
  font-size: 14px;
}

.wn-group {
  margin-bottom: 0.5rem;
}

.wn-group:last-child { margin-bottom: 0; }

.wn-group-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 0.3rem;
}

.wn-app-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wn-app-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem 0.22rem 0.3rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .wn-app-item {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="light"] .wn-app-item {
  background: #fff;
  border-color: var(--border-color);
}

.wn-app-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.wn-patch-app {
  margin-bottom: 0.45rem;
}

.wn-patch-app:last-child { margin-bottom: 0; }

.wn-patch-app-name {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.wn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.wn-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .wn-chip {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="light"] .wn-chip {
  background: #fff;
}

.wn-chip-bundle {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] .wn-chip-bundle {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="light"] .wn-chip-bundle {
  background: #fff;
}
