diff --git a/index.html b/index.html
index 5c71b501..b48f96ae 100644
--- a/index.html
+++ b/index.html
@@ -232,7 +232,7 @@
/* Categories */
.categories {
- display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
gap: 24px; max-width: 1200px; margin: 0 auto;
}
.category {
@@ -248,7 +248,7 @@
/* Featured Apps */
.apps-grid {
- display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
+ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
gap: 20px; max-width: 1200px; margin: 0 auto;
}
.app-card {
@@ -257,6 +257,7 @@
background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05);
transition: all 0.3s; text-decoration: none; color: inherit;
}
+ .app-card > :not(.app-icon):not(.app-icon-placeholder) { min-width: 0; overflow-wrap: anywhere; }
.app-card:hover { transform: translateY(-2px); border-color: rgba(108, 123, 255, 0.2); }
.app-icon-placeholder {
width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
diff --git a/tests/home-mobile-grid.test.mjs b/tests/home-mobile-grid.test.mjs
new file mode 100644
index 00000000..5a8c1a6e
--- /dev/null
+++ b/tests/home-mobile-grid.test.mjs
@@ -0,0 +1,15 @@
+import test from "node:test";
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import { fileURLToPath } from "node:url";
+
+const source = readFileSync(fileURLToPath(new URL("../index.html", import.meta.url)), "utf8");
+
+test("homepage category and app grids shrink below former 280/300px minimum", () => {
+ assert.match(source, /repeat\(auto-fit, minmax\(min\(100%, 280px\), 1fr\)\)/);
+ assert.match(source, /repeat\(auto-fill, minmax\(min\(100%, 300px\), 1fr\)\)/);
+ assert.doesNotMatch(source, /minmax\(280px, 1fr\)|minmax\(300px, 1fr\)/);
+});
+test("homepage app card text wraps without forcing flex overflow", () => {
+ assert.match(source, /\.app-card > :not\(\.app-icon\):not\(\.app-icon-placeholder\)\s*\{\s*min-width:\s*0;\s*overflow-wrap:\s*anywhere;/);
+});