/* Shared swipe deck (public/swipe.js): cards stack, the top one moves with your finger. */
.deck { position: relative; display: grid; outline: none; margin-top: 16px; }
.deck:focus-visible { outline: 3px solid var(--script); outline-offset: 6px; border-radius: 24px; }
/* Cards only stack once swipe.js is running (it sets data-deck-ready). Without scripts they stay a plain,
   readable list, so every card and its buttons can be reached. */
.deck:not([data-deck-ready]) { gap: 16px; }
.deck[data-deck-ready] > .deck-card { grid-area: 1 / 1; touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; }
.deck[data-deck-ready] > .deck-card:not(.is-top) { transform: translateY(10px) scale(0.97); opacity: 0.6; pointer-events: none; }
.deck[data-deck-ready] > .deck-card:not(.is-top) ~ .deck-card:not(.is-top) { opacity: 0; }
.deck > .deck-card.gone { display: none; }
.deck > .deck-card.arrive { animation: deck-arrive .6s var(--ease) both; }
@keyframes deck-arrive { from { transform: translateY(10px) scale(0.97); opacity: .6; } to { transform: none; opacity: 1; } }
.deck-card.lean-right { box-shadow: 0 0 0 3px rgba(31, 122, 74, 0.35); }
.deck-card.lean-left { box-shadow: 0 0 0 3px rgba(106, 85, 70, 0.45); }
.deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .deck > .deck-card.arrive { animation: none; } }
.deck-actions .btn-solid, .deck-actions .btn-outline { white-space: nowrap; padding: 0 12px; font-size: 15px; letter-spacing: 0.02em; }

/* Drag feedback: the whole card fills green (right) or amber (left) the nearer it gets to the edge, with a soft
   mark in the middle. swipe.js sets --swipe-pull (0..1) and .pull-right / .pull-left. */
.deck[data-deck-ready] > .deck-card { position: relative; isolation: isolate; }
.deck[data-deck-ready] > .deck-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  display: grid; place-items: center; font: 700 64px/1 var(--f-body); color: #fff;
  opacity: calc(var(--swipe-pull, 0) * 0.92); transition: opacity .4s var(--ease, ease);
}
.deck[data-deck-ready] > .deck-card.pull-right::after { content: "\2713"; background: var(--ok, #1F7A4A); }
.deck[data-deck-ready] > .deck-card.pull-left::after { content: "\21BA"; background: var(--warn, #B5651D); }
.deck-card.lean-right, .deck-card.lean-left { box-shadow: none; }
