@font-face {
  font-family: "Roboto Mono";
  src: url("/static/home-assets/roboto-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

#main-view:has(.swipes-page) {
  --swipes-card: 52svh;
  --swipes-reserve: 11.5rem;
  --stage-gap: 1rem;
  background: #f4f4f4;
  padding: .75rem .625rem calc(.75rem + env(safe-area-inset-bottom));
}
body:has(.swipes-page) .site-footer { display: none; }
.swipes-page .reference-swipes:not(.swipe-flight-layer) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stage-gap);
  width: 100%;
}
.swipes-page .swipe-deck {
  width: min(100%, var(--swipes-card), calc(100svh - var(--swipes-reserve)));
  min-width: min(100%, 14rem);
  margin-bottom: .625rem;
}

/* The flight layer receives the very same card while its successor rises. */
.reference-swipes .reference-swipe-card {
  gap: .625rem;
  border-radius: 1.875rem;
  padding: .75rem;
  box-shadow: 0 10px 40px rgb(0 0 0 / 18%);
}
.reference-swipes .reference-swipe-card .photo { border-radius: 1rem; }
.reference-swipes .reference-swipe-card .product-info { min-width: 0; padding: 0 .25rem; }
.reference-swipes .reference-swipe-card h2 {
  font: 500 .9375rem/1.375 Inter, sans-serif;
  letter-spacing: normal;
}
.reference-swipe-card h2 a { gap: .25rem; }
.reference-swipe-card h2 a:hover span { text-decoration: underline; text-underline-offset: .16em; }
.reference-swipe-card h2 .icon { width: 1.25rem; height: 1.25rem; color: inherit; stroke-width: 1.3; }
.reference-swipes .reference-swipe-card .price-line {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: .25rem 1rem;
  margin-top: .125rem;
  padding-top: .5rem;
  border-top: 1px dashed rgb(0 0 0 / 10%);
  align-items: start;
  font: 400 .625rem/1 Inter, sans-serif;
  letter-spacing: .05em;
  color: #999;
}
.reference-swipes .price-line > span { min-width: 0; overflow-wrap: anywhere; }
.reference-swipes .price-line > span:last-child { color: #b3b3b3; }
.reference-swipes .reference-swipe-card .price-line b {
  margin-top: .25rem;
  color: #111;
  font: 600 1.0625rem/1.25 "Roboto Mono", monospace;
  letter-spacing: normal;
  text-transform: none;
}
.reference-swipes .reference-swipe-card .price-line span:last-child b {
  color: #a6a6a6;
  font: 400 .9375rem/1.42 Inter, sans-serif;
}

.swipes-page .actions {
  --primary-width: 5.375rem;
  --primary-height: 3.5rem;
  --button-radius: 1.375rem;
  display: grid;
  grid-template-columns: minmax(2.5rem, 4rem) var(--primary-width) var(--primary-width) minmax(2.5rem, 4rem);
  width: 100%;
  gap: .375rem;
  align-items: center;
  margin: 0;
}
.swipes-page .actions > div { align-items: center; gap: 1rem; }
.swipes-page .actions .round-button {
  height: var(--primary-height);
  border-radius: var(--button-radius);
}
.swipes-page .actions .round-button:is(.reject, .save) { box-shadow: 0 8px 32px rgb(0 0 0 / 28%); }
.swipes-page .actions .round-button.reject { background: #000; color: #fff; }
.swipes-page .actions .round-button.save {
  background: linear-gradient(45deg, #9ce42b, #c4fa53);
  color: var(--ss-ink);
}
.swipes-page .round-button.reject .icon { width: 2.125rem; height: 2.125rem; stroke-width: 3.1; }
.swipes-page .round-button.save .icon { width: 2.5rem; height: 2.5rem; stroke-width: 1; }
.swipes-page .actions .round-button:is(.undo, .supplier) {
  width: 2.5rem; height: 2.5rem; margin: 0; border-radius: .75rem;
  background: #e9e9e9; color: #333;
}
.swipes-page .actions .round-button.undo .icon { width: 1.5rem; height: 1.5rem; stroke-width: 2.4; }
.swipes-page .actions .round-button[aria-disabled="true"] { opacity: .36; transform: none; cursor: default; }
.swipes-page .actions kbd { display: none; }
.swipes-page .supplier[aria-label="View on AliExpress"] .supplier-mark {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: .375rem;
  background: #eb3029;
  font-size: 0;
}
.swipes-page .supplier[aria-label="View on AliExpress"] .supplier-mark::before {
  inset: .22rem auto auto .29rem;
  width: .5rem; height: .34rem;
  border: 1.5px solid white; border-top: 0;
  border-radius: 0 0 .375rem .375rem;
}
.swipes-page .supplier:not([aria-label="View on AliExpress"]) .supplier-mark { background: transparent; color: inherit; font-size: 1rem; }
.swipes-page .supplier:not([aria-label="View on AliExpress"]) .supplier-mark::before { content: none; }

@media (min-width: 24rem) {
  #main-view:has(.swipes-page) { --swipes-reserve: 17rem; padding-inline: 1rem; }
  .reference-swipes .reference-swipe-card { padding: 1rem; }
  .reference-swipes .reference-swipe-card .product-info { padding-inline: .5rem; }
  .swipes-page .actions { --primary-width: 6.875rem; --primary-height: 4.375rem; --button-radius: 1.875rem; gap: .75rem; }
  .swipes-page .round-button.reject .icon { width: 2.5rem; height: 2.5rem; }
  .swipes-page .round-button.save .icon { width: 2.75rem; height: 2.75rem; }
}
@media (min-width: 40rem) {
  #main-view:has(.swipes-page) { --swipes-reserve: 17.5rem; --stage-gap: 1.5rem; padding-inline: 1.5rem; }
  .reference-swipes .reference-swipe-card .photo { border-radius: 1.5rem; }
}
@media (min-width: 64rem) {
  #main-view:has(.swipes-page) { --swipes-card: 50svh; --swipes-reserve: 13.5rem; }
  .reference-swipes .reference-swipe-card h2 { font-size: 1rem; }
}
@media (min-width: 80rem) {
  #main-view:has(.swipes-page) { --swipes-reserve: 18.5rem; --stage-gap: 2rem; padding-inline: 4vw; }
  .swipes-page .actions > div { height: 8.75rem; grid-template-rows: 1fr min-content; }
  .swipes-page .actions kbd {
    display: grid;
    border: 1px solid #c5c5c5;
    background: transparent;
    color: #bdbdbd;
    font-size: 0;
  }
  .swipes-page .actions kbd::before {
    content: "";
    width: .55rem; height: .55rem;
    background: currentColor;
    clip-path: polygon(6% 25%, 48% 25%, 48% 5%, 94% 50%, 48% 95%, 48% 75%, 6% 75%);
  }
  .swipes-page .undo + kbd::before { transform: rotate(90deg); }
  .swipes-page .reject + kbd::before { transform: rotate(180deg); }
  .swipes-page .supplier + kbd::before { transform: rotate(-90deg); }
}
@media (min-width: 96rem) {
  #main-view:has(.swipes-page) { --swipes-card: 37.5rem; }
}
.swipes-page .actions[hidden] { display: none; }
