/* ============================================================
   CANOPY — NO HOVER ON TOUCH
   ------------------------------------------------------------
   Phones/tablets keep sticky :hover after a tap — weird lifts,
   floods, and brightness flips. Kill hover chrome when the
   device can't hover (or only has a coarse pointer). Desktop
   fine-pointer hover stays as authored. :focus-visible untouched.
   ============================================================ */

@media (hover: none), (pointer: coarse) {
  /* --- kill lifts / filters --- */
  .pill-btn:hover,
  .flag-fab:hover,
  .flag-quick-close:hover,
  .flag-quick-send:hover,
  .guided-btn:hover,
  .browse-btn:hover,
  .cat-sticker:hover,
  body.alive #themes-overlay.on .cat-sticker.in-view:hover,
  .res-card:hover,
  .sheet-close:hover,
  .act:hover,
  .also-chip:hover,
  .refine-opt:hover,
  .tree-overlay .pill-btn:hover,
  .tree-choice:hover,
  .themes-overlay .pill-btn:hover,
  .menu-item:hover,
  .menu-mail-card:hover,
  .assist-choice:hover,
  .assist-strip .assist-choice:hover,
  .helper-info-btn:hover,
  .helper-cta:hover,
  .blob-label:hover,
  .blob-ai-btn:hover,
  .blob-ai-info:hover,
  .focus-back:hover,
  .focus-query:hover,
  body.has-blobs.is-browsing .focus-query:hover,
  body.has-blobs .menu-toggle-fixed:hover,
  .living-home:hover,
  .deck-nav-btn:hover,
  .deck-detail-back:hover,
  .search-clear:hover,
  .search-go:hover {
    transform: none !important;
    filter: none !important;
  }

  /* SOS rests at translateX(-50%) — only kill the lift */
  .sos:hover {
    transform: translateX(-50%) !important;
  }

  /* --- restore resting fills / colors --- */
  .pill-btn:hover {
    background: var(--surface, var(--milk)) !important;
    color: inherit !important;
  }
  .tree-overlay .pill-btn:hover {
    background: transparent !important;
    color: var(--milk) !important;
  }
  .themes-overlay .pill-btn:hover {
    background: transparent !important;
    color: var(--espresso) !important;
  }
  .guided-btn:hover {
    background: var(--espresso) !important;
    color: var(--milk) !important;
  }
  .browse-btn:hover {
    background: transparent !important;
    color: var(--espresso-60) !important;
  }
  .cat-sticker:hover,
  body.alive #themes-overlay.on .cat-sticker.in-view:hover {
    background: var(--surface, var(--milk)) !important;
    color: inherit !important;
  }
  .cat-sticker:hover .cat-count {
    color: var(--espresso-30) !important;
    opacity: 1 !important;
  }
  .cat-sticker:hover .cat-icon {
    background: var(--cat) !important;
    color: var(--cat-ink, #fff) !important;
    transform: none !important;
  }
  .res-card:hover {
    background: var(--surface, var(--milk)) !important;
  }
  .res-card:hover .cat-strip {
    width: 8px !important;
  }
  .sheet-close:hover,
  .also-chip:hover,
  .search-clear:hover,
  .flag-quick-close:hover,
  .focus-back:hover,
  .deck-nav-btn:hover,
  .deck-detail-back:hover {
    background: var(--surface, var(--milk)) !important;
    color: var(--espresso) !important;
  }
  .flag-quick-send:hover {
    background: var(--espresso) !important;
    border-color: var(--line) !important;
    color: var(--milk) !important;
  }
  .refine-opt:hover,
  .tree-choice:hover,
  .assist-choice:hover,
  .focus-query:hover,
  body.has-blobs.is-browsing .focus-query:hover,
  body.has-blobs .menu-toggle-fixed:hover,
  .living-home:hover {
    background: var(--surface, var(--milk)) !important;
    box-shadow: var(--shadow-soft, none) !important;
  }
  body.has-blobs.is-browsing .focus-query:hover,
  body.has-blobs .menu-toggle-fixed:hover,
  .living-home:hover {
    background: var(--surface, #fff8f2) !important;
  }
  .assist-strip .assist-choice:nth-child(3n+1):hover {
    background: color-mix(in srgb, var(--bleu) 18%, var(--surface, #fff8f2)) !important;
    color: var(--espresso) !important;
  }
  .assist-strip .assist-choice:nth-child(3n+2):hover {
    background: color-mix(in srgb, var(--miel) 22%, var(--surface, #fff8f2)) !important;
    color: var(--espresso) !important;
  }
  .assist-strip .assist-choice:nth-child(3n+3):hover {
    background: color-mix(in srgb, var(--terre) 12%, var(--surface, #fff8f2)) !important;
    color: var(--espresso) !important;
  }
  .assist-strip .assist-choice:hover .t-mark {
    background: var(--opt-fill, var(--bleu)) !important;
    transform: none !important;
  }
  .assist-strip .assist-choice:hover .t-sub,
  .assist-strip .assist-choice:hover .t-go {
    color: inherit !important;
    opacity: inherit;
  }
  .helper-info-btn:hover {
    background: var(--surface, var(--milk)) !important;
    color: var(--espresso) !important;
  }
  .helper-cta:hover {
    background: color-mix(in srgb, var(--bleu) 14%, var(--milk)) !important;
  }
  .crisis-leave:hover {
    color: var(--espresso-60) !important;
  }
  .convo-link:hover {
    color: inherit !important;
  }
  .search-go:hover {
    background: var(--terre) !important;
  }
  .blob-ai-info:hover {
    background: transparent !important;
  }

  /* Deck flood — keep active tint (never transparent) */
  .deck-settled .deck-card--option.is-active:hover .deck-card-frame {
    background: color-mix(in srgb, var(--cat, #f1c166) 34%, #fff8f2) !important;
    border: var(--line-soft, 1.5px solid color-mix(in srgb, var(--espresso) 22%, transparent)) !important;
  }
  .deck-settled .deck-card--option.is-active:hover .deck-card-body,
  .deck-settled .deck-card--option.is-active:hover .deck-card-cat,
  .deck-settled .deck-card--option.is-active:hover .deck-card-sub,
  .deck-settled .deck-card--option.is-active:hover .deck-card-desc,
  .deck-settled .deck-card--option.is-active:hover .deck-card-name {
    color: inherit !important;
    opacity: inherit;
  }
  .deck-settled .deck-card--option.is-active:hover .deck-card-hint {
    color: inherit !important;
    opacity: inherit;
  }
  .deck-settled .deck-card--option.is-active:hover .deck-card-mark {
    background: var(--cat, var(--miel)) !important;
    transform: none !important;
  }
  .deck-settled .deck-card--option.is-active:hover .deck-card-badges .badge {
    background: revert !important;
    border-color: revert !important;
    color: revert !important;
  }

  /* Magnetic / sticky hover chrome */
  [data-hover]:hover [data-hover-bounds] {
    transform: none !important;
  }

  /* Don't pause the ticker on sticky tap-hover */
  .ticker:hover .tick-track {
    animation-play-state: running !important;
  }
  .tick:hover {
    color: var(--espresso) !important;
    text-decoration: none !important;
  }
}
