/**
 * Artmatter Instant Live Search Styles
 * Luxury Dark Glassmorphism with #a9ff5d Neon Accents & Fluid Animations
 */

/* 1. Trigger Search Bar & Trigger Button */
.artmatter-search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #a1a1aa;
  font-family: inherit;
  font-size: 13px;
  user-select: none;
  max-width: 320px;
  width: 100%;
}
.artmatter-search-bar-wrap:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.artmatter-search-bar-wrap .artmatter-search-icon {
  flex-shrink: 0;
  stroke: #71717a;
  transition: stroke 0.2s;
}
.artmatter-search-bar-wrap:hover .artmatter-search-icon {
  stroke: #a9ff5d;
}
.artmatter-search-bar-wrap .artmatter-search-placeholder {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artmatter-search-kbd-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.artmatter-search-kbd-badge kbd,
.artmatter-close-kbd,
.artmatter-footer-hint kbd {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #a1a1aa;
  line-height: 1.2;
}

.artmatter-search-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  color: #e4e4e7;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.artmatter-search-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(169, 255, 93, 0.4);
  color: #a9ff5d;
}
.artmatter-search-trigger-btn .artmatter-search-icon {
  flex-shrink: 0;
}

/* 2. Modal Overlay & Dialog */
.artmatter-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 50px 16px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.artmatter-search-modal * {
  box-sizing: border-box;
}
.artmatter-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.artmatter-search-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 4, 4, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.artmatter-search-modal.is-open .artmatter-search-backdrop {
  opacity: 1;
}

.artmatter-search-dialog {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 84vh;
  background: #0d0d10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.artmatter-search-modal.is-open .artmatter-search-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 3. Header Input */
.artmatter-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #121216;
}
.artmatter-search-input-icon {
  flex-shrink: 0;
  stroke: #a9ff5d;
}
.artmatter-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #ffffff;
  font-family: inherit;
  line-height: 1.4;
  padding: 0;
}
.artmatter-search-input::placeholder {
  color: #71717a;
}
.artmatter-search-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.artmatter-search-clear,
.artmatter-search-close-btn {
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  color: #71717a;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.artmatter-search-clear:hover,
.artmatter-search-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.artmatter-close-icon {
  display: none;
}

/* 4. Filter Tabs */
.artmatter-search-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #0d0d10;
  overflow-x: auto;
  scrollbar-width: none;
}
.artmatter-search-tabs::-webkit-scrollbar {
  display: none;
}
.artmatter-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 3.5px 9px;
  font-size: 11.5px;
  font-weight: 500;
  color: #a1a1aa;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.artmatter-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
.artmatter-tab-btn.active {
  background: rgba(169, 255, 93, 0.1);
  border-color: rgba(169, 255, 93, 0.25);
  color: #a9ff5d;
}
.artmatter-tab-count {
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5px 4.5px;
  border-radius: 8px;
  color: #d4d4d8;
}
.artmatter-tab-btn.active .artmatter-tab-count {
  background: rgba(169, 255, 93, 0.25);
  color: #a9ff5d;
}

/* 5. Results Body */
.artmatter-search-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.artmatter-search-body::-webkit-scrollbar {
  width: 5px;
}
.artmatter-search-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Section Header */
.artmatter-result-group {
  margin-bottom: 14px;
}
.artmatter-result-group:last-child {
  margin-bottom: 2px;
}
.artmatter-group-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: #71717a;
  padding: 4px 6px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Result Items */
.artmatter-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.12s ease-out;
  cursor: pointer;
  border: 1px solid transparent;
  animation: artmatterItemIn 0.18s ease-out both;
}
@keyframes artmatterItemIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.artmatter-search-item:hover,
.artmatter-search-item.is-selected {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
.artmatter-search-item.is-selected {
  background: rgba(169, 255, 93, 0.08);
  border-color: rgba(169, 255, 93, 0.2);
}

/* Item Thumbnails & Avatars */
.artmatter-item-thumb {
  width: 48px;
  height: 62px;
  border-radius: 4px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  object-fit: cover;
  flex-shrink: 0;
}
.artmatter-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
  flex-shrink: 0;
}
.artmatter-item-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(169, 255, 93, 0.08);
  border: 1px solid rgba(169, 255, 93, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a9ff5d;
  flex-shrink: 0;
}

/* Item Content & Tighter Typography */
.artmatter-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.artmatter-item-title {
  font-size: 13.5px;
  font-weight: 400;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
}
.artmatter-item-subtitle {
  font-size: 11.5px;
  font-weight: 300;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 0;
}

/* Badge Pill - Compact 8.5px Pill */
.artmatter-item-pill {
  font-size: 8.5px;
  font-weight: 400;
  font-family: inherit;
  letter-spacing: 0.01em;
  padding: 2px 6.5px;
  border-radius: 9999px;
  background: rgba(169, 255, 93, 0.1);
  color: #a9ff5d;
  border: 1px solid rgba(169, 255, 93, 0.25);
  white-space: nowrap;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Item Meta (Arrow) */
.artmatter-item-meta {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.artmatter-item-arrow {
  color: #52525b;
  stroke-width: 2;
  transition: transform 0.15s, color 0.15s;
}
.artmatter-search-item:hover .artmatter-item-arrow,
.artmatter-search-item.is-selected .artmatter-item-arrow {
  color: #a9ff5d;
  transform: translateX(2px);
}

/* See All Results Action Button */
.artmatter-search-see-all-wrap {
  padding: 12px 16px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 6px;
}
.artmatter-search-see-all-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 14px;
  background: rgba(169, 255, 93, 0.07);
  border: 1px solid rgba(169, 255, 93, 0.22);
  border-radius: 10px;
  color: #a9ff5d;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.artmatter-search-see-all-btn:hover {
  background: rgba(169, 255, 93, 0.14);
  border-color: rgba(169, 255, 93, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}
.artmatter-search-see-all-btn svg {
  stroke: #a9ff5d;
  transition: transform 0.15s;
}
.artmatter-search-see-all-btn:hover svg {
  stroke: #ffffff;
  transform: translateX(3px);
}

/* Highlights */
mark.artmatter-highlight {
  background: transparent !important;
  color: inherit !important;
  font-weight: inherit !important;
  border-radius: 0;
  padding: 0;
}

/* Empty / No Results State */
.artmatter-search-empty {
  text-align: center;
  padding: 36px 16px;
  color: #71717a;
}
.artmatter-empty-icon {
  margin-bottom: 10px;
  color: #52525b;
}
.artmatter-empty-title {
  font-size: 13.5px;
  font-weight: 400;
  color: #e4e4e7;
  margin-bottom: 3px;
}
.artmatter-empty-desc {
  font-size: 11.5px;
  font-weight: 300;
  color: #71717a;
}

/* Loading Skeleton */
.artmatter-search-loading {
  padding: 6px 4px;
}
.artmatter-skeleton-row {
  height: 48px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: artmatter-skeleton-pulse 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 6px;
}
@keyframes artmatter-skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 6. Footer Navigation Hints */
.artmatter-search-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #09090c;
  font-size: 11px;
  color: #71717a;
}
.artmatter-footer-hint {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 7. Mobile Responsive Optimization (Native App-Like Touch Experience) */
@media (max-width: 640px) {
  .artmatter-search-modal {
    padding: 0;
    align-items: stretch;
  }
  .artmatter-search-dialog {
    max-width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    background: #0d0d10;
  }
  .artmatter-search-header {
    padding: 14px 16px;
    padding-top: max(14px, env(safe-area-inset-top));
    gap: 10px;
    background: #121216;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .artmatter-search-input {
    font-size: 16px; /* Prevents iOS auto-zoom */
    line-height: 1.3;
  }
  .artmatter-search-input::placeholder {
    font-size: 15px;
    color: #71717a;
  }
  .artmatter-search-clear,
  .artmatter-search-close-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .artmatter-close-kbd {
    display: none;
  }
  .artmatter-close-icon {
    display: block;
  }
  .desktop-only {
    display: none !important;
  }
  .artmatter-search-tabs {
    padding: 10px 16px;
    gap: 8px;
    background: #0d0d10;
    -webkit-overflow-scrolling: touch;
  }
  .artmatter-tab-btn {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 34px;
    border-radius: 9999px;
    -webkit-tap-highlight-color: transparent;
  }
  .artmatter-tab-count {
    font-size: 10.5px;
    padding: 1px 6px;
    border-radius: 9999px;
  }
  .artmatter-search-body {
    padding: 10px 14px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  .artmatter-group-title {
    font-size: 11px;
    padding: 8px 6px 4px 6px;
  }
  .artmatter-search-item {
    padding: 10px 10px;
    gap: 12px;
    border-radius: 10px;
    min-height: 60px;
    -webkit-tap-highlight-color: transparent;
  }
  .artmatter-search-item:active {
    background: rgba(255, 255, 255, 0.08);
  }
  .artmatter-item-thumb {
    width: 44px;
    height: 58px;
    border-radius: 4px;
  }
  .artmatter-item-avatar {
    width: 44px;
    height: 44px;
  }
  .artmatter-item-icon-wrap {
    width: 44px;
    height: 44px;
  }
  .artmatter-item-title {
    font-size: 14.5px;
    line-height: 1.3;
  }
  .artmatter-item-subtitle {
    font-size: 12.5px;
    margin-top: 1px;
  }
  .artmatter-search-footer {
    display: none; /* Hide desktop keyboard hints on mobile */
  }
}

/* ==========================================================================
   8. Dedicated Search Results Page (Museum Mat Pedestal & Orientation Filter)
   ========================================================================== */
.artmatter-search-results-page {
  width: 100%;
  box-sizing: border-box;
  color: #ececec;
  font-family: inherit;
}
.artmatter-search-results-page * {
  box-sizing: border-box;
}

/* Hero Search Form & Query Status */
.artmatter-results-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0 36px 0;
  width: 100%;
}
.artmatter-results-search-form {
  width: 100%;
  max-width: 640px;
}
.artmatter-results-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
.artmatter-results-search-icon {
  position: absolute;
  left: 20px;
  stroke: #71717a;
  pointer-events: none;
  transition: stroke 0.3s ease;
}
.artmatter-results-input-wrap:focus-within .artmatter-results-search-icon {
  stroke: #a9ff5d;
}
.artmatter-results-search-input {
  width: 100%;
  height: 48px;
  background: #111114;
  border: 1px solid rgba(169, 255, 93, 0.4);
  border-radius: 9999px;
  padding: 0 46px 0 52px;
  font-size: 14px;
  font-weight: 300;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  box-shadow: 0 0 0 2px rgba(169, 255, 93, 0.08);
  transition: all 0.25s ease;
}
.artmatter-results-search-input:focus {
  border-color: #a9ff5d;
  box-shadow: 0 0 0 4px rgba(169, 255, 93, 0.15);
  background: #141418;
}
.artmatter-results-search-input::placeholder {
  color: #71717a;
  font-weight: 300;
}
.artmatter-results-search-clear {
  position: absolute;
  right: 18px;
  color: #71717a;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.2s ease;
}
.artmatter-results-search-clear:hover {
  color: #ffffff;
}
.artmatter-results-query-stat {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 300;
  color: #a1a1aa;
  text-align: center;
}
.artmatter-stat-count {
  font-weight: 400;
  color: #ffffff;
}
.artmatter-stat-term {
  color: #a9ff5d;
  font-weight: 400;
}

/* Section Heading */
.artmatter-results-section-heading {
  font-size: 16px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

/* Matching Artists Grid (Expanded Luxury Cards without Artworks) */
.artmatter-matching-artists-grid,
.artmatter-matching-creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.artmatter-matching-artist-card {
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
}
.artmatter-matching-artist-card .artmatter-card-separator {
  margin: 18px 0;
}

@media (max-width: 767px) {
  .artmatter-matching-artists-grid,
  .artmatter-matching-creators-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Matching Fandoms Grid & Landscape Banner Cards */
.artmatter-matching-fandoms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.artmatter-matching-fandom-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #111114;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.artmatter-matching-fandom-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.artmatter-fandom-banner-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.artmatter-fandom-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.artmatter-fandom-banner-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #16161b;
  z-index: 1;
}
.artmatter-fandom-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 2;
}
.artmatter-fandom-card-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.artmatter-fandom-tag-pill {
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 400 !important;
  color: #a9ff5d;
  background: rgba(169, 255, 93, 0.15);
  border: 1px solid rgba(169, 255, 93, 0.3);
  border-radius: 9999px;
  padding: 2.5px 7px;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.artmatter-fandom-name {
  font-size: 15px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artmatter-fandom-count {
  font-size: 11.5px;
  color: #a1a1aa;
  font-weight: 300;
}
.artmatter-creator-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(169, 255, 93, 0.08);
  color: #a9ff5d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.artmatter-creator-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.artmatter-creator-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.artmatter-creator-name {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artmatter-creator-badge-pill {
  font-size: 10px;
  font-weight: 400 !important;
  color: #a9ff5d;
  background: rgba(169, 255, 93, 0.09);
  border: 1px solid rgba(169, 255, 93, 0.28);
  padding: 2.5px 8px;
  line-height: 1 !important;
  border-radius: 9999px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.artmatter-creator-art-count {
  font-size: 11.5px;
  color: #a1a1aa;
  font-weight: 300;
}

/* Orientation Filter Segmented Bar (Shadcn Minimalist Tabs Style) */
.artmatter-results-orient-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 32px;
  width: 100%;
}
.artmatter-results-orient-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.artmatter-orient-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 400;
  color: #a1a1aa;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.3s ease;
  user-select: none;
}
.artmatter-orient-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}
.artmatter-orient-btn.active {
  background: rgba(169, 255, 93, 0.09);
  border-color: rgba(169, 255, 93, 0.35);
  color: #a9ff5d;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.artmatter-orient-icon {
  stroke: currentColor;
  flex-shrink: 0;
}
.artmatter-orient-count {
  font-size: 9.5px;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 9999px;
  color: #d4d4d8;
  transition: all 0.3s ease;
}
.artmatter-orient-btn.active .artmatter-orient-count {
  background: rgba(169, 255, 93, 0.22);
  color: #a9ff5d;
}

/* Collections Dropdown Pill */
.artmatter-dir-col-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.artmatter-dir-col-btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 9999px;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 400;
  color: #ececec;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  transition: all 0.3s ease;
  user-select: none;
  outline: none;
}
.artmatter-dir-col-btn:hover,
.artmatter-dir-col-wrap.open .artmatter-dir-col-btn {
  background: #18181c;
  border-color: rgba(169, 255, 93, 0.35);
  color: #a9ff5d;
}
.artmatter-col-current-badge {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  font-weight: 500;
}
.artmatter-dir-col-wrap.open .artmatter-col-current-badge {
  background: rgba(169, 255, 93, 0.15);
  color: #a9ff5d;
}
.artmatter-col-chevron {
  transition: transform 0.3s ease;
  color: #71717a;
}
.artmatter-dir-col-wrap.open .artmatter-col-chevron {
  transform: rotate(180deg);
  color: #a9ff5d;
}
.artmatter-dir-col-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.artmatter-dir-col-wrap.open .artmatter-dir-col-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.artmatter-col-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 7px 11px;
  font-size: 11.5px;
  color: #a1a1aa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
}
.artmatter-col-option:hover {
  background: #1e1e24;
  color: #ffffff;
}
.artmatter-col-option.active {
  color: #a9ff5d;
  background: rgba(169, 255, 93, 0.08);
  font-weight: 500;
}
.artmatter-col-option-badge {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: #71717a;
}
.artmatter-col-option.active .artmatter-col-option-badge {
  background: rgba(169, 255, 93, 0.15);
  color: #a9ff5d;
}

/* Pinned / Featured Pill on Museum Cards */
.artmatter-pinned-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(17, 17, 20, 0.85);
  border: 1px solid rgba(169, 255, 93, 0.4);
  color: #a9ff5d;
  font-size: 9.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  letter-spacing: 0.02em;
}

/* Sort Dropdown Pill with Top-Down Icon */
.artmatter-dir-sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.artmatter-dir-sort-btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 9999px;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 400;
  color: #ececec;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  transition: all 0.3s ease;
  user-select: none;
  outline: none;
}
.artmatter-dir-sort-btn:hover,
.artmatter-dir-sort-wrap.open .artmatter-dir-sort-btn {
  background: #18181c;
  border-color: rgba(169, 255, 93, 0.35);
  color: #a9ff5d;
}
.artmatter-sort-chevron {
  transition: transform 0.3s ease;
  color: #71717a;
}
.artmatter-dir-sort-wrap.open .artmatter-sort-chevron {
  transform: rotate(180deg);
  color: #a9ff5d;
}
.artmatter-dir-sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.artmatter-dir-sort-wrap.open .artmatter-dir-sort-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.artmatter-sort-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 7px 11px;
  font-size: 11.5px;
  color: #a1a1aa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
}
.artmatter-sort-option:hover {
  background: #1e1e24;
  color: #ffffff;
}
.artmatter-sort-option.active {
  color: #a9ff5d;
  background: rgba(169, 255, 93, 0.08);
  font-weight: 500;
}

/* Search Circle Button & Smooth Expandable Field */
.artmatter-dir-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.artmatter-dir-search-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  outline: none;
  padding: 0;
}
.artmatter-dir-search-toggle:hover,
.artmatter-dir-search-wrap.open .artmatter-dir-search-toggle {
  background: rgba(169, 255, 93, 0.09);
  border-color: rgba(169, 255, 93, 0.35);
  color: #a9ff5d;
}
.artmatter-dir-search-expandable {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: width 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
  margin-left: 0;
  display: flex;
  align-items: center;
  position: relative;
}
.artmatter-dir-search-wrap.open .artmatter-dir-search-expandable {
  width: 220px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 6px;
}
.artmatter-dir-search-input {
  width: 100%;
  height: 32px;
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 0 28px 0 12px;
  font-size: 11.5px;
  font-weight: 300;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.artmatter-dir-search-input:focus {
  border-color: rgba(169, 255, 93, 0.4);
  box-shadow: 0 0 0 2px rgba(169, 255, 93, 0.08);
}
.artmatter-dir-search-input::placeholder {
  color: #71717a;
  font-weight: 300;
}
.artmatter-dir-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #71717a;
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 50%;
}

/* Museum Mat Gallery Grid (Portrait Default: 3 Cols Desktop, 2 Cols Mobile) */
.artmatter-museum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  width: 100%;
  position: relative;
  transition: grid-template-columns 0.5s ease;
}

/* Landscape Mode: 2 Columns on Desktop, 1 Column on Mobile */
.artmatter-museum-grid.landscape-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.artmatter-results-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: 0 450px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  will-change: transform, opacity;
}

/* Museum Mat Frame (Warm Archival Gallery Wall with Top-Left Sunlight Angle & Generous 4-Side Padding) */
.artmatter-museum-mat-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: radial-gradient(circle at var(--artmatter-mat-light-x, 18%) var(--artmatter-mat-light-y, 12%), rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.12) 40%, rgba(0, 0, 0, 0.06) 75%, rgba(0, 0, 0, 0.15) 100%), var(--artmatter-mat-bg, #c6c5c2);
  border-radius: 2px;
  padding: 68px;
  text-decoration: none;
  overflow: visible;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  transition: background 0.5s ease, box-shadow 0.5s ease;
  box-sizing: border-box;
}
.artmatter-museum-mat-card:hover {
  background: radial-gradient(circle at var(--artmatter-mat-light-x, 18%) var(--artmatter-mat-light-y, 12%), rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.16) 42%, rgba(0, 0, 0, 0.05) 75%, rgba(0, 0, 0, 0.13) 100%), var(--artmatter-mat-bg, #c6c5c2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.44);
}

@media (max-width: 1024px) {
  .artmatter-museum-mat-card {
    padding: 54px;
  }
}
@media (max-width: 768px) {
  .artmatter-museum-mat-card {
    padding: 48px;
  }
}
@media (max-width: 480px) {
  .artmatter-museum-mat-card {
    padding: 44px;
  }
}

.artmatter-pinned-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(18, 18, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #a9ff5d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  pointer-events: none;
  transition: all 0.25s ease;
}
.artmatter-pinned-pill svg {
  transform: rotate(45deg);
  display: block;
}

/* Mounted Artwork inside Mat Frame with Realistic Volumetric Plate Relief & Top-Left Sun Shadow (Stuck-to-Wall resting state) */
.artmatter-museum-art-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  background: transparent;
  line-height: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow:
    var(--artmatter-hl-x, 0px) var(--artmatter-hl-y, -1px) 0 0.5px rgba(255, 255, 255, 0.15),
    var(--artmatter-sh-rest-x, 0px) var(--artmatter-sh-rest-y, 2.5px) 1.5px 0 rgba(0, 0, 0, 0.38),
    calc(var(--artmatter-sh-rest-x, 0px) * 0.7) calc(var(--artmatter-sh-rest-y, 2.5px) * 1.4) 4px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Metal Plate Micro-Bevel Chamfer Edge (Top-Left Highlight & Bottom-Right Drop) */
.artmatter-museum-art-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 0;
  box-shadow: inset var(--artmatter-occ-x, 0px) var(--artmatter-occ-y, 1px) 0.5px rgba(255, 255, 255, 0.32), inset calc(var(--artmatter-occ-x, 0px) * -1) calc(var(--artmatter-occ-y, 1px) * -1) 0.5px rgba(0, 0, 0, 0.48);
  z-index: 3;
  transform: translateZ(0);
  box-sizing: border-box;
}

/* Subtle Realistic Lift Dimension on Mat Hover */
.artmatter-museum-mat-card:hover .artmatter-museum-art-wrap {
  transform: scale(1.012) translateZ(0);
  box-shadow:
    var(--artmatter-hl-x, 0px) var(--artmatter-hl-y, -1px) 0 0.5px rgba(255, 255, 255, 0.22),
    -2px 14px 16px -2px rgba(0, 0, 0, 0.22),
    2px 14px 16px -2px rgba(0, 0, 0, 0.22),
    0px 6px 8px -2px rgba(0, 0, 0, 0.48),
    0px 14px 20px -3px rgba(0, 0, 0, 0.55),
    0px 26px 42px 0 rgba(0, 0, 0, 0.65);
}

/* Full Artwork Image - Natural Ratio, No Crop, No Black Letterbox */
.artmatter-museum-art-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 !important;
  background: transparent;
}

/* Item Caption Centered Below Mat Card - Ultra Tight Spacing & Clickable Artist */
.artmatter-results-item-caption {
  margin-top: 10px;
  text-align: center;
  width: 100%;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}
.artmatter-results-item-title {
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 400;
  color: #ececec;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
  transition: color 0.2s ease;
}
.artmatter-results-item-title:hover {
  color: #a9ff5d;
}
.artmatter-results-item-artist,
a.artmatter-results-item-artist {
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 300;
  color: #71717a;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
  padding: 0;
  transition: color 0.2s ease;
}
a.artmatter-results-item-artist:hover {
  color: #ffffff;
}

/* Responsive Rules: 2 Cols Portrait / 2 Cols Landscape on Tablet */
@media (max-width: 900px) {
  .artmatter-museum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .artmatter-museum-grid.landscape-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
  .artmatter-museum-mat-card {
    padding: 38px;
  }
}

/* Responsive Rules: 2 Cols Portrait / 1 Col Landscape on Mobile */
@media (max-width: 600px) {
  .artmatter-museum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .artmatter-museum-grid.landscape-view {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .artmatter-museum-mat-card {
    padding: 24px;
  }
  .artmatter-results-item-title {
    font-size: 12px;
  }
  .artmatter-results-item-artist {
    font-size: 10.5px;
  }
}

/* Responsive Topbar Layout for Mobile & Tablet */
@media (max-width: 768px) {
  .artmatter-dir-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .artmatter-results-orient-bar {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 9999px !important;
  }
  .artmatter-orient-btn {
    flex: 1 1 50% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
    height: 34px !important;
    border-radius: 9999px !important;
  }
  .artmatter-dir-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .artmatter-dir-col-wrap {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: fit-content !important;
  }
  .artmatter-dir-col-btn {
    width: auto !important;
    max-width: fit-content !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 0 12px !important;
    height: 32px !important;
  }
  .artmatter-dir-sort-wrap {
    flex-shrink: 0;
    margin-left: auto;
  }
  .artmatter-dir-sort-btn {
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }
  .artmatter-dir-sort-btn .artmatter-sort-current-label,
  .artmatter-dir-sort-btn .artmatter-sort-chevron {
    display: none !important;
  }
  .artmatter-dir-search-wrap {
    flex-shrink: 0;
  }
  .artmatter-dir-search-wrap.open .artmatter-dir-search-expandable {
    width: 110px;
  }
}

