/* Notes Mood Board Panel
   Unlike Budget/Packing (narrow corner overlays that share a slot and close
   each other), Notes replaces BOTH the editor and timeline columns while
   open, so it's a full-bleed overlay instead of a 425px side panel. */

.panel-notes {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  min-height: 0;
}

.panel-notes.collapsed {
  display: none;
}

/* A plain opacity transition can't play across a display:none boundary, but
   a CSS animation can — it just starts playing the moment the element
   begins rendering, which is exactly when .collapsed lifts. No JS timing
   needed. */
@keyframes notesPanelIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.panel-notes:not(.collapsed) {
  animation: notesPanelIn 0.18s ease;
}

/* In-app delete guard: no overlay/modal — the delete button itself arms
   into a "confirm" state on first click (js/modules/notesBoard.js), and a
   second click actually deletes. Disarms on outside click, Escape, or a
   short timeout. */
.notes-card-delete.armed {
  background: var(--danger-color, #d64545);
  border-color: var(--danger-color, #d64545);
  color: #fff;
  width: auto;
  padding: 0 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (min-width: 769px) {
  #panel-notes.panel-notes {
    position: absolute;
    inset: 0;
    /* Above .timeline-filter-wrapper.is-sticky-header (z-index 35) and
       .alt-hint-badge (z-index 100) — Notes is the full-viewport overlay, so
       it must out-rank all underlying deck controls and keyboard badges. */
    z-index: 120;
  }
}

@media (max-width: 768px) {

  /* Fixed, but inset from the HUD and bottom nav rather than inset:0 —
     both of those are themselves position:fixed (base.css:629, :~780), so
     covering their rect with inset:0 hid them behind the panel entirely.
     Sitting in the gap between them matches how Edit/Deck/Packing behave. */
  #panel-notes.panel-notes {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--mobile-hud-height, 125px) + var(--sandbox-banner-height, 0px) + var(--announcement-banner-height, 0px));
    bottom: calc(var(--mobile-nav-height, 60px) + env(safe-area-inset-bottom, 0px));
    z-index: 500;
  }

  body.hud-scrolled #panel-notes.panel-notes {
    top: calc(var(--mobile-hud-compact, 48px) + var(--sandbox-banner-height, 0px) + var(--announcement-banner-height, 0px));
  }

  /* base.css:694 hides every .panel on mobile by default and only reveals
     the one the bottom-nav switcher marks .active — Notes isn't part of
     that system (it opens from a header button, not a nav tab), so it needs
     its own !important to win against that blanket rule. */
  #panel-notes.panel-notes:not(.collapsed) {
    display: flex !important;
  }

  .notes-board-trip-dates {
    display: none !important;
  }
}

.notes-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  flex-shrink: 0;
  gap: 1rem;
}

.notes-header-info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}

.notes-header-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.notes-header-divider {
  color: var(--text-muted);
  font-size: 1.1rem;
  user-select: none;
}

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

/* Smaller sibling of .dashboard-search-box (css/dashboard.css) — same
   icon+input language, sized to sit in a compact header row next to the
   close button instead of spanning a toolbar. */
.notes-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-core);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 8px);
  padding: 0.4rem 0.65rem;
  width: 170px;
  color: var(--text-muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.notes-search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.notes-search-box svg {
  flex-shrink: 0;
}

.notes-search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
  min-width: 0;
  outline: none;
}

.notes-search-box input::placeholder {
  color: var(--text-muted);
}

/* Same visual treatment as the close button, so the two read as one control
   group rather than a mismatched pair — only the icon and pressed state
   differ. */
.notes-toggle-form-btn[aria-pressed="true"] {
  background: var(--editor-bg-active, rgba(255, 255, 255, 0.08));
  border-color: var(--border-focus, rgba(255, 255, 255, 0.25));
  color: var(--accent-flight, #3b82f6);
}

/* Which of the button's three children (see index.html) is visible is
   entirely CSS state below — notesBoard.js only ever toggles .is-editing /
   .is-add-note-mode as plain classes, never rewrites this markup. */
.notes-toggle-form-icon-board,
.notes-toggle-form-label {
  display: none;
}

@media (max-width: 768px) {

  /* The trip title/dates live in the header on desktop (plenty of room) but
     move down into the board area on mobile instead (see
     .notes-board-trip-title-mobile) — the cramped mobile header only has
     to fit "Notes" plus the toolbar controls this way. Both copies are kept
     in sync by the same renderBoardHeader() call in notesBoard.js; only one
     is ever visible at a time. */
  .notes-header-divider,
  .notes-board-trip-title {
    display: none !important;
  }

  /* This button IS the mobile add-note trigger (previously a separate
     button inside the board column) — "+ Add Note" by default, since
     .is-editing (toggled in enterEditor()/closeEditor(), notesBoard.js)
     isn't set until a note is actually open. There's no side-by-side board
     to widen on mobile, so the desktop expand-icon never applies here.
     !important because .btn-close-notes (shared with the close button)
     sets its own display, and — same specificity, later in the cascade —
     would otherwise win the tie and leave an empty icon-less button
     on screen instead of actually hiding/showing the right state. */
  .notes-toggle-form-icon-expand {
    display: none !important;
  }

  .notes-toggle-form-btn.is-editing .notes-toggle-form-icon-board {
    display: inline-flex !important;
  }

  .notes-toggle-form-btn:not(.is-editing) .notes-toggle-form-label {
    display: inline !important;
  }

  .notes-toggle-form-btn:not(.is-editing) {
    width: auto;
    padding: 0 0.65rem;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Collapses to just the magnifier (34px, matching the icon buttons either
     side of it) until notesBoard.js adds .is-expanded — on focus, on blur
     while a query is still typed (so an active filter never silently
     vanishes), or programmatically when tapped. Reaching full width would
     otherwise fight the toggle button and close button for a header that's
     already tight on mobile. */
  .notes-search-box {
    width: 34px;
    padding: 0.4rem;
    gap: 0;
    overflow: hidden;
    cursor: pointer;
    transition: width 0.18s ease, gap 0.18s ease;
  }

  .notes-search-box input {
    width: 0;
    opacity: 0;
    transition: opacity 0.12s ease;
  }

  .notes-search-box.is-expanded {
    width: 150px;
    gap: 0.5rem;
    cursor: text;
  }

  .notes-search-box.is-expanded input {
    width: 100%;
    opacity: 1;
  }

  /* The header (with the search box) stays mounted while .editing swaps in
     the full-screen form below it — search-box isn't a descendant of
     .notes-layout, so this reaches across via :has() rather than needing
     JS to toggle yet another class. Nothing to search while the board
     itself isn't even on screen. */
  #panel-notes:has(.notes-layout.editing) .notes-search-box {
    display: none;
  }

  .notes-board-trip-title-mobile {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .notes-board-trip-title-mobile:empty {
    display: none;
  }
}

@media (min-width: 769px) {
  .notes-board-trip-title-mobile {
    display: none;
  }
}

@media (min-width: 769px) {
  .notes-toggle-form-btn.is-add-note-mode .notes-toggle-form-icon-expand {
    display: none;
  }

  .notes-toggle-form-btn.is-add-note-mode .notes-toggle-form-label {
    display: inline;
  }

  /* Only the width needs to change; .btn-close-notes already gives it the
     matching icon-button look. */
  .notes-toggle-form-btn.is-add-note-mode {
    width: auto;
    padding: 0 0.75rem;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
  }
}

.btn-close-notes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--border-radius-sm, 8px);
  background: var(--bg-core);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.btn-close-notes:hover {
  background: var(--editor-bg-active, rgba(255, 255, 255, 0.08));
  border-color: var(--border-focus, rgba(255, 255, 255, 0.25));
  color: var(--accent-flight, #3b82f6);
  transform: scale(1.04);
}

.btn-close-notes:active {
  transform: scale(0.96);
}

.notes-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.notes-editor-col {
  width: 330px;
  flex-shrink: 0;
  padding: 1.25rem;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

/* 330px reads fine on a laptop, but is a sliver of dead-feeling whitespace
   on a large monitor — widens in steps alongside the board's own card-size
   breakpoints below (.notes-board) so the two grow in proportion rather
   than the editor staying fixed while cards balloon around it. The
   width-transition on .notes-editor-col (further down, for the
   hide-form toggle) picks these up automatically since it targets
   whatever the current computed width is, not a hardcoded value. */
@media (min-width: 1400px) {
  .notes-editor-col {
    width: 380px;
  }
}

@media (min-width: 1800px) {
  .notes-editor-col {
    width: 430px;
  }
}

.notes-editor-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius, 12px);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.notes-editor-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.notes-editor-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.notes-input,
.notes-textarea {
  width: 100%;
  /* Not --bg-core: in the default (Roadtrip) theme that's a fairly dark
     slate-gray meant for page background, not form fields — against a
     white panel it read as a dark, hard-to-read box. --editor-bg-high is
     the token the visual builder's own .form-input already uses for this
     exact purpose (see visual-builder.css). */
  background: var(--editor-bg-high, var(--bg-core));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 8px);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.6rem 0.75rem;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.notes-input::placeholder,
.notes-textarea::placeholder {
  color: var(--text-muted);
}

.notes-input:focus,
.notes-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background: var(--editor-bg-active, var(--bg-core));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.notes-input.input-invalid {
  border-color: var(--danger-color, #d64545) !important;
  box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.25) !important;
  animation: noteInputShake 0.3s ease;
}

@keyframes noteInputShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-4px);
  }

  40%,
  80% {
    transform: translateX(4px);
  }
}

.notes-textarea {
  flex: 1;
  min-height: 200px;
  resize: vertical;
  line-height: 1.5;
}

.notes-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.notes-board-col {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1.5rem;
  position: relative;
}

.notes-board-trip-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.notes-board-trip-title:empty,
.notes-board-trip-dates:empty {
  display: none;
}

.notes-board-trip-dates {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-core);
  padding: 0.15rem 0.5rem;
  border-radius: var(--border-radius-sm, 6px);
  border: 1px solid var(--border-color);
}

.notes-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  border: 2px dashed var(--border-color);
  border-radius: 1rem;
  margin: 1rem 0;
}

.notes-empty-state.hidden {
  display: none;
}

.notes-empty-icon {
  margin-bottom: 1rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.notes-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.notes-empty-desc {
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.4;
}

/* Desktop hide-form toggle (btn-toggle-notes-form, wired in notesBoard.js's
   setNotesFormHidden). Width/padding/opacity animate instead of a display
   swap — display:none can't transition, and this is deliberately a subtle
   "the board grows wider" motion, not a hard cut. overflow:hidden clips the
   form contents mid-collapse instead of them reflowing/wrapping oddly, and
   pointer-events:none stops an accidental click on a not-quite-collapsed
   field. notesBoard.js calls layoutBoard() again on transitionend so the
   masonry grid re-packs once the board's real width has settled, not mid-animation. */
.notes-editor-col {
  transition: width 0.22s ease, padding 0.22s ease, opacity 0.16s ease, border-color 0.22s ease;
}

@media (min-width: 769px) {
  .notes-layout.form-hidden .notes-editor-col {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    overflow: hidden;
    border-right-color: transparent;
    pointer-events: none;
  }
}

/* Mobile: board and editor are two swapped sub-screens, not side-by-side
   columns — there's no room for both. The header's toggle button (see the
   comment on .notes-toggle-form-btn above), Save/Cancel, and the browser
   back gesture (wired in notesBoard.js via history.pushState) are the ways
   back to the board. */
@media (max-width: 768px) {
  .notes-layout {
    flex-direction: column;
  }

  .notes-editor-col {
    display: none;
    width: 100%;
    border-right: none;
  }

  .notes-layout.editing .notes-editor-col {
    display: flex;
    animation: notesScreenIn 0.18s ease;
  }

  .notes-layout.editing .notes-board-col {
    display: none;
  }

  .notes-layout:not(.editing) .notes-board-col {
    animation: notesScreenIn 0.18s ease;
  }

  .notes-board-col {
    padding: 1rem;
  }
}

@keyframes notesScreenIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Masonry board — CSS Grid dense packing with JS-assigned row spans
   (js/modules/notesBoard.js:layoutBoard). Each card's height is fully known
   at render time (text content plus a fixed-aspect-ratio image box, never a
   loaded image's real dimensions), so this only runs once per render/resize. */
.notes-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: row dense;
  gap: 16px;
}

/* auto-fill packs in as many 220px-minimum columns as fit, then stretches
   them evenly to fill whatever's left over — on a large monitor that means
   a wall of narrow cards rather than a few comfortably large ones. Raising
   the minimum in step with the editor column's own width breakpoints
   above (.notes-editor-col) re-derives the column count for a wider
   board, rather than just stretching the same 220px-scaled cards further. */
@media (min-width: 1400px) {
  .notes-board {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1800px) {
  .notes-board {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
  }
}

/* Search (js/modules/notesBoard.js applyNotesSearchFilter) hides non-matches
   by class rather than removing/re-rendering cards — keeps drag-and-drop
   indices, metadata fetches, and loaded images all untouched, so clearing
   the search just un-hides everything exactly as it was. */
.notes-card.notes-search-hidden {
  display: none;
}

@media (max-width: 768px) {
  .notes-board {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.notes-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  /* cursor: pointer; */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.notes-card:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Cards fade/rise in as they're added to the board, rather than just
   popping into place — see notesBoard.js:buildCard. */
/* Uses the standalone `translate` property, not `transform` — a running (or,
   with fill-mode: both below, a finished-but-filling) CSS animation's
   contribution to a property wins over inline styles for as long as it
   holds, unlike a plain transition or class rule. layoutBoard()'s FLIP
   reflow animation (notesBoard.js) sets `transform` via inline style on
   every card indefinitely after mount, which this fill-mode animation
   would otherwise silently override forever — `translate` is a separate,
   independently-composited property (both apply together), so the two
   don't fight over the same slot. */
@keyframes notesCardIn {
  from {
    opacity: 0;
    translate: 0 6px;
  }

  to {
    opacity: 1;
    translate: 0;
  }
}

.notes-card {
  animation: notesCardIn 0.2s ease both;
}

.notes-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--card-inset, var(--bg-core));
  /* cursor: pointer; */
  /* .notes-card is a flex column — without this, a too-small span from a
     stale measurement (see notesBoard.js:layoutBoard) would flex-shrink the
     image box down to fit, and re-measuring THAT shrunk box would just lock
     the wrong size in permanently. Fixing this to its aspect-ratio height
     breaks that feedback loop; the text block absorbs any shortfall instead. */
  flex-shrink: 0;
}

/* Absolutely positioned, not width/height:100% — a replaced element sized
   with plain percentages inside an aspect-ratio parent can create a circular
   sizing dependency (the box ends up using the image's own intrinsic ratio
   instead of the fixed 4:3 one). Taking it out of flow removes that. */
.notes-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.notes-card-img-wrap.has-image .notes-card-img {
  opacity: 1;
}

/* Click affordances — which part of a link card does what isn't obvious
   from a bare image + text stack, so each clickable region gets its own
   small icon cue on hover (and always-on for touch, since there's no hover
   to reveal it). */
.notes-card-link-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.notes-card-img-wrap:hover .notes-card-link-badge,
.notes-card-link:hover .notes-card-link-badge {
  opacity: 1;
}

@media (pointer: coarse) {
  .notes-card-link-badge {
    opacity: 1;
  }
}

.notes-card-text {
  position: relative;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.notes-card-link .notes-card-text,
.notes-card-link .notes-card-img-wrap {
  cursor: pointer;
}

.notes-card-bubble .notes-card-text {
  cursor: pointer;
}

.notes-card-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.notes-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-card-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-line;
}

.notes-card-controls {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.65rem 0.65rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.notes-card:hover .notes-card-controls,
.notes-card:focus-within .notes-card-controls {
  opacity: 1;
}

.notes-card-control {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-core);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 6px);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.notes-card-control svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

.notes-card-control:hover {
  color: var(--text-primary);
  background: var(--bg-surface, rgba(255, 255, 255, 0.06));
}

.notes-card.dragging {
  opacity: 0.4;
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notes-card.drag-over {
  border-color: var(--accent-flight, #3b82f6);
  box-shadow: 0 0 0 2px var(--accent-flight, #3b82f6), 0 8px 24px rgba(59, 130, 246, 0.15);
}

.notes-card-handle {
  cursor: grab;
  touch-action: none;
}

.notes-card-handle:active {
  cursor: grabbing;
}

.notes-card-edit:hover {
  color: var(--accent-flight, #3b82f6);
  border-color: var(--accent-flight, #3b82f6);
}

.notes-card-delete:hover {
  color: var(--danger-color, #d64545);
  border-color: var(--danger-color, #d64545);
}

.notes-card-delete.armed {
  width: auto;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--danger-color, #d64545);
  border-color: var(--danger-color, #d64545);
  color: #fff;
}

.notes-card-delete.armed:hover {
  background: var(--danger-color, #d64545) !important;
  color: #fff !important;
}

/* Touch devices can't hover to reveal controls — keep them visible. */
@media (pointer: coarse) {
  .notes-card-controls {
    opacity: 1;
  }
}