/* ===========================
   DESIGN TOKENS
   Professional dark UI color system
=========================== */

:root {
  /* Background Tiers */
  --bg-base: #101010;           /* Main background (locked) */
  --bg-elevated: #202020;       /* Cards, panels (locked) */
  --bg-overlay: #2a2a2a;        /* Modals, dropdowns, search panels */
  --bg-hover: #252525;          /* Subtle hover states */
  --bg-active: #2A2A2A;         /* Active/pressed states */
  
  /* Text Hierarchy */
  --text-primary: #E6E6E6;      /* Main content (locked) */
  --text-secondary: #B3B3B3;    /* Secondary labels */
  --text-tertiary: #808080;     /* Placeholder, subtle text */
  --text-disabled: #4A4A4A;     /* Disabled states */
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);   /* Minimal separation */
  --border-medium: rgba(255, 255, 255, 0.12);   /* Standard borders */
  --border-strong: rgba(255, 255, 255, 0.18);   /* Emphasized borders */
  
  /* Accent Colors (Desaturated) */
  --accent-primary: #3A5F7D;    /* Primary actions, focus states */
  --accent-hover: #4A6F8D;      /* Accent hover */
  --accent-active: #2A4F6D;     /* Accent pressed */
  
  /* Interactive States */
  --interactive-hover: rgba(255, 255, 255, 0.08);   /* General hover overlay */
  --interactive-active: rgba(255, 255, 255, 0.12);  /* General active overlay */
  --interactive-focus: var(--accent-primary);       /* Focus rings */
  
  /* Semantic Colors */
  --semantic-like: #E85D5D;     /* Like/heart color (desaturated red) */
  
  /* Overlays & Shadows */
  --overlay-dark: rgba(0, 0, 0, 0.85);     /* Modal overlays */
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.4);  /* Dropdown shadows */
  
  /* Sidebar */
  --sidebar-width: 67px;
  --sidebar-bg: rgba(0, 0, 0, 0.15);
  --sidebar-border: var(--border-subtle);
  --sidebar-hover: var(--interactive-hover);
  --sidebar-active: var(--interactive-active);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
}

    /*     ⸻⸻⸻⸻⸻⸻⸻⸻⸻ 🌑 ﹑ Search bar
*/

.search-row {
  position: relative;
  z-index: 100;
}

.search-bar {
  position: relative;
  width: 100%;
  padding: 20px 10px 0 0;
  z-index: 101;
}

.search-bar input {
  width: 100%;
  height: 44px;
  padding: 10px 68px 10px 118px;
  
  background: var(--bg-overlay);
  border: 3px solid transparent;
  border-radius: 6px;
  
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  
  outline: none;
  transition: background 0.1s ease, border-color 0.1s ease;
}

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

.search-bar input:hover {
  background: var(--bg-hover);
}

.search-bar input:focus {
  background: var(--bg-active);
  border-color: var(--interactive-focus);
}

/* === FILTER DRAWER BUTTON === */
.filter-drawer-btn {
  position: absolute;
  left: 15px;
  top: calc(20px + 22px);
  transform: translateY(-50%);
  
  width: 60px;
  height: 40px;
  padding-right: 12px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: none;
  border: none;
  border-right: 1px solid var(--border-subtle);
  cursor: pointer;
  z-index: 2;
  
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.filter-drawer-icon {
  width: 22px;
  height: 22px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
  will-change: opacity;
}

.filter-drawer-btn:hover .filter-drawer-icon {
  opacity: 0.9;
}

.filter-drawer-icon path,
.filter-drawer-icon g {
  stroke: currentColor;
  fill: none;
}

/* === FILTER DROPDOWN === */
.filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  
  padding: 8px;
  min-width: 160px;
  
  box-shadow: var(--shadow-medium);
  
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
  
  z-index: 100;
}

.filter-dropdown.hidden {
  display: none;
}

.filter-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-option {
  padding: 10px 14px;
  
  background: none;
  border: none;
  border-radius: 8px;
  
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-option:hover {
  background: var(--interactive-hover);
}

.filter-option.active {
  background: var(--accent-primary);
  color: var(--text-primary);
}

.filter-option:active {
  transform: scale(0.98);
}

/* === SEARCH RESULTS PANEL === */
.search-results-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: var(--bg-elevated);
  z-index: 99;
  overflow-y: auto;
  padding: 35px 20px 0 20px;
}

.search-results-panel.hidden {
  display: none;
}

.search-clear-btn {
  position: absolute;
  right: 35px;
  top: 65%;
  transform: translateY(-50%);
  
  width: 30px;
  height: 30px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3;
  
  color: var(--text-primary);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.search-clear-btn:hover {
  opacity: 1;
}

.search-clear-btn.hidden {
  display: none;
}

.search-results-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-section {
  margin-bottom: 24px;
}

.search-section:last-child {
  margin-bottom: 0;
}

.search-section-title {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 50px;
  margin-bottom: 15px;
  margin-left: 50px;
  opacity: 1;
}

.search-tags-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-tag-item {
  padding: 7px 107px;
  background: none;
  border: none;
  border-radius: 8px;
  max-width: 30%;
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-tag-item:hover {
  background: var(--interactive-hover);
  color: var(--text-primary);
}

.search-tag-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
  opacity: 0.5;
  transition: opacity 0.12s ease;
}

.search-tag-item:hover .search-tag-icon {
  opacity: 0.8;
}

.search-icon {
  position: absolute;
  left: 90px;
  top: calc(20px + 22px);
  transform: translateY(-50%);
  
  width: 20px;
  height: 20px;
  
  opacity: 0.3;
  pointer-events: none;
  
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.search-bar input:focus ~ .search-icon,
.search-bar input:not(:placeholder-shown) ~ .search-icon {
  opacity: 0.9;
}

    /*     ⸻⸻⸻⸻⸻⸻⸻⸻⸻ 🌙 ﹑ Like Button / Enlarge Button
*/

.like-btn,
.enlarge-btn {
  width: 36px;
  height: 36px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  pointer-events: auto;
  position: absolute;
  top: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.like-btn {
  right: 15px;
}

.enlarge-btn {
  right: 56px;
}

.card:hover .like-btn,
.card:hover .enlarge-btn {
  opacity: 1;
  transform: translateY(0);
}

.card-icon {
  width: 20px;
  height: 20px;
  display: block;
  
  opacity: 0.85;
  pointer-events: none;
  
  transition: opacity 0.2s ease, transform 0.15s ease, filter 0.2s ease;
  will-change: opacity;
}

.card:hover .card-icon {
  opacity: 1;
}

.like-btn:hover .card-icon,
.enlarge-btn:hover .card-icon {
  opacity: 1;
}

.like-btn:active .card-icon,
.enlarge-btn:active .card-icon {
  opacity: 0.8;
}

.like-btn.liked .card-icon {
  animation: heart-pop-svg 0.35s ease;
}

@keyframes heart-pop-svg {
  0% { opacity: 0.6; }
  40% { opacity: 1; }
  60% { opacity: 0.85; }
  80% { opacity: 1; }
  100% { opacity: 1; }
}

    /*     ⸻⸻⸻⸻⸻⸻⸻⸻⸻ 🌒 ﹑ Gallery Images / Cards 
*/

/* Gallery backdrop panel */
.gallery-backdrop {
  background: #202020;
  border-radius: 6px 6px 0 0;
  margin-top: 5px;
  margin-right: 10px;
  padding: 20px 20px 0 20px;
  min-height: calc(100vh - 100px);
}

.content {
  gap: 1px;
  padding: 1px;
  min-height: 100vh;
  
  display: flex;
  flex-direction: column;
  
  margin-left: var(--sidebar-width);
}

.gallery {
  display: flex;
  gap: 14px;
  padding: 0; /* Remove padding - backdrop handles it */
}

.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  position: relative;
  background: none;
  border-radius: 16px;
  padding: 2px;
  overflow: hidden;
  
  /* smooth entrance */
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.4s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,0.35) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Disable overlay for size-variant cards to prevent background showing */
.card.size-small::after,
.card.size-large::after {
  display: none;
}

.card:hover::after {
  opacity: 1;
}

.card img {
  width: 101%; /* 1% larger to guarantee card fill */
  margin-left: -0.5%; /* Center the oversized image */
  border-radius: 12px;
  
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  filter: blur(0px);
  
  cursor: pointer;
  
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.4s ease;
}

.card img.loaded {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition-delay: var(--enter-delay, 0ms);
}

/* Banner aspect */
.card.banner img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ===========================
   NATURAL HEIGHT VARIETY
=========================== */

.card img {
  width: 100%;
  height: auto;
}

.card.pfp img {
  aspect-ratio: auto;
  object-fit: contain;
}

/* ===========================
   PFP SIZE VARIATIONS (Cropped Heights)
=========================== */

.card.pfp.size-small img {
  height: 180px;
  object-fit: cover;
  aspect-ratio: unset;
}

.card.pfp.size-medium img {
  height: 240px;
  object-fit: cover;
  aspect-ratio: unset;
}

.card.pfp.size-large img {
  height: 320px;
  object-fit: cover;
  aspect-ratio: unset;
}

/* ===========================
   BANNER SIZE VARIATIONS (Cropped Heights)
=========================== */

.card.banner.size-small img {
  height: 100px;
  object-fit: cover;
  aspect-ratio: unset;
}

.card.banner.size-medium img {
  height: 140px;
  object-fit: cover;
  aspect-ratio: unset;
}

.card.banner.size-large img {
  height: 180px;
  object-fit: cover;
  aspect-ratio: unset;
}

    /* Modal CSS removed: using image detail page instead */

    /*     ⸻⸻⸻⸻⸻⸻⸻⸻⸻ 🌕 ﹑ Phone resizing
*/

@media (max-width: 1024px) {
  .gallery-backdrop {
    padding: 16px 16px 0 16px;
  }
  
  .gallery {
    gap: 10px;
  }
  
  .column {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .gallery-backdrop {
    padding: 12px 12px 0 12px;
  }
  
  .gallery {
    gap: 8px;
  }
  
  .column {
    gap: 8px;
  }
  
  .card {
    border-radius: 14px;
  }
  
  .card img {
    border-radius: 10px;
  }
  
  .like-btn,
  .enlarge-btn {
    top: 8px;
  }
  
  .like-btn {
    right: 8px;
  }
  
  .enlarge-btn {
    right: 48px;
  }
  
  .filter-drawer-btn {
    left: 12px;
  }
  
  .filter-dropdown {
    left: 0;
  }
}

@media (max-width: 420px) {
  .gallery-backdrop {
    padding: 10px 10px 0 10px;
  }
  
  .logo-img {
    height: 44px;
  }
  
  .enlarge-btn {
    right: 44px;
  }
  
  .filter-drawer-btn {
    left: 10px;
  }
}

/* ===========================
   MOBILE SEARCH OVERLAY
=========================== */

/* Mobile search overlay (full-width panel) */
.mobile-search-overlay {
  display: none; /* Hidden by default (desktop) */
  position: fixed;
  top: 64px; /* Below mobile navbar */
  left: 0;
  right: 0;
  z-index: 998;
  
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-search-overlay.hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.mobile-search-input {
  flex: 1;
  height: 48px;
  padding: 12px 20px;
  
  background: var(--bg-overlay);
  border: 2px solid transparent;
  border-radius: 10px;
  
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

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

.mobile-search-input:focus {
  background: var(--bg-active);
  border-color: var(--interactive-focus);
}

.mobile-search-close {
  width: 48px;
  height: 48px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: var(--bg-elevated);
  border: none;
  border-radius: 10px;
  
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-search-close:hover {
  background: var(--interactive-hover);
  transform: scale(1.05);
}

.mobile-search-close:active {
  transform: scale(0.95);
}

.mobile-search-close img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Mobile: Show mobile search overlay, hide desktop search */
@media (max-width: 768px) {
  .mobile-search-overlay {
    display: block;
  }
  
  /* Hide desktop search bar */
  .search-row {
    display: none !important;
  }
}

/* ===========================
   ACTIVE NAVIGATION STATE
=========================== */

.nav-icon {
  transition: opacity 0.2s ease-in-out;
  will-change: opacity;
}

.nav-icon-btn.active .nav-icon {
  opacity: 1;
}

.nav-icon-btn {
  transition: transform 0.2s ease-in-out;
}

/* ===========================
   SVG ICON STYLING
=========================== */

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: opacity 0.2s ease-in-out;
  will-change: opacity;
}

.nav-icon path,
.nav-icon circle,
.nav-icon polyline,
.nav-icon line,
.nav-icon rect,
.nav-icon g {
  stroke: currentColor;
  fill: none;
}

.nav-icon[path][fill],
.nav-icon g[fill] {
  fill: currentColor;
  stroke: none;
}

/* NAVIGATION LINK COLORS */
.nav-icon-btn {
  color: var(--text-primary);
  transition: all 0.2s ease-in-out;
}

.nav-icon-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-icon-btn.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-icon-btn.active .nav-icon {
  transform: scale(1.05);
}

/* ===========================
   UI CARD ICON STYLING
=========================== */

/* .modal-like .card-icon removed (modal removed) */

.card-icon path,
.card-icon circle,
.card-icon polyline,
.card-icon g {
  stroke: currentColor;
  fill: none;
}

/* Button colors */
.like-btn {
  color: var(--text-primary);
}

.like-btn.liked {
  color: var(--semantic-like);
}

.enlarge-btn {
  color: var(--text-primary);
}

/* .modal-like color rules removed (modal removed) */

/* ===========================
   GIF BADGE
=========================== */

.gif-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: 0.9;
  transition: opacity 0.12s ease-in-out;
  pointer-events: none;
  z-index: 2;
}

.card:hover .gif-badge {
  opacity: 1;
}

.gif-icon {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.gif-icon path {
  fill: var(--text-primary);
}

.like-btn,
.enlarge-btn {
  z-index: 3;
}

@media (max-width: 768px) {
  .gif-badge {
    opacity: 0.9;
  }
}

/* ===========================
   IMAGE DETAIL PAGE
=========================== */

.image-detail-page {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  background: var(--bg-base);
  z-index: 200;
  
  overflow-y: auto;
}

.image-detail-page.hidden {
  display: none;
}

.detail-back-btn {
  position: fixed;
  top: 30px;
  left: calc(var(--sidebar-width) + 30px);
  
  width: 48px;
  height: 48px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: var(--interactive-hover);
  border: none;
  border-radius: 12px;
  
  color: var(--text-primary);
  cursor: pointer;
  
  transition: all 0.2s ease;
  z-index: 10;
}

.detail-back-btn:hover {
  background: var(--interactive-active);
  transform: scale(1.05);
}

.detail-back-btn:active {
  transform: scale(0.95);
}

.detail-content {
  padding: 100px 40px 40px;
  
  display: flex;
  gap: 60px;
  
  min-height: 100vh;
}

.detail-main {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Fixed-width image container */
.detail-image-container {
  width: 600px;
  max-width: 100%;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 20px;
}

.detail-image-container img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* Action buttons beneath image */
.detail-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.detail-action-btn {
  width: 44px;
  height: 44px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  
  color: var(--text-primary);
  cursor: pointer;
  
  transition: all 0.2s ease;
}

.detail-action-btn:hover {
  background: var(--interactive-hover);
  border-color: var(--border-secondary);
  transform: translateY(-2px);
}

.detail-action-btn:active {
  transform: translateY(0);
}

.detail-action-btn.liked {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.action-icon {
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.detail-action-btn:hover .action-icon {
  opacity: 1;
}

/* Minimalistic tags display - CONTAINED */
.detail-tags {
  max-width: 600px; /* Match image container width */
  max-height: 80px; /* Limit to ~2-3 rows */
  
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  
  overflow-y: auto; /* Scroll if too many tags */
  overflow-x: hidden; /* No horizontal scroll */
  
  background: var(--bg-elevated);
  border-radius: 10px;
  
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--border-primary) transparent;
}

.detail-tags::-webkit-scrollbar {
  width: 6px;
}

.detail-tags::-webkit-scrollbar-track {
  background: transparent;
}

.detail-tags::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 3px;
}

.detail-tags::-webkit-scrollbar-thumb:hover {
  background: var(--border-secondary);
}

.detail-tag {
  padding: 6px 12px;
  
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-tag:hover {
  border-color: var(--border-secondary);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Similar images section */
.detail-similar {
  flex: 1;
  min-width: 0;
}

.similar-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.similar-card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1; /* Square cards */
  
  /* Fade-in animation - matches gallery cards */
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition:
    opacity 0.4s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease;
}

.similar-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.similar-card:hover {
  transform: translateY(-4px) scale(1);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.similar-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* Fills card without distortion */
  
  /* Image fade-in */
  opacity: 0;
  transform: scale(0.985);
  filter: blur(2px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    filter 0.4s ease;
}

.similar-card img.loaded {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.similar-card:hover img.loaded {
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .detail-content {
    flex-direction: column;
    gap: 40px;
  }
  
  .detail-main {
    align-items: center;
  }
  
  .similar-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .detail-content {
    padding: 80px 20px 20px;
  }
  
  .detail-back-btn {
    left: calc(var(--sidebar-width) + 20px);
    top: 20px;
  }
  
  .detail-image-container {
    width: 100%;
    padding: 15px;
  }
  
  .detail-tags {
    max-width: 100%; /* Full width on mobile */
    max-height: 100px; /* Slightly taller on mobile */
  }
  
  .similar-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }
}

/* ===========================
   MOBILE: Limit card heights to 1:1 and 4:3 only
=========================== */

@media (max-width: 768px) {
  /* PFP cards on mobile - only 1:1 and 4:3 */
  .card.pfp.size-small img,
  .card.pfp.size-medium img {
    height: auto;
    aspect-ratio: 1 / 1; /* Square */
    object-fit: cover;
  }
  
  .card.pfp.size-large img {
    height: auto;
    aspect-ratio: 4 / 3; /* 4:3 landscape */
    object-fit: cover;
  }
  
  /* Banner cards on mobile - only 1:1 and 4:3 */
  .card.banner.size-small img,
  .card.banner.size-medium img {
    height: auto;
    aspect-ratio: 1 / 1; /* Square */
    object-fit: cover;
  }
  
  .card.banner.size-large img {
    height: auto;
    aspect-ratio: 4:3; /* 4:3 landscape */
    object-fit: cover;
  }
}
