/* Original motion styling: an actual three-card deck with a bottom pivot. */
.reference-swipes .swipe-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  isolation: isolate;
  perspective: 1200px;
}
.reference-swipes .swipe-deck::before,
.reference-swipes .swipe-deck::after { content: none; }
.swipe-deck .reference-swipe-card,
.swipe-flight-layer .reference-swipe-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  transform-origin: 50% 100%;
  backface-visibility: hidden;
  animation: none;
  transition: none;
  will-change: transform;
  box-shadow: 0 10px 40px rgb(0 0 0 / .18);
}
.swipe-deck .reference-swipe-card {
  grid-area: 1 / 1;
  align-self: start;
  width: 100%;
  cursor: grab;
}
.swipe-deck .reference-swipe-card[data-swipe-depth='0'] { z-index: 3; }
.swipe-deck .reference-swipe-card[data-swipe-depth='1'],
.swipe-deck .reference-swipe-card[data-swipe-depth='2'] {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
.swipe-deck .reference-swipe-card[data-swipe-depth='1'] {
  z-index: 2;
  transform: translate3d(0, 10px, 0) rotate(0deg) scale(.9);
}
.swipe-deck .reference-swipe-card[data-swipe-depth='2'] {
  z-index: 1;
  transform: translate3d(0, 20px, 0) rotate(0deg) scale(.8);
}
.swipe-deck[data-swipe-direction] .reference-swipe-card[data-swipe-depth='0'] { cursor: grabbing; }
.swipe-deck .product-photo,
.swipe-flight-layer .product-photo { flex: none; }
.swipe-deck .swipe-stamp,
.swipe-flight-layer .swipe-stamp {
  top: 28px;
  left: 28px;
  padding: 8px 16px;
  border-width: 3px;
  border-radius: 10px;
  background: rgb(255 255 255 / .92);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .08em;
  pointer-events: none;
}
.reference-swipes .actions { position: relative; z-index: 4; }
.reference-swipes .round-button {
  transform-origin: center;
  transition: transform 180ms cubic-bezier(.2,.8,.25,1), box-shadow 180ms ease, filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover:hover) {
  .reference-swipes .round-button:not(:disabled):hover { transform: translateY(-3px) scale(1.035); }
}
.reference-swipes .round-button:not(:disabled):active { transform: translateY(1px) scale(.92); }
.reference-swipes .round-button.save,
.reference-swipes .round-button.reject { box-shadow: 0 12px 24px rgb(0 0 0 / .12); }
.swipe-deck[data-swipe-direction='right'] ~ .actions .save,
.swipe-deck[data-swipe-direction='left'] ~ .actions .reject {
  transform: scale(1.08);
  filter: brightness(1.08);
  box-shadow: 0 14px 28px rgb(0 0 0 / .2);
}
.swipe-flight-layer.reference-swipes {
  position: fixed;
  inset: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}
.swipe-flight-layer .reference-swipe-card { pointer-events: none; margin: 0; }
.swipe-sr, .swipe-feedback:not(.error) {
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap;
}
#main-view:has(.swipes-page) {
  padding:clamp(16px,4svh,40px) 16px;
  min-height:100svh;
  display:grid;
  align-items:center;
  overflow:clip;
}
#main-view:has(.swipes-page) #route-root { width:100%; }
.swipes-page .reference-swipes:not(.swipe-flight-layer) {
  width:min(100%, 50svh, 360px);
  margin:0 auto;
}
.reference-swipes .reference-swipe-card {
  padding:16px; border-radius:24px; background:white;
  box-shadow:0 8px 24px #0002;
  user-select:none; -webkit-user-select:none;
}
.reference-swipes .reference-swipe-card .photo {
  border-radius:13px; background:white;
}
.reference-swipes .reference-swipe-card .photo img { object-fit:contain; }
.reference-swipes .reference-swipe-card .product-info { padding:14px 1px 0; }
.reference-swipes .reference-swipe-card h2 { margin:0; font:600 17px/1.35 Inter,sans-serif; letter-spacing:-.025em; }
.reference-swipe-card h2 a { display:flex; align-items:center; width:fit-content; max-width:100%; gap:6px; }
.reference-swipe-card h2 a span { white-space:nowrap; text-overflow:ellipsis; overflow:hidden; min-width:0; }
.reference-swipe-card h2 .icon { order:-1; width:17px; height:17px; color:#777; }
.reference-swipes .reference-swipe-card .price-line {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
  margin-top:12px; border-top:1px solid #e6e6e6; padding-top:10px;
  color:#666; text-transform:uppercase; font:600 10px/1.4 Inter,sans-serif; letter-spacing:.05em;
}
.reference-swipes .reference-swipe-card .price-line b {
  font:600 17px/1.35 Inter,sans-serif; letter-spacing:-.025em; margin-top:2px;
}
.swipes-page .actions {
  display:grid; grid-template-columns:40px minmax(50px,110px) minmax(50px,110px) 40px;
  align-items:end; gap:clamp(5px,1.7vw,12px); margin-top:40px;
}
.swipes-page .actions > div { display:grid; justify-items:center; gap:12px; }
.swipes-page .actions .round-button {
  width:100%; height:70px; border-radius:100px; padding:0; touch-action:manipulation;
}
.swipes-page .round-button.reject { background:#141414; color:white; }
.swipes-page .round-button.save { background:linear-gradient(115deg,#9749fc,#f6459a); color:white; }
.swipes-page .round-button.save .icon { fill:currentColor; }
.swipes-page .round-button:is(.reject,.save) .icon { width:30px; height:30px; stroke-width:2.1; }
.swipes-page .actions .round-button:is(.undo,.supplier) { width:40px; height:40px; margin-block:15px; }
.swipes-page .actions .round-button.undo .icon { width:19px; height:19px; }
.swipes-page .actions kbd { display:grid; place-items:center; width:26px; height:26px; border:1px solid #ddd; border-radius:6px; color:#777; background:#fff; font:14px/1 Inter,sans-serif; }
.supplier-mark { position:relative; display:grid; place-items:center; width:18px; height:18px; border-radius:3px; background:#f32d21; color:white; font:700 10px/1 Arial,sans-serif; letter-spacing:-.07em; }
.supplier-mark::before { content:""; position:absolute; width:7px; height:5px; border:1.5px solid #f32d21; border-bottom:0; border-radius:5px 5px 0 0; top:-3px; }
.swipe-feedback.error { margin-top:1rem; color:#9d2435; text-align:center; font-size:.875rem; }
.swipes-page .empty { text-align:center; }
.swipes-page .swipe-deck > .count { margin:0; padding:5rem 1rem; text-align:center; }
@media(max-width:1023px) {
  #main-view:has(.swipes-page) { min-height:calc(100svh - 64px); }
}
@media (hover:none), (max-width:600px) {
  .swipes-page .actions kbd { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-deck .reference-swipe-card[data-swipe-depth='0'] { transform: none !important; }
  .swipe-deck .reference-swipe-card[data-swipe-depth='1'] { transform: translateY(10px) scale(.9) !important; }
  .swipe-deck .reference-swipe-card[data-swipe-depth='2'] { transform: translateY(20px) scale(.8) !important; }
  .reference-swipes .round-button { transition: none; transform: none !important; }
  .swipe-flight-layer { display: none; }
}
