/* Touch + small screens: wording that matches the input, fat tap targets, the meme deck as a bottom stack,
   and a belt that keeps rolling when there's no keyboard to drive it. Desktop with a mouse is untouched. */

/* ---------- say "tap" to fingers, "type" to keyboards ---------- */

.tap-ui { display: none; }
@media (hover: none) and (pointer: coarse), (max-width: 599px) {
  .key-ui { display: none; }
  .tap-ui { display: revert; }
}

/* ---------- the meme "try it" key: a big keycap, only where ⌘C doesn't exist ---------- */

.btn-try {
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 18px 8px 8px;
  border: var(--line);
  border-radius: 14px;
  background: var(--butter);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 600;
  font-size: 17px;
  transition: transform 0.15s var(--out), box-shadow 0.15s var(--out);
}
.btn-try.tap-ui { display: none; }
@media (hover: none) and (pointer: coarse), (max-width: 599px) {
  .btn-try.tap-ui { display: inline-flex; }
}
.btn-try kbd {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 40px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 4px 0 var(--ink);
  font: 700 15px var(--tech);
  transition: transform 0.12s var(--spring), box-shadow 0.12s var(--spring);
}
.btn-try:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-try:active kbd { transform: translateY(4px) scale(1.03, 0.92); box-shadow: 0 0 0 var(--ink); transition-duration: 0.03s; }

/* ---------- tap targets on coarse pointers ---------- */

@media (pointer: coarse) {
  .pill-dl, .btn-ghost:not(.key-ui) { display: inline-flex; align-items: center; min-height: var(--tap); }
  .btn-dl { min-height: 52px; }
  .foot .hand a { display: inline-block; padding-block: 6px; }
}

/* ---------- conveyor belt: on touch nobody types, so it rolls on its own (taps still shove it) ---------- */

@keyframes belt-run { to { translate: -25% 0; } }
@media (hover: none) and (pointer: coarse) {
  .belt-track { animation: belt-run 60s linear infinite; }
}

/* ---------- meme deck on phones: cards slide up from the bottom and stack like a deck ---------- */

@media (max-width: 599px) {
  .meme-deck {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    display: grid;
    justify-items: center;
    align-items: end;
  }
  .meme {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: 84px 1fr;
    align-items: center;
    column-gap: 12px;
    width: min(380px, 100%);
    padding: 10px 14px 12px 10px;
    transition: translate 0.4s var(--spring), scale 0.4s var(--spring), opacity 0.3s;
  }
  .meme:nth-child(1) { z-index: 3; }
  .meme:nth-child(2) { z-index: 2; translate: 0 -14px; scale: 0.94; }
  .meme:nth-child(3) { z-index: 1; translate: 0 -26px; scale: 0.88; opacity: 0.85; }
  .meme-top { grid-column: 1 / -1; margin-bottom: 6px; }
  .meme-art { height: 64px; margin: 0; }
  .meme-art span { font-size: 19px; text-shadow: 2px 2px 0 var(--ink); }
  .meme p { font-size: 20px; line-height: 1.2; }
}
