html[data-cor-entrada] #enter.entrance-main {
  background: var(--botao-entrada);
  color: var(--texto-entrada);
}
html[data-cor-entrada] #enter .entrance-arrow {
  background: var(--texto-entrada);
  color: var(--botao-entrada);
}
html[data-cor-adicionar] .buy button[data-add],
html[data-cor-adicionar] #sheet[data-order] .order-primary {
  background: var(--botao-adicionar);
  color: var(--texto-adicionar);
}
html[data-cor-adicionar] #sheet[data-order] .order-primary span:last-child {
  color: inherit;
}

/* A sombra acompanha as linhas do prato e se dissipa antes dos controles. */
.dish-info::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -40px calc(-1 * var(--feed-edge, var(--dish-edge, 24px))) -28px;
  background: linear-gradient(to bottom, transparent, rgb(0 0 0 / 53%) 40px,
    rgb(0 0 0 / 44%) calc(100% - 90px), rgb(0 0 0 / 18%) calc(100% - 46px), transparent);
}
@media (min-width: 760px) {
  html[data-layout="editorial"] .dish-info::before {
    mask-image: linear-gradient(to right, black 0, black min(65%, 39rem), transparent max(85%, 48rem));
  }
}
#categories button:not(.active) {
  background: var(--fundo-categoria-video);
  text-shadow: 0 1px 2px #0006;
}
.buy button[data-add]:active { box-shadow: inset 0 0 0 99px rgb(0 0 0 / 8%); }

/* O primeiro quadro cobre o decodificador até o vídeo apresentar uma imagem. */
.slide > .dish-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* A dica ocupa o intervalo entre as ações do prato e a barra de reprodução. */
#feed { --guided-dish-bottom: max(var(--dish-bottom), calc(var(--video-bar-bottom) + 64px)); }
#rail.swipe-peek > .slide:first-child .dish-info { bottom: var(--guided-dish-bottom); }
#swipe-tip {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  top: calc(100% - var(--guided-dish-bottom));
  bottom: var(--video-bar-bottom);
  margin: auto;
  width: max-content;
  height: max-content;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 30px;
  background: rgba(19, 23, 20, .76);
  color: white;
  font: 500 13px/1.3 system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
#swipe-tip .swipe-glyph { display: grid; place-items: center; width: 16px; height: 17px; }
#swipe-tip svg { width: 16px; height: 16px; }
.swipe-glyph::after {
  content: ""; width: 2px; height: 6px; border-radius: 2px;
  background: currentColor; grid-area: 1/1; transform: translateY(2px);
}
.swipe-glyph svg { grid-area: 1/1; }

@media (prefers-reduced-motion: no-preference) {
  #feed { --peek-distance: clamp(-29px, -3.5dvh, -17px); }
  #rail.swipe-peek { scroll-snap-type: none; }
  #rail.swipe-peek > .slide:nth-child(-n+2) { animation: peek-next-dish 1.24s .32s both; }
  html[data-layout="editorial"] #swipe-tip { --hint-travel: calc(var(--peek-distance) / 2); }
  #rail.swipe-peek + #swipe-tip { animation: swipe-hint 2.55s both, follow-peek 1.24s .32s both; }
  #rail.swipe-peek + #swipe-tip .swipe-glyph { animation: trace-swipe 1.24s .32s both; }
  @keyframes peek-next-dish {
    0% { transform: translateY(0); animation-timing-function: cubic-bezier(.2,.68,.28,1); }
    46% { transform: translateY(var(--peek-distance)); animation-timing-function: cubic-bezier(.33,0,.22,1); }
    100% { transform: translateY(0); }
  }
  @keyframes follow-peek {
    0% { translate: 0 0; animation-timing-function: cubic-bezier(.2,.68,.28,1); }
    46% { translate: 0 var(--hint-travel, var(--peek-distance)); animation-timing-function: cubic-bezier(.33,0,.22,1); }
    100% { translate: 0 0; }
  }
  @keyframes swipe-hint {
    0% { opacity: 0; transform: translateY(5px); animation-timing-function: ease-out; }
    12%, 82% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-3px); }
  }
  @keyframes trace-swipe {
    0% { transform: translateY(2px); opacity: .65; animation-timing-function: ease-out; }
    44% { transform: translateY(-3px); opacity: 1; animation-timing-function: ease-in-out; }
    100% { transform: translateY(0); opacity: 1; }
  }
}
