# Visual Design Contract `AGENTS.md` is the canonical statement of the blank-canvas rule — check `app/routes/_index.tsx` and `app/global.css`, preserve any real UI/brand already there, and only treat the canvas as blank when those files still show the starter's placeholder. This file does not restate that rule; it records **this app's** visual direction. The fields below are the source of truth for that direction: once filled in, read and preserve them on every build; while they are still empty, the first substantial UI pass fills them in. ## Non-negotiable: impress by default When this app is still a blank canvas, every app generated from this template must look **spectacular on first load**, even when the build prompt gives no design direction. "Looks like a clean, intentional product" is the floor, not the goal. When no direction is supplied, you still commit to one — do not default to safe gray SaaS: - Commit to one concrete visual world (see the `frontend-design` skill and its `references/visual-direction.md`). Do not ship the neutral placeholder theme. - Choose a product-fitting accent family and set it in the `app/global.css` tokens for **both** light and dark. Never leave the 0%-saturation default as the shipped palette. - Establish a clear type hierarchy, a consistent spacing rhythm, and one signature detail (a considered empty state, a distinctive header, a crafted primary action) that makes the surface feel designed for its domain. - Get focus, hover, empty, loading, and dark-mode states right — that polish is the difference between an AI demo and a product. Pick a direction and execute it fully; never average toward generic SaaS. Once a direction is established and recorded below, preserve and extend it rather than starting over unless otherwise directed to. ## Fill in before building the first surface Once the fields below are filled in, they describe this app's established visual direction — read and preserve them on every subsequent build; do not re-derive a new direction. The first UI pass must fill these fields in as part of that build, not leave them as an empty template. - Product mode: `persuade` - Audience and cadence: indie film lovers browsing cinema details, occasional visits. - Visual world (name + the feeling it creates): Friendly midnight arthouse lobby; dark screen with a warm crimson glow, rounded and inviting. - Palette family + neutral undertone: deep crimson (#8F0808, #4C0404) on near-black #0D0D0D with warm #332B2B borders. - Type treatment: Inter for body and headings; 'Jersey 15' pixel face for the AlterFlixHub wordmark. - Composition: single-column page, 1224px max, image gallery, then 2-column info and sidebar cards. - Shape language: 12px rounded cards, pill tags, circular icon badges. - Anti-references (defaults this app must not drift toward): gray SaaS dashboards, light themes, sharp corners. ## Agent-Native is structural, not visual This shell already meets the Agent-Native contract: data in SQL, actions as the single source of truth, application state for navigation/selection, and real-time sync. **Chat and the agent rail are opt-in, not default.** Build the product UI first. Add an `AgentSidebar`, a full-page chat route, or `sendToAgentChat` handoffs only when the user asks for agent interaction — and when you do, follow `agent-native-toolkit` and `frontend-design` → Agent Surface And Page Boundaries so the surfaces are wired correctly. ## Guardrails - Keep semantic token names and shared component seams intact; express the direction through token _values_, type, spacing, and composition — not by forking the design system. - Density comes from data, not prose. Subtract explanatory chrome; never subtract the visual craft that makes the app impressive. - Compare against real products in the chosen mode, not against the starter. ## AlterFlixHub — ของจริงที่ใช้อยู่ (อัปเดต 2026-10-27) **แบรนด์:** แดง #8F0808, พื้นดำ #0D0D0D, การ์ด #1B1B1B, เส้นขอบ #2A2A2A/#332B2B โลโก้ฟอนต์ Jersey 15 (มีเฉพาะชื่อแบรนด์) · เนื้อหาไทยใช้ Inter + Noto Sans Thai **หน้าเว็บ** - `/` หน้าแรก: hero + ช่องค้นหา + การ์ดโรงหนัง (การ์ดมีรูป = รูปปก + gradient ทับให้ตัวหนังสืออ่านออก) - `/cinema/:slug` รายละเอียด: รูปใหญ่ + ป้ายหมวด + ข้อมูลเดินทาง/ติดต่อ/สิ่งอำนวยความสะดวก + "โรงหนังอิสระอื่นๆ" - `/admin` หลังบ้าน (ต้องล็อกอินที่ `/admin/login`): ฟอร์มแก้ข้อมูล, อัปโหลดรูป, ปุ่มซ่อน/แสดง, ลบโรง - `/single` เก็บหน้าเวอร์ชันเดิม (single-page + detail sheet) ไว้เทียบ **สถานะการซ่อน:** `hidden: true` ใน JSON = ไม่ขึ้นหน้าแรก/ตัวนับ แต่เปิดด้วย URL ตรงได้ และขึ้นป้าย "ซ่อนจากหน้าแรก" ที่หน้ารายละเอียด **รูปโรงหนัง:** เก็บไฟล์จริงที่ `public/images/theaters/` ผ่าน `/admin/image` (JPG/PNG/WebP/AVIF ≤ 6 MB) ใช้ `object-cover` + กันที่ด้วย aspect ratio (การ์ด 3:4 / รูปใหญ่ 269:202) → ไม่เกิด layout shift รูปการ์ดใช้ `loading="lazy"` (อยู่ใต้ fold) รูปใหญ่หน้ารายละเอียดโหลดทันที **คอนทราสต์ที่วัดแล้ว (WCAG)**: #B3B3B3/#111 = 8.9:1 · #e0b357/#2a1f00 = 8.4:1 · #ff9a9a/#111 = 9.4:1 · ขาว/#8F0808 = 9.1:1 — ผ่าน AA ทั้งหมด **PWA:** `public/sw.js` (network-first หน้าเว็บ + `/data/`, cache-first assets, ข้าม `/_agent-native/`), bump `CACHE_VERSION` เมื่อแก้ asset, manifest ผูก `/icon-192.svg` + `/icon-512.svg`