/* Game tiles, design A "Showcase" (Doug picked it 2026-10-19 from the tile mockups).
   Shared by the arcade home (index.html) and the games hub (games/index.html); loaded after each page's own
   tile rules so these win. Dark card, the game's picture on top with its first tag as a pill, title, a short
   pitch, the rest of the tags as plain text and a yellow Play pill. Every card in a row is the same height. */
@font-face { font-family: Unbounded; src: url(/fonts/unbounded-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

main .shelf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 600px) { main .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { main .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .arcade .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.shelf .tile.card { position: relative; display: flex; flex-direction: column; padding: 0; background: #1d2027; border: 0; border-radius: 20px; box-shadow: 0 0 0 1px #2c313b, 0 10px 24px #0000004d; overflow: hidden; }
.shelf .tile.card[hidden] { display: none; }
.shelf .tile.card:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--accent), 0 16px 32px #00000066; }
.shelf .tile.card:active { transform: translateY(1px); box-shadow: 0 0 0 2px var(--accent), 0 6px 14px #00000066; }
.shelf .tile.card.wide, .shelf .fav-wrap.wide { grid-column: auto; }
.shelf .tile.card.wide { grid-template-columns: none; }

/* The picture: 16:9, a soft fade into the card at the bottom, a slow zoom on hover. */
.shelf .tile .art, .shelf .tile.wide .art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 0; background: #1a1d23; }
.shelf .tile .art svg { width: 100%; height: 100%; transition: transform .35s ease; }
.shelf .tile:hover .art svg { transform: scale(1.04); }
.shelf .tile .art::after { content: ""; position: absolute; inset: auto 0 0; height: 16%; background: linear-gradient(#1d202700, #1d2027); pointer-events: none; }

.shelf .tile .body, .shelf .tile.wide .body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; column-gap: 12px; row-gap: 6px; padding: 12px 16px 16px; align-self: stretch; }
.shelf .tile .body > * + * { margin-top: 0; }
.shelf .tile h2, .shelf .tile h3, .shelf .tile.wide h2 { grid-column: 1 / -1; grid-row: 1; margin: 0; font-family: Unbounded, Fredoka, system-ui, sans-serif; font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.shelf .tile p { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 15px; line-height: 1.4; color: var(--soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.shelf .tile p.mine { grid-row: 3; display: block; color: var(--accent); font-size: 14px; }
.shelf .tile p.mine:empty { display: none; }

/* First tag sits on the picture as a pill; the others read as plain text under the pitch. */
.shelf .tile .tags { grid-column: 1; grid-row: 4; align-self: end; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 13px; }
.shelf .tile .tags span { background: none; border: 0; padding: 0; border-radius: 0; font-size: 13px; font-weight: 600; color: #b9b4a8; }
.shelf .tile .tags span:not(:first-child):not(:last-child)::after { content: "·"; margin: 0 6px; }
.shelf .tile .tags > :first-child { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 11px; border-radius: 999px; background: var(--accent); color: #14161b; font-weight: 700; box-shadow: 0 2px 10px #0006; }
.shelf .tile .tags > .hot:first-child { background: var(--pink); color: #fff; }
.shelf .tile .go, .shelf .tile.comeback .go { grid-column: 2; grid-row: 4; align-self: end; margin: 0; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--accent); color: #14161b; font-weight: 700; font-size: 15px; box-shadow: none; white-space: nowrap; }
.shelf .tile:hover .go { background: #fff1b8; }

@media (prefers-reduced-motion: reduce) { .shelf .tile .art svg { transition: none; } .shelf .tile:hover .art svg { transform: none; } }

/* Real screenshots replace the drawn card art (2026-11-10, scripts/card-shots.mjs). */
.shelf .tile .art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.shelf .tile:hover .art img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .shelf .tile .art img { transition: none; } .shelf .tile:hover .art img { transform: none; } }

/* Arcade home in sections by how finished each game is (Doug 2026-11-10): Play now, New and getting better,
   Party word game, Early access. Each tier is its own shelf; search and chips filter every tier, and a tier
   with nothing showing hides (arcade.js). */
.tier { margin: 0 0 30px; }
.tier[hidden] { display: none; }
.tier-head { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; row-gap: 4px; margin: 0 0 12px; }
.tier-h { margin: 0; font-family: Unbounded, Fredoka, system-ui, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.2; }
.tier-head p { grid-column: 1 / -1; margin: 0; color: var(--soft); font-size: 17px; }
.ready { display: inline-flex; gap: 4px; justify-self: start; }
.ready i { width: 14px; height: 8px; border-radius: 4px; background: #2c313b; }
.ready i.on { background: var(--accent); }
.tier-early .ready i.on { background: var(--teal); }
.tier-tv { grid-column: 1 / -1; justify-self: start; margin-top: 6px; padding: 10px 16px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; border-radius: 999px; background: transparent; color: var(--accent); font-weight: 700; font-size: 17px; box-shadow: 0 0 0 2px var(--accent) inset; }
.tier-tv:hover { background: #2c313b; color: var(--accent); }

/* Play now: one big card with a gold edge; picture beside the words on wider screens. */
.arcade .tier-now .shelf { grid-template-columns: minmax(0, 1fr); }
.tier-now .tile.card { box-shadow: 0 0 0 3px var(--accent), 0 12px 28px #00000066; }
.tier-now .tile h3 { font-size: 26px; }
.tier-now .tile p { font-size: 17px; -webkit-line-clamp: 4; line-clamp: 4; }
@media (min-width: 760px) {
  .tier-now .tile.card, .tier-party .tile.card, .tier-kids .tile.card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .tier-now .tile .art, .tier-party .tile .art, .tier-kids .tile .art { aspect-ratio: auto; min-height: 100%; }
  .tier-now .tile .art::after, .tier-party .tile .art::after, .tier-kids .tile .art::after { inset: 0 0 0 auto; width: 16%; height: auto; background: linear-gradient(90deg, #1d202700, #1d2027); }
  .tier-now .tile .body { padding: 22px 24px; }
}

/* New and getting better: six cards, 2 a row on phones, 3 a row from 1000px (always full rows). */
.arcade .tier-mid .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1000px) { .arcade .tier-mid .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 599px) {
  .tier-mid .tile p, .tier-mid .tile .tags > :not(:first-child) { display: none; }
  .tier-mid .tile .tags > :first-child { top: 8px; left: 8px; padding: 4px 9px; font-size: 12px; }
  .tier-mid .tile .body { padding: 8px 10px 12px; row-gap: 8px; }
  .tier-mid .tile h3 { font-size: 17px; }
  .tier-mid .tile .go { padding: 8px 16px; }
}

/* Party word game: Comeback on its own row. */
.arcade .tier-party .shelf, .arcade .tier-kids .shelf { grid-template-columns: minmax(0, 1fr); }
.tier-party .tile p, .tier-kids .tile p { font-size: 17px; }

/* Early access: compact rows, picture on the left. 1 a row on phones, 2 a row from 700px (10 games = full rows). */
.arcade .tier-early .shelf { grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 700px) { .arcade .tier-early .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tier-early .tile.card { flex-direction: row; align-items: stretch; border-radius: 16px; }
.tier-early .tile .art { flex: 0 0 38%; max-width: 200px; aspect-ratio: 16 / 9; align-self: center; }
.tier-early .tile .art::after { display: none; }
.tier-early .tile .tags { display: none; }
.tier-early .tile .body { padding: 8px 12px; row-gap: 4px; grid-template-rows: auto 1fr auto; }
.tier-early .tile h3 { font-size: 17px; }
.tier-early .tile p { -webkit-line-clamp: 2; line-clamp: 2; font-size: 15px; }
.tier-early .tile .go { grid-column: 1 / -1; grid-row: 3; justify-self: end; padding: 6px 16px; font-size: 15px; }

.find-tools { margin: 4px 0 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tier > .tier-tv { margin-top: 14px; }
/* The favorite star: on the picture's corner in the small cards, beside the title in the compact rows. */
@media (max-width: 599px) { .tier-mid .tile .tags { display: none; } .tier-mid .fav-btn { width: 40px; height: 40px; min-height: 40px; font-size: 22px; top: 6px; right: 6px; } }
.tier-early .tile .body { padding-right: 52px; }
.tier-early .fav-btn { width: 40px; height: 40px; min-height: 40px; font-size: 22px; top: 6px; right: 6px; }

/* Work in progress (Doug 2026-11-22: "put our new game on the adult arcade. As an unfinished work in progress"):
   its own row under Early access, one card, with a striped amber pill so nobody takes it for a finished game. */
.arcade .tier-wip .shelf { grid-template-columns: minmax(0, 1fr); }
.tier-wip .tile p { font-size: 17px; }
.tier-wip .ready i.on { background: #ffb238; }
.shelf .tile .tags span.wip:first-child { background: repeating-linear-gradient(135deg, #ffb238 0 10px, #f59e0b 10px 20px); color: #1a1208; font-size: 15px; font-weight: 800; }
@media (min-width: 760px) {
  .tier-wip .tile.card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .tier-wip .tile .art { aspect-ratio: auto; min-height: 100%; }
  .tier-wip .tile .art::after { inset: 0 0 0 auto; width: 16%; height: auto; background: linear-gradient(90deg, #1d202700, #1d2027); }
}
