/* games on /projects/: the kit link-card with a wide card image, plus the Arcade intro (#160) */
.game-card img { aspect-ratio: 640 / 264; }
.game-card .meta { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-top: auto; padding-top: 0.4rem; }
.arcade-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 1.5rem 0 2rem; }
.arcade-intro p { margin: 0; max-width: 60ch; color: var(--muted); }

/* featured row: a scroll-snap rail, swipeable on phones, with buttons and a pause for the auto-advance (#169) */
.rail { position: relative; }
.rail-bar { display: flex; gap: 0.5rem; justify-content: flex-end; margin-bottom: 0.75rem; }
.rail-bar { align-items: center; }
.rail-count { margin-right: auto; color: var(--muted); font-size: 0.9rem; }
.rail-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px; min-width: 2.75rem; height: 2.75rem; padding: 0 0.9rem; font: inherit; font-weight: 600; cursor: pointer; }
.rail-btn:hover, .rail-btn:focus-visible { border-color: var(--accent); }
.rail-track { list-style: none; margin: 0; padding: 0 0 0.75rem; display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-overflow-scrolling: touch; -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
.rail.at-end .rail-track { -webkit-mask-image: none; mask-image: none; }
.rail-track > li { flex: 0 0 clamp(250px, 24vw, 300px); scroll-snap-align: start; }
@media (max-width: 600px) { .rail-track > li { flex-basis: 78%; } .rail-btn:not(.rail-pause) { display: none; } .rail { margin-top: 1rem; } }

/* the Arcade: one continuous grid in rank order, a small genre tag on each card */
.game-tag { align-self: flex-start; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.6rem; }
/* The Arcade (#169): one compact stream of rows after the featured rail. Two columns on desktop, one on phones;
   each row is a small thumbnail, the genre tag, the title and one line, and the whole row is the link. */
.arcade-note { color: var(--muted); margin: 0 0 1rem; }
.arcade-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem 1.25rem; grid-auto-rows: 1fr; }
@media (max-width: 700px) { .arcade-list { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 0.6rem; } }
.game-row { display: flex; gap: 1rem; align-items: center; min-height: 4.5rem; height: 100%; box-sizing: border-box; padding: 0.6rem 0.9rem 0.6rem 0.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; }
.game-row:hover, .game-row:focus-visible { border-color: var(--accent); }
.game-row img { flex: none; width: 96px; height: auto; aspect-ratio: 640 / 264; object-fit: cover; border-radius: 6px; }
.game-row-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.game-row-body h3 { margin: 0; font-size: 1rem; }
.game-row-body p { margin: 0; color: var(--muted); font-size: 0.875rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-row-more { border-color: var(--accent); }
.game-row-more .game-row-body h3 { color: var(--accent); }

/* tap targets on /projects/ (#160): the card text links, the inline Arcade link and the video-group link are at least 44 px tall on phones */
@media (max-width: 700px) {
  .card .links a, .video-group-note a { display: inline-flex; align-items: center; min-height: 44px; }
  .lead a[href="#arcade"] { display: inline-block; padding: 0.6rem 0; }
}
