mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
- Theme before paint: app/layout.jsx runs live hanzo.ai's own pre-paint script (localStorage "hanzo.appearance.painted", else prefers-color-scheme) and sets light/dark + t_light/t_dark, color-scheme and data-scheme; it re-applies when the device setting changes. Measured: "dark t_dark" at first paint, after hydration and after client navigation; no flash; JS off stays bright. theme-color follows the scheme (#0A0A0A dark, as live). No appearance switch: no captured live menu shows one, so no new words. - Tokens: html.dark gives --ink/--soft/--faint/--line/--card/--bg and Hanzo's --foreground/ --background/--primary/--border/--hover/--muted Hanzo's own dark values (public/hanzo.css: page #0d0d0d, text #e5e5e5, muted #a3a3a3, borders white 10%, #171717 / #0f0f0f / #262626 surfaces); rooms (system.css) too. New --x-raised/--x-on-ink/--x-fill/--x-sunk/--x-knob/--x-e10..15 replace hard-coded whites in shared rules (Hanzo already defines --card/--raised on inner elements, so the new names are prefixed). One-off greys keep their exact light value via light-dark(); html.light/html.dark pin color-scheme. - Dark-correct: cookie banner and preferences, announcement strip, sign-in buttons, buttons, search palette and scrims, menus and the menu feature card, sheets, drawers, pause buttons, related cards, every components/v2/*.css; the hero dot field draws in the page ink at 17% and redraws on a theme change. Hanzo's header and footer go dark through hanzo.css. - docs/DARK-MODE.md: how a page chat converts its pages; scripts/darkcheck.mjs (what is still bright in dark) and scripts/lightcheck.mjs (bright mode unchanged vs an older server). Checks: bright mode 0 computed-colour diffs vs the base commit on / /pricing /chat (1470, 375) and /enso /kai /api /affiliate /beta /about /dev /security /payments /models (1470); page text identical (only the live tokens/s counters move); 0 console/page errors in both modes on / /pricing /chat at 1470x801 and 375x812 (home's media requests to hanzo.ai are blocked in this sandbox, same in light); taste, unique OK; build exits 0 with HZ_LIVE_OFFLINE=1 (live figure hosts are blocked here). Page-owned CSS left for the page chats: /pricing .xpr-*, /chat .cht-*, home .xs-*/.xh-pause. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdxPteCvBL7f74SauJt
13 lines
1.3 KiB
CSS
13 lines
1.3 KiB
CSS
/* Unfold (v2, Story chat): the sheet a card opens into. See Unfold.jsx for usage. */
|
|
.v2u { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); }
|
|
.v2u-back { position: absolute; inset: 0; background: rgba(10, 10, 10, .32); }
|
|
.v2u-sheet { position: relative; width: min(1200px, 100%); max-height: calc(100svh - 2 * clamp(12px, 3vw, 40px)); overflow: hidden auto; overscroll-behavior: contain; background: var(--x-raised); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06); }
|
|
.v2u-in { padding: clamp(28px, 5vw, 72px); }
|
|
.v2u-x { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); background: var(--x-raised); color: #0a0a0a; display: grid; place-items: center; cursor: pointer; transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .2s; }
|
|
.v2u-x:hover { border-color: rgba(0, 0, 0, .22); transform: rotate(90deg); }
|
|
@media (max-width: 900px) {
|
|
.v2u { place-items: end stretch; padding: 8px 8px 0; }
|
|
.v2u-sheet { width: 100%; max-height: calc(100svh - 56px); border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) { .v2u-x { transition: none; } }
|