feat(web): iPhone PWA fixes (M1) + warm RTO redesign (M2)
M1 — PWA mechanics: - Generate real app icons (apple-touch-icon + manifest 192/512/maskable) via pure-stdlib gen_icons.py; iOS uses apple-touch-icon, not manifest icons. - viewport-fit=cover + env(safe-area-inset-*) on header/input/menu so content clears the notch and home indicator. - Dynamic height pinned to the VisualViewport (height + offsetTop, re-measured across the keyboard animation) so the input stays above the iOS keyboard; 100dvh fallback. Kills the squish/gap bugs in standalone mode. - overscroll containment; flesh out manifest (scope, portrait, maskable). M2 — visual redesign: - Realign style.css to the warm low-glow RTO palette already used by the standalone pages (#0e0e0e panels, #2a1d12 borders); remove the neon saturated-orange borders and ~15 glow shadows. - Reserve filled accent for one element (Send); glow only on status pulse + input focus. Flat warm message bubbles with tail corners. - Reclaim the mobile header into [≡] Lyra · [status dot]; drop the redundant status bar (relay status now the header dot, updated in checkHealth). - prefers-reduced-motion support; fix undefined var(--text); real light-mode tokens. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,75 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate Lyra PWA icons with no third-party deps (pure stdlib PNG writer).
|
||||||
|
|
||||||
|
Design: RTO warm/low-glow — near-black field, a soft orange ambient glow, and a
|
||||||
|
luminous gold-orange ring (the "orb/portal"). iOS masks corners itself, so icons
|
||||||
|
are full-bleed squares. Run from anywhere; writes PNGs into ./static.
|
||||||
|
"""
|
||||||
|
import math
|
||||||
|
import os
|
||||||
|
import struct
|
||||||
|
import zlib
|
||||||
|
|
||||||
|
HERE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "static")
|
||||||
|
|
||||||
|
BG = (7, 7, 7) # #070707
|
||||||
|
ORANGE = (255, 122, 0) # #ff7a00 accent
|
||||||
|
GOLD = (255, 179, 71) # #ffb347 hot core
|
||||||
|
|
||||||
|
|
||||||
|
def _png(width, height, rgb_rows):
|
||||||
|
def chunk(tag, data):
|
||||||
|
return (struct.pack(">I", len(data)) + tag + data
|
||||||
|
+ struct.pack(">I", zlib.crc32(tag + data) & 0xFFFFFFFF))
|
||||||
|
|
||||||
|
raw = bytearray()
|
||||||
|
for row in rgb_rows:
|
||||||
|
raw.append(0) # filter type 0 (None)
|
||||||
|
raw.extend(row)
|
||||||
|
ihdr = struct.pack(">IIBBBBB", width, height, 8, 2, 0, 0, 0) # 8-bit RGB
|
||||||
|
return (b"\x89PNG\r\n\x1a\n"
|
||||||
|
+ chunk(b"IHDR", ihdr)
|
||||||
|
+ chunk(b"IDAT", zlib.compress(bytes(raw), 9))
|
||||||
|
+ chunk(b"IEND", b""))
|
||||||
|
|
||||||
|
|
||||||
|
def render(n):
|
||||||
|
c = (n - 1) / 2.0
|
||||||
|
sigma_glow = n * 0.30
|
||||||
|
ring_r = n * 0.30
|
||||||
|
ring_w = n * 0.050
|
||||||
|
core_sigma = n * 0.11
|
||||||
|
rows = []
|
||||||
|
for y in range(n):
|
||||||
|
row = bytearray()
|
||||||
|
for x in range(n):
|
||||||
|
dx, dy = x - c, y - c
|
||||||
|
d = math.hypot(dx, dy)
|
||||||
|
r, g, b = BG
|
||||||
|
# ambient orange glow
|
||||||
|
glow = math.exp(-(d * d) / (2 * sigma_glow * sigma_glow)) * 0.50
|
||||||
|
# soft hot core
|
||||||
|
core = math.exp(-(d * d) / (2 * core_sigma * core_sigma)) * 0.45
|
||||||
|
# luminous ring
|
||||||
|
rr = d - ring_r
|
||||||
|
ring = math.exp(-(rr * rr) / (2 * ring_w * ring_w))
|
||||||
|
r += ORANGE[0] * glow + GOLD[0] * (ring + core)
|
||||||
|
g += ORANGE[1] * glow + GOLD[1] * (ring + core)
|
||||||
|
b += ORANGE[2] * glow + GOLD[2] * (ring + core)
|
||||||
|
row += bytes((min(255, int(r)), min(255, int(g)), min(255, int(b))))
|
||||||
|
rows.append(row)
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def write(name, n):
|
||||||
|
rows = render(n)
|
||||||
|
with open(os.path.join(HERE, name), "wb") as f:
|
||||||
|
f.write(_png(n, n, rows))
|
||||||
|
print(f"wrote {name} ({n}x{n})")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
write("icon-512.png", 512)
|
||||||
|
write("icon-192.png", 192)
|
||||||
|
write("apple-touch-icon.png", 180)
|
||||||
|
write("icon-maskable-512.png", 512)
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
@@ -5,10 +5,14 @@
|
|||||||
<title>Lyra Core Chat</title>
|
<title>Lyra Core Chat</title>
|
||||||
<link rel="stylesheet" href="style.css" />
|
<link rel="stylesheet" href="style.css" />
|
||||||
<!-- PWA -->
|
<!-- PWA -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||||
<meta name="mobile-web-app-capable" content="yes" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Lyra" />
|
||||||
|
<meta name="theme-color" content="#070707" />
|
||||||
|
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
|
||||||
|
<link rel="icon" type="image/png" href="icon-192.png" />
|
||||||
<link rel="manifest" href="manifest.json" />
|
<link rel="manifest" href="manifest.json" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -55,6 +59,8 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
</button>
|
</button>
|
||||||
|
<span class="brand">Lyra</span>
|
||||||
|
<span class="brand-dot" id="brandDot" title="Relay status"></span>
|
||||||
<label for="mode">Mode:</label>
|
<label for="mode">Mode:</label>
|
||||||
<select id="mode">
|
<select id="mode">
|
||||||
<option value="standard">Standard</option>
|
<option value="standard">Standard</option>
|
||||||
@@ -412,16 +418,56 @@
|
|||||||
if (resp.ok) {
|
if (resp.ok) {
|
||||||
document.getElementById("status-dot").className = "dot ok";
|
document.getElementById("status-dot").className = "dot ok";
|
||||||
document.getElementById("status-text").textContent = "Relay Online";
|
document.getElementById("status-text").textContent = "Relay Online";
|
||||||
|
document.getElementById("brandDot").className = "brand-dot ok";
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Bad status");
|
throw new Error("Bad status");
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
document.getElementById("status-dot").className = "dot fail";
|
document.getElementById("status-dot").className = "dot fail";
|
||||||
document.getElementById("status-text").textContent = "Relay Offline";
|
document.getElementById("status-text").textContent = "Relay Offline";
|
||||||
|
document.getElementById("brandDot").className = "brand-dot fail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
// --- PWA: track the *visible* viewport height so the layout follows the
|
||||||
|
// iOS keyboard and the dynamic Safari toolbars (keeps the input bar visible
|
||||||
|
// instead of hiding behind the keyboard). Falls back to 100dvh via CSS.
|
||||||
|
function setAppHeight() {
|
||||||
|
const vv = window.visualViewport;
|
||||||
|
const h = (vv && vv.height) || window.innerHeight;
|
||||||
|
const off = (vv && vv.offsetTop) || 0;
|
||||||
|
const root = document.documentElement.style;
|
||||||
|
root.setProperty("--app-height", h + "px");
|
||||||
|
// iOS pans the visual viewport when the keyboard opens; follow its top
|
||||||
|
// edge so the pinned #chat sits exactly in the visible area.
|
||||||
|
root.setProperty("--app-offset", off + "px");
|
||||||
|
}
|
||||||
|
// Re-measure across the keyboard animation: iOS reports a stale (too-short)
|
||||||
|
// height mid-animation, so sample a few times until it settles.
|
||||||
|
function nudgeAppHeight() {
|
||||||
|
setAppHeight();
|
||||||
|
[50, 150, 300, 550].forEach((t) => setTimeout(setAppHeight, t));
|
||||||
|
}
|
||||||
|
setAppHeight();
|
||||||
|
if (window.visualViewport) {
|
||||||
|
window.visualViewport.addEventListener("resize", nudgeAppHeight);
|
||||||
|
window.visualViewport.addEventListener("scroll", setAppHeight);
|
||||||
|
}
|
||||||
|
window.addEventListener("resize", nudgeAppHeight);
|
||||||
|
window.addEventListener("orientationchange", nudgeAppHeight);
|
||||||
|
|
||||||
|
// Keep the latest message in view when the keyboard opens/closes.
|
||||||
|
const userInputEl = document.getElementById("userInput");
|
||||||
|
userInputEl.addEventListener("focus", () => {
|
||||||
|
nudgeAppHeight();
|
||||||
|
setTimeout(() => {
|
||||||
|
const m = document.getElementById("messages");
|
||||||
|
m.scrollTo({ top: m.scrollHeight, behavior: "smooth" });
|
||||||
|
}, 350);
|
||||||
|
});
|
||||||
|
userInputEl.addEventListener("blur", nudgeAppHeight);
|
||||||
|
|
||||||
// Mobile Menu Toggle
|
// Mobile Menu Toggle
|
||||||
const hamburgerMenu = document.getElementById("hamburgerMenu");
|
const hamburgerMenu = document.getElementById("hamburgerMenu");
|
||||||
const mobileMenu = document.getElementById("mobileMenu");
|
const mobileMenu = document.getElementById("mobileMenu");
|
||||||
|
|||||||
@@ -1,20 +1,33 @@
|
|||||||
{
|
{
|
||||||
"name": "Lyra Chat",
|
"name": "Lyra",
|
||||||
"short_name": "Lyra",
|
"short_name": "Lyra",
|
||||||
|
"description": "Lyra — chat, mind, journal, and poker copilot.",
|
||||||
"start_url": "./index.html",
|
"start_url": "./index.html",
|
||||||
|
"scope": "./",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "#181818",
|
"display_override": ["standalone", "minimal-ui"],
|
||||||
"theme_color": "#181818",
|
"orientation": "portrait",
|
||||||
|
"background_color": "#070707",
|
||||||
|
"theme_color": "#070707",
|
||||||
|
"categories": ["productivity", "utilities"],
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "icon-192.png",
|
"src": "icon-192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "icon-512.png",
|
"src": "icon-512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "icon-maskable-512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+218
-113
@@ -1,31 +1,61 @@
|
|||||||
:root {
|
:root {
|
||||||
--bg-dark: #070707;
|
--bg-dark: #070707;
|
||||||
--bg-panel: rgba(255, 122, 0, 0.1);
|
--bg-elev: #0e0e0e;
|
||||||
|
--bg-line: #141414;
|
||||||
|
--bg-panel: #0e0e0e;
|
||||||
|
--border: #2a1d12;
|
||||||
|
--border-bright: #4a2f15;
|
||||||
--accent: #ff7a00;
|
--accent: #ff7a00;
|
||||||
--accent-glow: 0 0 6px rgba(255,122,0,0.28);
|
--gold: #ffb347;
|
||||||
|
--good: #8fd694;
|
||||||
|
--bad: #ff5a5a;
|
||||||
|
--accent-soft: rgba(255, 122, 0, 0.10);
|
||||||
|
--accent-glow: 0 0 6px rgba(255, 122, 0, 0.18);
|
||||||
--text-main: #e8e8e8;
|
--text-main: #e8e8e8;
|
||||||
--text-fade: #999;
|
--text-fade: #8a8a8a;
|
||||||
--font-console: "IBM Plex Mono", monospace;
|
--font-console: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||||
|
--font-voice: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Light mode variables */
|
/* Light mode (secondary — Brian runs dark) */
|
||||||
body {
|
body {
|
||||||
--bg-dark: #f5f5f5;
|
--bg-dark: #f5f3ef;
|
||||||
--bg-panel: rgba(255, 122, 0, 0.05);
|
--bg-elev: #ffffff;
|
||||||
--accent: #ff7a00;
|
--bg-line: #ece8e1;
|
||||||
--accent-glow: 0 0 6px rgba(255,122,0,0.28);
|
--bg-panel: #ffffff;
|
||||||
|
--border: #e2dacb;
|
||||||
|
--border-bright: #c9a87a;
|
||||||
|
--accent: #c75e00;
|
||||||
|
--gold: #b8791f;
|
||||||
|
--good: #3f9a52;
|
||||||
|
--bad: #c0392b;
|
||||||
|
--accent-soft: rgba(199, 94, 0, 0.08);
|
||||||
|
--accent-glow: none;
|
||||||
--text-main: #1a1a1a;
|
--text-main: #1a1a1a;
|
||||||
--text-fade: #666;
|
--text-fade: #6a6a6a;
|
||||||
|
--text: var(--text-main); /* alias: some rules reference var(--text) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode variables */
|
/* Dark mode (primary — RTO warm low-glow) */
|
||||||
body.dark {
|
body.dark {
|
||||||
--bg-dark: #070707;
|
--bg-dark: #070707;
|
||||||
--bg-panel: rgba(255, 122, 0, 0.1);
|
--bg-elev: #0e0e0e;
|
||||||
|
--bg-line: #141414;
|
||||||
|
--bg-panel: #0e0e0e;
|
||||||
|
--border: #2a1d12;
|
||||||
|
--border-bright: #4a2f15;
|
||||||
--accent: #ff7a00;
|
--accent: #ff7a00;
|
||||||
--accent-glow: 0 0 6px rgba(255,122,0,0.28);
|
--gold: #ffb347;
|
||||||
|
--good: #8fd694;
|
||||||
|
--bad: #ff5a5a;
|
||||||
|
--accent-soft: rgba(255, 122, 0, 0.10);
|
||||||
|
--accent-glow: 0 0 6px rgba(255, 122, 0, 0.18);
|
||||||
--text-main: #e8e8e8;
|
--text-main: #e8e8e8;
|
||||||
--text-fade: #999;
|
--text-fade: #8a8a8a;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
overscroll-behavior: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -33,10 +63,13 @@ body {
|
|||||||
background: var(--bg-dark);
|
background: var(--bg-dark);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
font-family: var(--font-console);
|
font-family: var(--font-console);
|
||||||
height: 100vh;
|
height: 100vh; /* fallback for old browsers */
|
||||||
|
height: 100dvh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
overscroll-behavior: none;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chat {
|
#chat {
|
||||||
@@ -45,9 +78,9 @@ body {
|
|||||||
height: 95vh;
|
height: 95vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 1px solid var(--accent);
|
border: 1px solid var(--border);
|
||||||
border-radius: 10px;
|
border-radius: 12px;
|
||||||
box-shadow: var(--accent-glow);
|
box-shadow: none;
|
||||||
background: var(--bg-dark);
|
background: var(--bg-dark);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@@ -58,44 +91,51 @@ body {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
border-bottom: 1px solid var(--accent);
|
border-bottom: 1px solid var(--border);
|
||||||
background-color: rgba(255, 122, 0, 0.05);
|
background-color: var(--bg-elev);
|
||||||
}
|
}
|
||||||
#status {
|
#status {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
border-top: 1px solid var(--accent);
|
border-top: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
label, select, button {
|
label, select, button {
|
||||||
font-family: var(--font-console);
|
font-family: var(--font-console);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
background: transparent;
|
background: var(--bg-line);
|
||||||
border: 1px solid var(--accent);
|
border: 1px solid var(--border);
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
padding: 4px 8px;
|
padding: 5px 9px;
|
||||||
|
transition: border-color .15s, background-color .15s;
|
||||||
}
|
}
|
||||||
|
label { background: transparent; border-color: transparent; padding-left: 0; }
|
||||||
|
|
||||||
button:hover, select:hover {
|
button:hover, select:hover {
|
||||||
box-shadow: 0 0 8px var(--accent);
|
border-color: var(--border-bright);
|
||||||
|
background: var(--accent-soft);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#thinkingStreamBtn {
|
#thinkingStreamBtn {
|
||||||
background: rgba(255, 179, 71, 0.2);
|
background: var(--bg-line);
|
||||||
border-color: #ffb347;
|
border-color: var(--border-bright);
|
||||||
|
color: var(--gold);
|
||||||
}
|
}
|
||||||
|
|
||||||
#thinkingStreamBtn:hover {
|
#thinkingStreamBtn:hover {
|
||||||
box-shadow: 0 0 8px #ffb347;
|
background: var(--accent-soft);
|
||||||
background: rgba(255, 179, 71, 0.3);
|
border-color: var(--gold);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chat area */
|
/* Chat area */
|
||||||
#messages {
|
#messages {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
@@ -106,61 +146,80 @@ button:hover, select:hover {
|
|||||||
.msg {
|
.msg {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
box-shadow: 0 0 8px rgba(255,122,0,0.2);
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
.msg.user {
|
.msg.user {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
background: rgba(255,122,0,0.15);
|
background: var(--accent-soft);
|
||||||
border: 1px solid var(--accent);
|
border: 1px solid var(--border-bright);
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
}
|
}
|
||||||
.msg.assistant {
|
.msg.assistant {
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
background: rgba(255,122,0,0.08);
|
background: var(--bg-elev);
|
||||||
border: 1px solid rgba(255,122,0,0.5);
|
border: 1px solid var(--border);
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
}
|
}
|
||||||
.msg.system {
|
.msg.system {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
font-size: 0.8rem;
|
font-size: 0.78rem;
|
||||||
color: var(--text-fade);
|
color: var(--text-fade);
|
||||||
|
text-align: center;
|
||||||
|
padding: 4px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Input bar */
|
/* Input bar */
|
||||||
#input {
|
#input {
|
||||||
display: flex;
|
display: flex;
|
||||||
border-top: 1px solid var(--accent);
|
border-top: 1px solid var(--border);
|
||||||
background: rgba(255, 122, 0, 0.05);
|
background: var(--bg-elev);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
#userInput {
|
#userInput {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background: transparent;
|
background: var(--bg-line);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid var(--accent);
|
border: 1px solid var(--border);
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
padding: 8px;
|
padding: 9px 12px;
|
||||||
|
font-family: var(--font-console);
|
||||||
|
transition: border-color .15s, box-shadow .15s;
|
||||||
|
}
|
||||||
|
#userInput::placeholder { color: var(--text-fade); }
|
||||||
|
#userInput:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--accent);
|
||||||
|
box-shadow: var(--accent-glow);
|
||||||
}
|
}
|
||||||
#sendBtn {
|
#sendBtn {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
background: var(--accent);
|
||||||
|
color: #0a0a0a;
|
||||||
|
border-color: var(--accent);
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
#sendBtn:hover { background: var(--gold); border-color: var(--gold); }
|
||||||
|
#sendBtn:disabled { opacity: .45; background: var(--bg-line); color: var(--text-fade); border-color: var(--border); }
|
||||||
|
|
||||||
/* Relay status dot */
|
/* Relay status dot */
|
||||||
#status {
|
#status {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 10px 0;
|
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
font-family: monospace;
|
font-family: var(--font-console);
|
||||||
color: #f5f5f5;
|
font-size: 0.82rem;
|
||||||
|
color: var(--text-fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
#status-dot {
|
#status-dot {
|
||||||
width: 10px;
|
width: 9px;
|
||||||
height: 10px;
|
height: 9px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
background: var(--text-fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulseGreen {
|
@keyframes pulseGreen {
|
||||||
@@ -170,29 +229,29 @@ button:hover, select:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dot.ok {
|
.dot.ok {
|
||||||
background: #8fd694;
|
background: var(--good);
|
||||||
animation: pulseGreen 2s infinite ease-in-out;
|
animation: pulseGreen 2s infinite ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Offline state stays solid red */
|
/* Offline state stays solid red */
|
||||||
.dot.fail {
|
.dot.fail {
|
||||||
background: #ff3333;
|
background: var(--bad);
|
||||||
box-shadow: 0 0 10px #ff3333;
|
box-shadow: 0 0 8px rgba(255, 90, 90, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Dropdown (session selector) styling */
|
/* Dropdown (session selector) styling */
|
||||||
select {
|
select {
|
||||||
background-color: var(--bg-dark);
|
background-color: var(--bg-line);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid #b84a12;
|
border: 1px solid var(--border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 4px 6px;
|
padding: 5px 8px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
select option {
|
select option {
|
||||||
background-color: var(--bg-dark);
|
background-color: var(--bg-elev);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,8 +259,8 @@ select option {
|
|||||||
select:focus,
|
select:focus,
|
||||||
select:hover {
|
select:hover {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: #ff8a00;
|
border-color: var(--accent);
|
||||||
background-color: var(--bg-panel);
|
background-color: var(--bg-line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Settings Modal */
|
/* Settings Modal */
|
||||||
@@ -235,10 +294,10 @@ select:hover {
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
background: linear-gradient(180deg, rgba(255,122,0,0.1) 0%, rgba(10,10,10,0.95) 100%);
|
background: var(--bg-elev);
|
||||||
border: 2px solid var(--accent);
|
border: 1px solid var(--border);
|
||||||
border-radius: 12px;
|
border-radius: 14px;
|
||||||
box-shadow: var(--accent-glow);
|
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
|
||||||
min-width: 400px;
|
min-width: 400px;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
@@ -251,8 +310,8 @@ select:hover {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
border-bottom: 1px solid var(--accent);
|
border-bottom: 1px solid var(--border);
|
||||||
background: rgba(255,122,0,0.1);
|
background: var(--bg-line);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header h3 {
|
.modal-header h3 {
|
||||||
@@ -277,8 +336,8 @@ select:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.close-btn:hover {
|
.close-btn:hover {
|
||||||
background: rgba(255,122,0,0.2);
|
background: var(--accent-soft);
|
||||||
box-shadow: 0 0 8px var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
@@ -307,17 +366,16 @@ select:hover {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border: 1px solid rgba(255,122,0,0.3);
|
border: 1px solid var(--border);
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
background: rgba(255,122,0,0.05);
|
background: var(--bg-line);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: border-color 0.15s, background-color 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-label:hover {
|
.radio-label:hover {
|
||||||
border-color: var(--accent);
|
border-color: var(--border-bright);
|
||||||
background: rgba(255,122,0,0.1);
|
background: var(--accent-soft);
|
||||||
box-shadow: 0 0 8px rgba(255,122,0,0.3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-label input[type="radio"] {
|
.radio-label input[type="radio"] {
|
||||||
@@ -358,19 +416,20 @@ select:hover {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
border-top: 1px solid var(--accent);
|
border-top: 1px solid var(--border);
|
||||||
background: rgba(255,122,0,0.05);
|
background: var(--bg-line);
|
||||||
}
|
}
|
||||||
|
|
||||||
.primary-btn {
|
.primary-btn {
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
color: #000;
|
color: #0a0a0a;
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
|
border-color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.primary-btn:hover {
|
.primary-btn:hover {
|
||||||
background: #ff8a00;
|
background: var(--gold);
|
||||||
box-shadow: var(--accent-glow);
|
border-color: var(--gold);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Session List */
|
/* Session List */
|
||||||
@@ -387,15 +446,15 @@ select:hover {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border: 1px solid rgba(255,122,0,0.3);
|
border: 1px solid var(--border);
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
background: rgba(255,122,0,0.05);
|
background: var(--bg-line);
|
||||||
transition: all 0.2s;
|
transition: border-color 0.15s, background-color 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.session-item:hover {
|
.session-item:hover {
|
||||||
border-color: var(--accent);
|
border-color: var(--border-bright);
|
||||||
background: rgba(255,122,0,0.1);
|
background: var(--accent-soft);
|
||||||
}
|
}
|
||||||
|
|
||||||
.session-info {
|
.session-info {
|
||||||
@@ -435,8 +494,8 @@ select:hover {
|
|||||||
|
|
||||||
/* Thinking Stream Panel */
|
/* Thinking Stream Panel */
|
||||||
.thinking-panel {
|
.thinking-panel {
|
||||||
border-top: 1px solid var(--accent);
|
border-top: 1px solid var(--border);
|
||||||
background: rgba(255, 122, 0, 0.02);
|
background: var(--bg-dark);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
transition: max-height 0.3s ease;
|
transition: max-height 0.3s ease;
|
||||||
@@ -452,16 +511,16 @@ select:hover {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 10px 12px;
|
padding: 10px 12px;
|
||||||
background: rgba(255, 122, 0, 0.08);
|
background: var(--bg-elev);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
border-bottom: 1px solid rgba(255, 122, 0, 0.2);
|
border-bottom: 1px solid var(--border);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thinking-header:hover {
|
.thinking-header:hover {
|
||||||
background: rgba(255, 122, 0, 0.12);
|
background: var(--accent-soft);
|
||||||
}
|
}
|
||||||
|
|
||||||
.thinking-controls {
|
.thinking-controls {
|
||||||
@@ -489,19 +548,19 @@ select:hover {
|
|||||||
|
|
||||||
.thinking-clear-btn,
|
.thinking-clear-btn,
|
||||||
.thinking-toggle-btn {
|
.thinking-toggle-btn {
|
||||||
background: transparent;
|
background: var(--bg-line);
|
||||||
border: 1px solid rgba(255, 122, 0, 0.5);
|
border: 1px solid var(--border);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thinking-clear-btn:hover,
|
.thinking-clear-btn:hover,
|
||||||
.thinking-toggle-btn:hover {
|
.thinking-toggle-btn:hover {
|
||||||
background: rgba(255, 122, 0, 0.2);
|
background: var(--accent-soft);
|
||||||
box-shadow: 0 0 6px rgba(255, 122, 0, 0.3);
|
border-color: var(--border-bright);
|
||||||
}
|
}
|
||||||
|
|
||||||
.thinking-toggle-btn {
|
.thinking-toggle-btn {
|
||||||
@@ -613,6 +672,9 @@ select:hover {
|
|||||||
|
|
||||||
/* ========== MOBILE RESPONSIVE STYLES ========== */
|
/* ========== MOBILE RESPONSIVE STYLES ========== */
|
||||||
|
|
||||||
|
/* Wordmark + status dot — shown only in the mobile header (media query below) */
|
||||||
|
.brand, .brand-dot { display: none; }
|
||||||
|
|
||||||
/* Hamburger Menu */
|
/* Hamburger Menu */
|
||||||
.hamburger-menu {
|
.hamburger-menu {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -620,9 +682,9 @@ select:hover {
|
|||||||
gap: 4px;
|
gap: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border: 1px solid var(--accent);
|
border: 1px solid var(--border-bright);
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
background: transparent;
|
background: var(--bg-line);
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -654,13 +716,17 @@ select:hover {
|
|||||||
left: -100%;
|
left: -100%;
|
||||||
width: 280px;
|
width: 280px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: var(--bg-dark);
|
height: 100dvh;
|
||||||
border-right: 2px solid var(--accent);
|
background: var(--bg-elev);
|
||||||
box-shadow: var(--accent-glow);
|
border-right: 1px solid var(--border);
|
||||||
|
box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
transition: left 0.3s ease;
|
transition: left 0.3s ease;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
padding-top: calc(20px + env(safe-area-inset-top));
|
||||||
|
padding-bottom: calc(20px + env(safe-area-inset-bottom));
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
@@ -689,7 +755,7 @@ select:hover {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
border-bottom: 1px solid rgba(255, 122, 0, 0.3);
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-menu-section:last-child {
|
.mobile-menu-section:last-child {
|
||||||
@@ -719,12 +785,17 @@ select:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#chat {
|
#chat {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100%;
|
/* Height follows the *visible* viewport (above the keyboard); offsetTop
|
||||||
height: 100vh;
|
shift is applied via JS transform so it tracks iOS's viewport panning. */
|
||||||
|
height: var(--app-height, 100dvh);
|
||||||
|
transform: translateY(var(--app-offset, 0px));
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-left: none;
|
border: none;
|
||||||
border-right: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show hamburger, hide desktop header controls */
|
/* Show hamburger, hide desktop header controls */
|
||||||
@@ -734,17 +805,38 @@ select:hover {
|
|||||||
|
|
||||||
#model-select {
|
#model-select {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
justify-content: space-between;
|
padding-top: calc(12px + env(safe-area-inset-top));
|
||||||
|
padding-left: calc(14px + env(safe-area-inset-left));
|
||||||
|
padding-right: calc(14px + env(safe-area-inset-right));
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide all controls except hamburger on mobile */
|
/* Mobile header is [≡] Lyra … [●] — hide everything else. */
|
||||||
#model-select > *:not(.hamburger-menu) {
|
#model-select > *:not(.hamburger-menu):not(.brand):not(.brand-dot) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.brand {
|
||||||
|
display: block;
|
||||||
|
font-family: var(--font-console);
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
color: var(--accent);
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
.brand-dot {
|
||||||
|
display: block;
|
||||||
|
width: 9px; height: 9px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--text-fade);
|
||||||
|
margin-left: auto;
|
||||||
|
transition: background-color .2s;
|
||||||
|
}
|
||||||
|
.brand-dot.ok { background: var(--good); box-shadow: 0 0 8px rgba(143, 214, 148, .55); }
|
||||||
|
.brand-dot.fail { background: var(--bad); }
|
||||||
|
|
||||||
#session-select {
|
#session-select { display: none; }
|
||||||
display: none;
|
#status { display: none; } /* relay status now lives as the header dot */
|
||||||
}
|
|
||||||
|
|
||||||
/* Show mobile menu */
|
/* Show mobile menu */
|
||||||
.mobile-menu {
|
.mobile-menu {
|
||||||
@@ -766,6 +858,9 @@ select:hover {
|
|||||||
/* Input area - bigger touch targets */
|
/* Input area - bigger touch targets */
|
||||||
#input {
|
#input {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
padding-bottom: calc(12px + env(safe-area-inset-bottom));
|
||||||
|
padding-left: calc(12px + env(safe-area-inset-left));
|
||||||
|
padding-right: calc(12px + env(safe-area-inset-right));
|
||||||
}
|
}
|
||||||
|
|
||||||
#userInput {
|
#userInput {
|
||||||
@@ -1003,5 +1098,15 @@ select:hover {
|
|||||||
padding: 2px 5px; border-radius: 5px; line-height: 1; filter: grayscale(0.6);
|
padding: 2px 5px; border-radius: 5px; line-height: 1; filter: grayscale(0.6);
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
.rate-btn:hover { filter: none; background: rgba(255,122,0,0.12); }
|
.rate-btn:hover { filter: none; background: var(--accent-soft); }
|
||||||
.rate-btn.rated { filter: none; background: rgba(255,122,0,0.25); opacity: 1; }
|
.rate-btn.rated { filter: none; background: rgba(255,122,0,0.22); opacity: 1; }
|
||||||
|
|
||||||
|
/* Quality floor: honor reduced-motion preference. */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
*, *::before, *::after {
|
||||||
|
animation-duration: 0.01ms !important;
|
||||||
|
animation-iteration-count: 1 !important;
|
||||||
|
transition-duration: 0.01ms !important;
|
||||||
|
scroll-behavior: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user