/* Game list as colour tiles in one grid (web/arcade.html, rendered by games/hub.js). docs: owner picked "colour tiles". */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 14px 0 8px; }

/* Section colours: always-bright fills, the same in light and dark (like the site's yellow). */
.tl-play { --c: #4b55f5; --c2: #7b84ff; }
.tl-math { --c: #1f7fe0; --c2: #4fc3ff; }
.tl-words { --c: #13976a; --c2: #3fd197; }
.tl-think { --c: #7c4dff; --c2: #a585ff; }
.tl-art { --c: #d93b82; --c2: #ff7ab3; }
.tl-science { --c: #e0661f; --c2: #ffa25c; }
.tl-saudi { --c: #0b7a4b; --c2: #2fb879; }   /* my country packs: Saudi green */
.tl-world { --c: #0e8fa8; --c2: #3cc6dd; }   /* general knowledge: the world, flags… */

.tl-tile { position: relative; border: 0; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1 / 1.05; padding: 10px 8px; border-radius: 24px; text-align: center; text-decoration: none; color: #fff;
  background: linear-gradient(160deg, var(--c2), var(--c));
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 55%, #0a1330), inset 0 2px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, box-shadow .12s; }
.tl-tile:hover { transform: translateY(-3px); }
.tl-tile:active { transform: translateY(4px) scale(.96); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 55%, #0a1330), inset 0 2px 0 rgba(255, 255, 255, .35); }
.tl-tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.tl-tile .tl-e { font-size: 52px; line-height: 1; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .2)); }
.tl-tile .tl-e .tl-art { display: block; width: 1.2em; height: 1.2em; } /* a drawn picture instead of an emoji */
.tl-tile .tl-name { font: 700 17px/1.2 var(--font-display); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); overflow-wrap: anywhere; }
.tl-tile .tl-grade { position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(255, 255, 255, .92); color: #0a1330; font: 800 11px var(--font); padding: 1px 8px; border-radius: 999px; }
[lang="ar"] .tl-tile .tl-name { font-family: "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", var(--font-display); }

@media (max-width: 560px) {
  .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tl-tile { border-radius: 20px; gap: 5px; padding: 8px 4px; }
  .tl-tile .tl-e { font-size: 40px; }
  .tl-tile .tl-name { font-size: 13.5px; }
  .tl-tile .tl-grade { top: 5px; inset-inline-end: 5px; font-size: 10px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { .tl-tile { transition: none; } }
