/* ============================================================
   ENHANCED ANIMATIONS & UI IMPROVEMENTS FOR OPENHOUSE
   Add this AFTER style.css in your HTML head
   ============================================================ */

/* ============================================================
   1. CATEGORY PILLS ENHANCEMENT
   ============================================================ */

.cat-pill {
  transition: transform 0.3s cubic-bezier(.22, 1.3, .36, 1),
              border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.cat-pill:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px -14px rgba(255, 180, 84, 0.3);
}

@keyframes pillPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.cat-pill.active {
  animation: pillPulse 2s ease-in-out infinite;
}

.cat-pill .cat-count {
  transition: background 0.3s ease,
              color 0.3s ease,
              transform 0.3s cubic-bezier(.22, 1.3, .36, 1),
              box-shadow 0.3s ease;
}

.cat-pill:hover .cat-count {
  background: var(--accent);
  color: #0a0a0a;
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(255, 180, 84, 0.35);
}

@keyframes icoWiggle {
  0% { transform: rotate(0); }
  30% { transform: rotate(-12deg) scale(1.12); }
  60% { transform: rotate(9deg) scale(1.08); }
  100% { transform: rotate(0) scale(1.1); }
}

.cat-pill:hover .cat-ico {
  animation: icoWiggle 0.45s cubic-bezier(.22, 1.3, .36, 1) both;
}

@media (hover: hover) {
  .cat-pill .cat-ico {
    transition: box-shadow 0.3s ease, background 0.3s ease;
  }
  .cat-pill:hover .cat-ico {
    box-shadow: 0 0 16px rgba(255, 180, 84, 0.35);
  }
}

/* ============================================================
   2. APP CARD ANIMATIONS
   ============================================================ */

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

.cat-app {
  animation: cardEntrance 0.55s cubic-bezier(.22, 1.2, .36, 1) both;
}

.cat-app:nth-child(1) { animation-delay: 0.00s; }
.cat-app:nth-child(2) { animation-delay: 0.05s; }
.cat-app:nth-child(3) { animation-delay: 0.10s; }
.cat-app:nth-child(4) { animation-delay: 0.15s; }
.cat-app:nth-child(5) { animation-delay: 0.20s; }
.cat-app:nth-child(6) { animation-delay: 0.25s; }
.cat-app:nth-child(7) { animation-delay: 0.30s; }
.cat-app:nth-child(8) { animation-delay: 0.35s; }

/* Category-popup apps are deliberately stationary on interaction. The
   cursor-following .card-glow supplies the highlight without moving or
   resizing a card (important when the overflow menu is open). */
.cat-app {
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.cat-app:hover,
.cat-app:focus-within,
.cat-app[data-menu-open] {
  transform: none !important;
  box-shadow: none;
}

.cat-app:hover .card-glow,
.cat-app:focus-within .card-glow,
.cat-app[data-menu-open] .card-glow {
  opacity: 1;
}

.cat-app:active {
  transform: none !important;
}

.app-tags span {
  transition: transform 0.3s cubic-bezier(.22, 1.3, .36, 1),
              border-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease;
}

.cat-app:hover .app-tags span {
  /* Keep the app card's contents stationary too; only their colour treatment changes. */
  transform: none;
  border-color: rgba(255, 180, 84, 0.4);
  color: var(--text-dim);
  box-shadow: none;
}

.cat-app:hover .app-tags span:nth-child(1) { transition-delay: 0.00s; }
.cat-app:hover .app-tags span:nth-child(2) { transition-delay: 0.05s; }
.cat-app:hover .app-tags span:nth-child(3) { transition-delay: 0.10s; }
.cat-app:hover .app-tags span:nth-child(n+4) { transition-delay: 0.15s; }

.cat-app .app-icon,
.cat-app .cat-thumb {
  transition: transform 0.35s cubic-bezier(.22, 1.3, .36, 1),
              box-shadow 0.3s ease;
}

.cat-app:hover .app-icon,
.cat-app:hover .cat-thumb {
  transform: none;
  box-shadow: none;
}

/* ============================================================
   3. LOADING STATES (Shimmer Effect)
   ============================================================ */

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}

.skel-ico::after,
.skel-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.09) 50%,
    transparent 80%
  );
  transform: translateX(-100%);
  animation: shimmer 1.3s ease infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-app.loaded {
  animation: fadeInUp 0.4s cubic-bezier(.22, 1.3, .36, 1) both;
}

/* ============================================================
   4. SEARCH & FILTER ANIMATIONS
   ============================================================ */

.palette-trigger {
  transition: width 0.3s cubic-bezier(.22, 1.3, .36, 1),
              transform 0.3s cubic-bezier(.22, 1.3, .36, 1),
              border-color 0.3s ease,
              background 0.3s ease;
}

.palette-trigger:focus-within {
  width: 280px;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

@keyframes searchResultIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.palette-results li {
  animation: searchResultIn 0.4s cubic-bezier(.22, 1.3, .36, 1) both;
}

.palette-results li:nth-child(1) { animation-delay: 0.03s; }
.palette-results li:nth-child(2) { animation-delay: 0.06s; }
.palette-results li:nth-child(3) { animation-delay: 0.09s; }
.palette-results li:nth-child(4) { animation-delay: 0.12s; }
.palette-results li:nth-child(5) { animation-delay: 0.15s; }
.palette-results li:nth-child(n+6) { animation-delay: 0.18s; }

@keyframes filterChipIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.filter-chip {
  animation: filterChipIn 0.35s cubic-bezier(.22, 1.3, .36, 1) both;
}

/* ============================================================
   5. MODAL TRANSITIONS
   ============================================================ */

.modal {
  transform: scale(0.92) translateY(20px);
  transition: transform 0.45s cubic-bezier(.22, 1.4, .36, 1),
              opacity 0.3s ease;
  transform-origin: center center;
  opacity: 0;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease,
              visibility 0.3s ease,
              backdrop-filter 0.3s ease;
}

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

.modal-overlay.open .modal-close {
  animation: closeIn 0.5s cubic-bezier(.22, 1.3, .36, 1) 0.25s both;
}

/* ============================================================
   6. TOAST NOTIFICATIONS
   ============================================================ */

.toast {
  transform: translateX(30px) scale(0.95);
  transition: transform 0.5s cubic-bezier(.22, 1.4, .36, 1),
              opacity 0.35s ease;
}

.toast.show {
  transform: translateX(0) scale(1);
}

.toast.hiding {
  transform: translateX(100px);
  opacity: 0;
}

.toast .dot {
  animation: blink 1.6s ease-in-out infinite;
}

.toast.show .dot {
  animation: ping 1.2s ease-out 1, blink 1.6s ease-in-out 1.2s infinite;
}

.toast > span:last-child {
  animation: rowIn 0.35s cubic-bezier(.22, 1.3, .36, 1) 0.08s both;
}

/* ============================================================
   7. BACK TO TOP BUTTON
   ============================================================ */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease,
              visibility 0.3s ease,
              transform 0.3s cubic-bezier(.22, 1.3, .36, 1),
              background 0.3s ease,
              border-color 0.3s ease;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

.back-to-top:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.95);
}

/* ============================================================
   8. SCROLL REVEAL ANIMATIONS
   ============================================================ */

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal-up {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-up.in {
  animation: revealIn 0.8s cubic-bezier(.22, 1.3, .36, 1) both;
}

.reveal-up:nth-child(1).in { animation-delay: 0.00s; }
.reveal-up:nth-child(2).in { animation-delay: 0.08s; }
.reveal-up:nth-child(3).in { animation-delay: 0.16s; }
.reveal-up:nth-child(4).in { animation-delay: 0.24s; }
.reveal-up:nth-child(5).in { animation-delay: 0.32s; }
.reveal-up:nth-child(6).in { animation-delay: 0.40s; }
.reveal-up:nth-child(7).in { animation-delay: 0.48s; }
.reveal-up:nth-child(8).in { animation-delay: 0.56s; }

/* ============================================================
   9. STATS COUNTER ANIMATION
   ============================================================ */

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-num {
  animation: countUp 0.8s cubic-bezier(.22, 1.3, .36, 1) both;
}

@keyframes statSettle {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.stat-num.done {
  animation: statSettle 0.45s cubic-bezier(.22, 1.3, .36, 1);
}

/* ============================================================
   10. MARQUEE ENHANCEMENT
   ============================================================ */

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@media (hover: hover) {
  .marquee-track span {
    display: inline-block;
    transition: transform 0.25s var(--ease), color 0.3s ease;
  }
  .marquee-track span:hover {
    transform: translateY(-2px);
    color: var(--accent);
  }
}

/* ============================================================
   11. DOCK NAVIGATION ANIMATIONS
   ============================================================ */

.dock a,
.dock button {
  animation: dockPop 0.5s cubic-bezier(.22, 1.3, .36, 1) both;
}

.dock a:nth-child(1) { animation-delay: 0.55s; }
.dock a:nth-child(2) { animation-delay: 0.63s; }
.dock a:nth-child(3) { animation-delay: 0.71s; }
.dock a:nth-child(4) { animation-delay: 0.79s; }

@keyframes dockPop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   12. MAGNETIC BUTTONS
   ============================================================ */

[data-magnetic] {
  transition: transform 0.3s cubic-bezier(.22, 1.3, .36, 1);
}

[data-magnetic]:hover {
  transform: scale(1.05);
}

/* ============================================================
   13. TILT CARDS ENHANCEMENT
   ============================================================ */

.tilt-card {
  transition: transform 0.3s cubic-bezier(.22, 1.3, .36, 1);
}

/* ============================================================
   14. LINK HOVER EFFECTS
   ============================================================ */

a {
  transition: color 0.25s ease;
}

.footer-col a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}

.footer-col a:hover::after {
  transform: scaleX(1);
}

/* ============================================================
   15. BUTTON SHINE EFFECT
   ============================================================ */

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
}

.btn:hover::before {
  animation: btnShine 0.7s ease;
}

@keyframes btnShine {
  to {
    transform: translateX(120%);
  }
}

/* ============================================================
   16. INPUT FOCUS EFFECTS
   ============================================================ */

.field input:focus,
.field select:focus,
.field textarea:focus,
.login-form input:focus {
  box-shadow: 0 0 0 3px rgba(255, 180, 84, 0.14),
              0 8px 24px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

/* ============================================================
   17. CHANGELOG MODAL
   ============================================================ */

.changelog-modal {
  width: min(600px, 92vw);
  height: min(560px, 82vh);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(18,18,22,0.90);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: 0 24px 64px -24px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.06);
}

.changelog-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.changelog-tab {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text-dim);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.changelog-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.changelog-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

.changelog-content {
  flex: 1;
  margin-top: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.changelog-content::-webkit-scrollbar{ display:none; width:0; height:0; }

.changelog-content p {
  color: var(--text-dim);
  line-height: 1.7;
}

.changelog-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.changelog-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.9375rem;
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-icon {
  color: var(--accent);
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.changelog-date-right {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.changelog-item strong {
  color: var(--text);
}

.changelog-item em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

/* ============================================================
   19. TOUCH INTERACTIONS
   ============================================================ */

/* Touch-specific active states for better feedback */
@media (hover: none) {
  /* Buttons - scale down on tap */
  .btn,
  .btn-primary,
  .btn-outline,
  [data-magnetic],
  .cat-pill,
  .palette-trigger,
  .icon-btn {
    transition: transform 0.15s cubic-bezier(.22, 1.3, .36, 1),
                background 0.15s ease,
                border-color 0.15s ease;
  }

  .btn:active,
  .btn-primary:active,
  .btn-outline:active,
  [data-magnetic]:active,
  .cat-pill:active,
  .palette-trigger:active,
  .icon-btn:active {
    transform: scale(0.96) !important;
  }

  /* Cards - subtle press effect */
  .feature-card:active,
  .download-card:active {
    transform: scale(0.98) !important;
    filter: brightness(0.95);
  }

  /* Dock icons - bounce on tap */
  .dock a:active,
  .dock button:active {
    transform: scale(0.9) !important;
  }

  /* Modal close buttons */
  .modal-close:active {
    transform: scale(0.9) !important;
  }

  /* Footer links */
  .footer-col a:active {
    transform: scale(0.98);
    color: var(--accent) !important;
  }

  /* Topbar brand */
  .brand:active {
    transform: scale(0.98);
  }

  /* Touch ripple effect for buttons */
  .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .btn:active::after {
    opacity: 1;
  }

  .btn-primary:active::after {
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  }
}

/* Touch-specific cursor styles */
@media (hover: none) {
  [data-cursor="pointer"] {
    cursor: pointer;
  }
}

/* ============================================================
   19. TOUCH CROSSHAIR INDICATOR
   ============================================================ */

@keyframes crosshairHit {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

#touch-crosshair {
  position: fixed;
  pointer-events: none;
  width: 20px;
  height: 20px;
  opacity: 0;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(0.5);
}

#touch-crosshair.active {
  animation: crosshairHit 0.15s ease-out forwards;
}

#touch-crosshair::before,
#touch-crosshair::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  border-radius: 1px;
}

#touch-crosshair::before {
  width: 2px;
  height: 14px;
  box-shadow: 0 0 6px rgba(255, 180, 84, 0.8);
}

/* ============================================================
   20. CATEGORY PILLS AUTO-ADJUST LAYOUT
   ============================================================ */

.cat-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 0.75rem;
  align-items: start;
  justify-content: center;
}

.cat-pill {
  grid-column: span 1;
  min-width: 0;
}

/* Adjust for different screen sizes */
@media (min-width: 600px) {
  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 1rem;
  }
}


/* Cross X tiny */
#touch-crosshair{position:fixed;left:0;top:0;width:18px;height:18px;pointer-events:none;z-index:99999;opacity:0;transform:translate(-50%,-50%) scale(0.4);}
#touch-crosshair::before,#touch-crosshair::after{display:none!important}
#touch-crosshair .ch-cross{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
#touch-crosshair .ch-cross::before,#touch-crosshair .ch-cross::after{content:'';position:absolute;width:10px;height:1.6px;background:var(--accent);border-radius:999px;top:50%;left:50%;box-shadow:0 0 6px var(--accent-glow)}
#touch-crosshair .ch-cross::before{transform:translate(-50%,-50%) rotate(45deg)}
#touch-crosshair .ch-cross::after{transform:translate(-50%,-50%) rotate(-45deg)}
#touch-crosshair .ch-dot{position:absolute;left:50%;top:50%;width:2px;height:2px;background:var(--accent);border-radius:50%;transform:translate(-50%,-50%)}
#touch-crosshair .ch-ring{position:absolute;inset:0;border:1px solid rgba(255,180,84,0.7);border-radius:50%;transform:scale(0.3);opacity:0}
@keyframes crossHitPopV2{0%{opacity:0;transform:translate(-50%,-50%) scale(0.2)}22%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}70%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(0.9)}}
@keyframes ringHitV2{0%{transform:scale(0.25);opacity:0.8}100%{transform:scale(1.9);opacity:0}}
#touch-crosshair.active{animation:crossHitPopV2 460ms cubic-bezier(.22,1.3,.36,1) forwards}
#touch-crosshair.active .ch-ring{animation:ringHitV2 460ms ease-out forwards}


/* v6 FINAL - Featured distinct + nav blur for pills */
.cat-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  max-width:720px !important;
  margin:0 auto !important;
  padding:0 16px !important;
  background:none !important;border:none !important;backdrop-filter:none !important;box-shadow:none !important;
}
.cat-grid::before{display:none !important}
@media(min-width:600px){.cat-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;padding:0 20px !important;max-width:840px !important;gap:12px !important}}
@media(min-width:1000px){.cat-grid{max-width:900px !important}}

.cat-pill{
  position:relative !important;display:flex !important;align-items:center !important;gap:10px !important;
  padding:10px 14px !important;min-height:48px !important;border-radius:14px !important;
  background:rgba(15,15,18,0.68) !important;border:1px solid rgba(255,255,255,0.08) !important;
  -webkit-appearance:none !important;appearance:none !important;
  box-shadow:0 8px 24px -18px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.cat-pill:hover{background:rgba(15,15,18,0.84) !important;border-color:rgba(255,255,255,0.14) !important;transform:translateY(-1px) !important}
.cat-pill .cat-ico{width:28px !important;height:28px !important;min-width:28px !important;border-radius:10px !important;background:rgba(255,255,255,0.07) !important;border:1px solid rgba(255,255,255,0.08) !important}
.cat-pill .cat-name{font-size:12.5px !important;font-weight:560 !important;line-height:1.25 !important;white-space:normal !important;overflow:visible !important;display:-webkit-box !important;-webkit-line-clamp:2 !important;-webkit-box-orient:vertical !important}
.cat-pill .cat-count{background:rgba(255,255,255,0.07) !important;border:1px solid rgba(255,255,255,0.06) !important}

.cat-pill-featured{
  grid-column:1/-1 !important;
  min-height:88px !important;
  padding:16px 18px !important;
  border-radius:18px !important;
  background:radial-gradient(ellipse 80% 120% at 10% 50%, rgba(255,180,84,0.24), transparent 60%), linear-gradient(100deg, rgba(255,180,84,0.14), rgba(255,180,84,0.04)), rgba(15,15,18,0.82) !important;
  border:1px solid rgba(255,180,84,0.32) !important;
  backdrop-filter:blur(18px) saturate(1.3) !important;-webkit-backdrop-filter:blur(18px) saturate(1.3) !important;
  box-shadow:0 16px 40px -20px rgba(255,180,84,0.40), inset 0 1px 0 rgba(255,255,255,0.10) !important;
  background-size:200% 200%, 100% 100%, 100% 100% !important;
  animation:featShift 6s ease-in-out infinite !important;
}
@keyframes featShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
@keyframes featShimmer{0%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
.cat-pill-featured::before{content:'' !important;position:absolute !important;inset:0 !important;background:linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.10) 50%, transparent 70%) !important;transform:translateX(-120%) !important;animation:featShimmer 3.2s ease-in-out infinite !important;pointer-events:none !important;z-index:2 !important}
.cat-pill-featured .cat-ico{width:44px !important;height:44px !important;min-width:44px !important;border-radius:12px !important;background:var(--accent) !important;border:1px solid rgba(255,180,84,0.4) !important;color:#0a0a0a !important;font-size:20px !important}
.cat-pill-featured .cat-name{font-size:16px !important;font-weight:700 !important;color:var(--accent) !important;-webkit-line-clamp:1 !important}
.cat-pill-featured .cat-count{background:var(--accent) !important;color:#0a0a0a !important;border-color:var(--accent) !important;font-weight:700 !important}




/* ========== FIX 2 & 3: Auto-scroll + located flash blink ========== */
.cat-app{
  /* ensure base animation doesn't restart on located removal */
  animation: catCardIn .55s cubic-bezier(.22,1.2,.36,1) both;
  will-change: transform, opacity;
}
.cat-app.located{
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(255,180,84,0.45), 0 0 24px rgba(255,180,84,0.22) !important;
  transform: scale(1.01) !important;
  z-index: 2;
  /* Do NOT override animation - keep catCardIn from base to avoid restart blink */
}
.cat-app.located::after{
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--accent);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  animation: locatedBorderFlash 2.2s var(--ease) forwards;
}
@keyframes locatedBorderFlash{
  0%{ opacity: 1; transform: scale(1.03); box-shadow: 0 0 0 4px rgba(255,180,84,0.5); }
  40%{ opacity: 0.8; transform: scale(1); }
  100%{ opacity: 0; transform: scale(1); }
}
@keyframes locatedFlash{
  0%{ box-shadow:0 0 0 3px rgba(255,180,84,.55), 0 0 34px rgba(255,180,84,.3); }
  100%{ box-shadow:0 0 0 2px rgba(255,180,84,.2), 0 0 16px rgba(255,180,84,.1); }
}





/* ========== FIX 1 v3: Search bar popup - small centered, no full-screen, fix cut off ========== */
.palette-input-container input{
  min-width: 0;
  flex: 1;
}
.palette-overlay{
  overscroll-behavior: contain;
}
/* Keep popup small centered like before */
@media (max-width: 640px){
  .palette-overlay{
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 16px 12px !important;
    padding-top: max(16px, 10vh) !important;
  }
  .palette{
    width: min(92vw, 440px) !important;
    max-width: 92vw !important;
    max-height: min(70vh, 440px) !important;
    max-height: min(70dvh, 440px) !important;
    border-radius: 16px !important;
    border: 1px solid var(--panel-border) !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    transform: translateY(-10px) scale(.98) !important;
  }
  .palette-overlay.open .palette{
    transform: translateY(0) scale(1) !important;
  }
  .palette-input-row{
    padding: 14px 16px !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }
  .palette-input-container input{
    font-size: 16px !important; /* prevent iOS zoom */
    min-width: 0 !important;
  }
  .palette-input-container kbd{
    flex-shrink: 0 !important;
  }
  /* Hide categories/results list by default - only show when typing */
  .palette-results{
    display: none !important;
  }
  .palette-results.has-results{
    display: block !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .palette-results li{
    padding: 10px 12px !important;
  }
}

/* Desktop: also hide empty results to match request - only search bar with dismiss */
.palette-results{
  scrollbar-width: none;
  display: none; /* hidden by default - only search bar like before */
}
.palette-results.has-results{
  display: block !important;
}
.palette-results:empty{
  display: none !important;
}
.palette-results::-webkit-scrollbar{ display:none; }



/* ========== FIX: Auto-scroll should NOT outline app at all ========== */
.cat-app.located{
  border-color: var(--panel-border) !important;
  box-shadow: none !important;
  transform: none !important;
  animation: none !important;
}
.cat-app.located::after{
  display: none !important;
}
.cat-app{
  /* ensure no outline flash */
  outline: none !important;
}

/* ========== Modern Search Bar ========== */
.palette{
  background: rgba(18,18,22,0.88) !important;
  backdrop-filter: blur(20px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px -24px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  overflow: hidden !important;
}
.palette-input-row{
  padding: 18px 20px !important;
  gap: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.palette-input-container svg{
  color: var(--text-faint) !important;
  flex-shrink: 0 !important;
}
.palette-input-container input{
  flex: 1 !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}
.palette-input-container input:focus{
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,180,84,0.32) !important;
  box-shadow: 0 0 0 3px rgba(255,180,84,0.14) !important;
}
.palette-input-container input::placeholder{
  color: var(--text-faint) !important;
}
.palette-input-container kbd{
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--text-dim) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset !important;
}

/* ========== Dock Fluid Indicator - smooth switch animation ========== */
.dock{
  position: fixed !important;
  /* keep existing styles but ensure indicator container */
}
.dock{
  position: fixed !important;
}
.dock-indicator{
  position: absolute;
  top: 10px;
  left: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,180,84,0.16);
  border: 1px solid rgba(255,180,84,0.24);
  box-shadow: 0 4px 18px -8px rgba(255,180,84,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translateX(0) translateY(0);
  transition: transform 0.45s cubic-bezier(.22, 1.4, .36, 1), opacity 0.25s ease, background 0.3s ease;
  will-change: transform;
}
.dock a{
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
}
.dock a.active{
  background: transparent !important;
  color: var(--accent) !important;
}
.dock a.active svg *{
  stroke: var(--accent) !important;
  fill: none !important;
}
.dock-indicator.show{
  opacity: 1;
}



/* ========== FIX: Lazy updated timestamp shifts card size */
.cat-updated{
  display: block;
  min-height: 14px;
  font-size: 11px;
  line-height: 1.2;
  font-family: var(--font-mono);
  color: var(--text-faint);
  margin-top: 6px;
}
.cat-updated[hidden]{
  display: block !important;
  visibility: hidden !important;
  min-height: 14px !important;
}
.cat-app-body{
  min-height: 0;
}


/* ========== Modern Search Bar - Rounded + Blurred like animex.one ========== */
.palette{
  background: rgba(12,12,14,0.82) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 80px -20px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.palette-input-row{
  padding: 20px 20px 16px !important;
  gap: 12px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* Quick access label like animex */
.palette-input-row::before{
  content: 'Quick access:  CTRL  +  K';
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 2px;
  display: inline-block;
}

.palette-input-row > div,
.palette-input-row > span{
  width: 100%;
}

.palette-input-container {
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

.palette-input-container svg {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--text-faint) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.palette-input-container input {
  width: 100% !important;
  height: 48px !important;
  background: rgba(18,18,22,0.9) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 14px !important;
  padding: 0 54px 0 40px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  color: var(--text) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 20px -12px rgba(0,0,0,0.6) !important;
  transition: all 0.2s ease !important;
}

.palette-input-container input::placeholder {
  color: var(--text-faint) !important;
  font-weight: 400 !important;
}

.palette-input-container input:focus {
  background: rgba(255,255,255,0.09) !important;
  border-color: rgba(255,180,84,0.32) !important;
  box-shadow: 0 0 0 3px rgba(255,180,84,0.12), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  outline: none !important;
}

.palette-input-container kbd {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-bottom-width: 2px !important;
  border-radius: 8px !important;
  padding: 5px 9px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--text-dim) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset !important;
  z-index: 2 !important;
}

@media (max-width: 640px) {
  .palette-input-container input {
    font-size: 16px !important; /* prevent iOS zoom */
  }
}

/* Results list modern */
.palette-results{
  padding: 8px !important;
}
.palette-results li{
  border-radius: 12px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  transition: all 0.18s ease !important;
}
.palette-results li:hover,
.palette-results li.active{
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.08) !important;
  transform: translateX(2px) !important;
}

/* ============================================================
   ENHANCED MICRO-ANIMATIONS AND HOVER EFFECTS (POLISH)
   ============================================================ */

/* 1. Featured Icon Glow & Twinkling Animation */
.cat-pill-featured .cat-ico {
  animation: featIcoGlowPulse 2.8s ease-in-out infinite !important;
}

@keyframes featIcoGlowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 180, 84, 0.45), inset 0 1px 0 rgba(255,255,255,0.25) !important;
    transform: scale(1) rotate(0deg);
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 180, 84, 0.8), inset 0 1px 0 rgba(255,255,255,0.4) !important;
    transform: scale(1.05) rotate(3deg);
  }
}

/* Twinkling/animating featured icon sparkles */
.cat-ico-featured svg path {
  transform-box: fill-box;
}
.cat-ico-featured svg path:nth-child(1) {
  animation: mainStarPulse 3s ease-in-out infinite;
  transform-origin: center;
}
.cat-ico-featured svg path:nth-child(2) {
  animation: sparkleTwinkleOne 2s ease-in-out infinite;
  transform-origin: center;
}
.cat-ico-featured svg path:nth-child(3) {
  animation: sparkleTwinkleTwo 2s ease-in-out infinite 1s; /* offset by 1s */
  transform-origin: center;
}

@keyframes mainStarPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.08) rotate(-4deg);
  }
}

@keyframes sparkleTwinkleOne {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.3) rotate(45deg);
    opacity: 0.15;
  }
}

@keyframes sparkleTwinkleTwo {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.3) rotate(-45deg);
    opacity: 0.15;
  }
}

/* 2. Floating/pulsing Back-to-Top Button */
.back-to-top {
  animation: backToTopFloat 3s ease-in-out infinite !important;
}
@keyframes backToTopFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* 3. Shortcuts Button Rotation & Glow on Hover */
#shortcuts-trigger {
  transition: transform 0.3s cubic-bezier(.22, 1.3, .36, 1), border-color 0.3s ease, color 0.3s ease !important;
}
#shortcuts-trigger:hover {
  transform: rotate(360deg) scale(1.1) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* 4. Enhanced Lift and Glow for Feature Cards & Submit Card */
.feature-card, .download-card {
  transition: transform 0.4s cubic-bezier(.22, 1.3, .36, 1), border-color 0.3s ease, box-shadow 0.3s ease !important;
}
.feature-card:hover {
  transform: translateY(-6px) scale(1.015) !important;
  border-color: rgba(255, 180, 84, 0.45) !important;
  box-shadow: 0 16px 36px -12px rgba(255, 180, 84, 0.15) !important;
}
.download-card:hover {
  transform: scale(1.005) !important;
  border-color: rgba(255, 180, 84, 0.45) !important;
  box-shadow: 0 20px 48px -15px rgba(255, 180, 84, 0.22) !important;
}

/* 5. Pulsing Search Trigger Pill in Header */
.palette-trigger {
  animation: searchPillBreathing 4s ease-in-out infinite;
}
@keyframes searchPillBreathing {
  0%, 100% {
    box-shadow: 0 0 0px transparent;
  }
  50% {
    box-shadow: 0 0 12px rgba(255, 180, 84, 0.15);
    border-color: rgba(255, 180, 84, 0.25);
  }
}
/* Full category cards — intentionally mirrors the repository-card reference. */
#cat-grid.cat-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 14px !important;
  max-width: 620px !important;
  padding: 0 16px !important;
}

#cat-grid .cat-pill {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 120px !important;
  padding: 18px 18px 16px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 14px !important;
  background: #101011 !important;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.018), 0 12px 28px -24px #000 !important;
  text-align: left !important;
  color: var(--text) !important;
}
#cat-grid .cat-pill:hover,
#cat-grid .cat-pill:focus-visible {
  transform: none !important;
  border-color: rgba(255,255,255,.24) !important;
  background: #121214 !important;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.026), 0 12px 28px -24px #000 !important;
}

#cat-grid .cat-pill .cat-ico {
  display: inline-flex !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  margin: 0 10px 10px 0 !important;
  vertical-align: middle !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.035) !important;
  color: var(--accent) !important;
  font-size: 16px !important;
  box-shadow: none !important;
}
#cat-grid .cat-pill .cat-ico .cat-auto-icon { width: 25px; height: 25px; }
#cat-grid .cat-ico .cat-auto-icon text { font-size: 4px; }

#cat-grid .cat-pill-body { display: block !important; }
#cat-grid .cat-pill .cat-name {
  display: inline !important;
  color: #eeeeef !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 34px !important;
  vertical-align: middle !important;
}
#cat-grid .cat-pill .cat-sub {
  display: none !important;
}
#cat-grid .cat-meta-rows { display: grid; gap: 7px; min-width: 0; }
#cat-grid .cat-meta-row { display: grid; grid-template-columns: minmax(0,auto) minmax(6px, 1fr) minmax(0,auto); align-items: center; gap: 6px; color: #aaaab0; font-size: 12.5px; line-height: 1; min-width: 0; }
#cat-grid .cat-meta-label { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cat-grid .cat-meta-label b { width: 13px; color: #a8a8ad; font-size: 13px; font-weight: 400; text-align: center; flex-shrink: 0; }
#cat-grid .cat-meta-row i { height: 1px; background: rgba(255,255,255,.14); min-width: 0; }
#cat-grid .cat-meta-row strong { color: #e3e3e5; font-size: 12.5px; font-weight: 500; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

#cat-grid .cat-pill .cat-count { display: none !important; }

/* ---- Edit / delete buttons: pull out of flex flow entirely ----
   Previously these two spans were plain flex items inside #cat-grid
   .cat-pill's column layout, so they stacked as their own row right under
   the meta rows with zero gap — cramped against (and often clipped by)
   the card's rounded bottom edge/overflow:hidden. On the Featured card
   the layout switches to flex-direction:row + flex-wrap:wrap, which could
   push them onto a wrapped second line that got clipped away entirely,
   making them invisible. Taking them out of flow and anchoring them to a
   fixed corner fixes both at once, on every card variant. */
#cat-grid .cat-pill .cat-act {
  position: absolute !important;
  bottom: 12px !important;
  margin: 0 !important;
  z-index: 4 !important;
}
#cat-grid .cat-pill .cat-act-rename { right: 46px !important; }
#cat-grid .cat-pill .cat-act-del  { right: 12px !important; }
/* Reserve room at the bottom of the card so the buttons never sit on top
   of the last meta row's text. Only applies when the buttons exist
   (i.e. the owner/admin is signed in). */
#cat-grid .cat-pill:has(.cat-act) { padding-bottom: 46px !important; }

/* ---- Featured card: visually separated from normal category cards ---- */
#cat-grid .cat-pill-featured {
  grid-column: 1 / -1 !important;
  min-height: 108px !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  border: 1px solid rgba(255,180,84,.4) !important;
  background:
    radial-gradient(ellipse 90% 140% at 0% 50%, rgba(255,180,84,.20), transparent 62%),
    linear-gradient(100deg, rgba(255,180,84,.10), rgba(255,180,84,.02) 55%),
    #101011 !important;
  background-size: 200% 200%, 100% 100%, 100% 100% !important;
  box-shadow: 0 0 0 1px rgba(255,180,84,.08) inset, 0 16px 34px -20px rgba(255,180,84,.35) !important;
  animation: catFeatShift 7s ease-in-out infinite, catFeatGlow 3.4s ease-in-out infinite !important;
}
#cat-grid .cat-pill-featured:hover,
#cat-grid .cat-pill-featured:focus-visible {
  border-color: rgba(255,180,84,.65) !important;
  background:
    radial-gradient(ellipse 90% 140% at 0% 50%, rgba(255,180,84,.28), transparent 62%),
    linear-gradient(100deg, rgba(255,180,84,.14), rgba(255,180,84,.03) 55%),
    #121214 !important;
}
#cat-grid .cat-pill-featured::before {
  display: block !important;
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.14) 50%, transparent 70%) !important;
  transform: translateX(-120%) !important;
  animation: catFeatShimmer 3.6s ease-in-out infinite !important;
  pointer-events: none !important;
  z-index: 2 !important;
}
@keyframes catFeatShift { 0%,100%{ background-position:0% 50%,0 0,0 0; } 50%{ background-position:100% 50%,0 0,0 0; } }
@keyframes catFeatShimmer { 0%{ transform:translateX(-120%); } 60%,100%{ transform:translateX(120%); } }
@keyframes catFeatGlow {
  0%,100%{ box-shadow: 0 0 0 1px rgba(255,180,84,.08) inset, 0 16px 34px -20px rgba(255,180,84,.35); }
  50%{ box-shadow: 0 0 0 1px rgba(255,180,84,.16) inset, 0 18px 40px -16px rgba(255,180,84,.55); }
}
#cat-grid .cat-pill-featured .cat-ico {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(150deg, #ffd699, #ff9d3d) !important;
  border: 1px solid rgba(255,180,84,.6) !important;
  color: #2a1400 !important;
  font-size: 18px !important;
  margin: 0 12px 0 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55) !important;
  animation: catFeatIcoPulse 2.6s ease-in-out infinite !important;
  z-index: 2 !important;
}
#cat-grid .cat-pill-featured .cat-ico svg {
  width: 21px !important;
  height: 21px !important;
  color: #2a1400 !important;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.3));
}
@keyframes catFeatIcoPulse {
  0%,100%{ transform: scale(1); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 8px rgba(255,180,84,.35); }
  50%{ transform: scale(1.07); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 18px rgba(255,180,84,.7); }
}
#cat-grid .cat-pill-featured .cat-pill-body { flex: 1; min-width: 0; z-index: 2; }
#cat-grid .cat-pill-featured .cat-name {
  color: var(--accent) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 40px !important;
}
#cat-grid .cat-pill-featured .cat-meta-rows { margin-top: 6px; }
#cat-grid .cat-pill-featured .cat-meta-label,
#cat-grid .cat-pill-featured .cat-meta-label b { color: #d8b98a !important; }
#cat-grid .cat-pill-featured .cat-meta-row strong { color: #ffd9a8 !important; }
#cat-grid .cat-pill-featured .cat-meta-row i { background: rgba(255,180,84,.22) !important; }
.cat-featured-badge {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 100px;
  background: var(--accent); color: #0a0a0a;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 10px rgba(255,180,84,.5);
  animation: catFeatBadgeFloat 2.6s ease-in-out infinite;
}
@keyframes catFeatBadgeFloat { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) {
  #cat-grid .cat-pill-featured,
  #cat-grid .cat-pill-featured::before,
  #cat-grid .cat-pill-featured .cat-ico,
  .cat-featured-badge { animation: none !important; }
}

@media (max-width: 480px) {
  #cat-grid.cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 0 14px !important; }
  #cat-grid .cat-pill { min-height: 108px !important; padding: 15px 14px 14px !important; }
  #cat-grid .cat-pill .cat-name { font-size: 15px !important; }
  #cat-grid .cat-meta-row { grid-template-columns: minmax(0,auto) minmax(4px, 1fr) minmax(0,auto) !important; gap: 4px !important; font-size: 11px !important; }
  #cat-grid .cat-meta-label { gap: 4px !important; }
  #cat-grid .cat-meta-label b { width: 11px !important; font-size: 11px !important; }
  #cat-grid .cat-meta-row strong { font-size: 11px !important; }

  #cat-grid .cat-pill-featured { padding: 16px 44px 14px 14px !important; }
  #cat-grid .cat-pill-featured .cat-name { font-size: 17px !important; }
  .cat-featured-badge { top: 10px; right: 10px; font-size: 9px; padding: 3px 7px; }
}

/* The grid container must never sit at opacity 0. The old reveal-on-scroll
   system (.reveal-up) could leave it permanently transparent on mobile:
   its IntersectionObserver threshold was never reached for an element this
   tall, so `.in` was never added and every card stayed invisible (but
   clickable). Force the container visible regardless of reveal classes. */
#cat-grid.cat-grid,
#cat-grid.cat-grid.reveal-up {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
}

/* The full card layout must not inherit the old pill entrance animation.
   Its `both` fill mode can retain an opacity of zero on mobile browsers. */
#cat-grid .cat-pill:not(.skel),
#cat-grid.in .cat-pill:not(.skel) {
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
#cat-grid .cat-pill:not(.skel) > *,
#cat-grid .cat-pill:not(.skel) .cat-pill-body > * {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================================
   16. TILT CARD 3D DEPTH (why-openhouse feature cards)
   ============================================================ */

.feature-card.tilt-card {
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transition: box-shadow 260ms ease-out;
}
.feature-card.tilt-card.tilting {
  transition: box-shadow 80ms linear;
}

/* ============================================================
   17. POPUP SCROLL MOTION BLUR (removed)
   ============================================================ */

.modal-overlay.open .modal {
  backface-visibility: hidden;
}

/* ============================================================
   18. PAGE PULL STRETCH / BOUNCE
   ============================================================ */

main#top {
  transform-origin: top center;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .feature-card.tilt-card { transition: none !important; }
  main#top { transform: none !important; transition: none !important; }
}

/* ============================================================
   19. ACTIVE NAV — SOFT GLOW + EXPAND + ROTATING GRADIENT RING
   ============================================================ */

.dock a {
  transition: transform 0.35s cubic-bezier(.22, 1.3, .36, 1);
}

.dock a.active {
  transform: scale(1.08);
}

.dock a.active svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 5px rgba(255, 180, 84, 0.75))
          drop-shadow(0 0 12px rgba(255, 180, 84, 0.35));
  animation: dockIconGlowPulse 2.6s ease-in-out infinite;
}

@keyframes dockIconGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(255, 180, 84, 0.75))
            drop-shadow(0 0 12px rgba(255, 180, 84, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 180, 84, 0.95))
            drop-shadow(0 0 18px rgba(255, 180, 84, 0.55));
  }
}

/* ============================================================
   20. TACTILE BUTTON INTERACTIONS
   ============================================================ */

.btn,
.btn-primary,
.btn-outline {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(.22, 1.3, .36, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.btn:hover,
.btn-primary:hover,
.btn-outline:hover {
  box-shadow: 0 0 18px rgba(255, 180, 84, 0.28),
              0 10px 24px -14px rgba(0, 0, 0, 0.55);
}

.btn:active,
.btn-primary:active,
.btn-outline:active {
  transform: scale(0.98) !important;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
  transform: scale(0);
  opacity: 0.55;
  pointer-events: none;
  animation: btnRippleOut 0.6s ease-out forwards;
  z-index: 0;
}

.btn > *,
.btn-primary > *,
.btn-outline > * {
  position: relative;
  z-index: 1;
}

@keyframes btnRippleOut {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ============================================================
   21. AMBIENT BACKGROUND — GLOWS, NOISE, VIGNETTE
   ============================================================ */

#ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ambient-glow {
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 84, 0.16), transparent 70%);
  filter: blur(20px);
  will-change: transform;
  animation: ambientFloat 26s ease-in-out infinite;
}

.ambient-glow.g1 {
  top: -12%;
  left: -12%;
  animation-duration: 27s;
}

.ambient-glow.g2 {
  top: 28%;
  right: -18%;
  background: radial-gradient(circle, rgba(255, 157, 61, 0.14), transparent 70%);
  animation-duration: 33s;
  animation-delay: -9s;
}

.ambient-glow.g3 {
  bottom: -18%;
  left: 22%;
  animation-duration: 30s;
  animation-delay: -17s;
}

@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4%, 6%) scale(1.08); }
  66% { transform: translate(-5%, -3%) scale(0.95); }
}

#ambient-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

#ambient-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .dock a.active,
  .dock a.active svg {
    animation: none !important;
  }
  .ambient-glow {
    animation: none !important;
  }
}
