Googstr/public/style.css
Jason Tudisco fcfaec675a Add NIP-46 signer, optional NIP-07 extension, passkey protection, backups
- NIP-46 remote signer in the page (bunker:// and nostrconnect:// pairing)
- Chrome extension (NIP-07) with per-site permission prompts, unlocked by
  the site via externally_connectable; downloadable from the page
- Passkey (WebAuthn PRF) encryption of the Drive key file
- NIP-49 backups: download or save to Drive; reveal nsec
- Fix: oldest key file wins when two devices sign up at once
- Fix: never overwrite an existing kind-0 because a relay was slow
- Fix: EOSE tracking; relays reconnect with backoff; verify event signatures
- One-click re-sign-in (consent only the first time)
- Vendored, pinned nostr-tools; CSP; no third-party scripts but Google's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 08:33:02 -06:00

305 lines
7.8 KiB
CSS

:root {
--bg: #0e0f12;
--panel: #16181d;
--panel-2: #1e2128;
--text: #e8e8ea;
--muted: #8b8f99;
--accent: #8b5cf6;
--accent-2: #6d28d9;
--border: #262932;
--danger: #ef4444;
--ok: #10b981;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
font-size: 15px;
line-height: 1.5;
}
main {
max-width: 620px;
margin: 0 auto;
padding: 48px 20px 80px;
}
header { margin-bottom: 32px; }
h1 {
font-size: 32px;
font-weight: 700;
margin: 0 0 4px;
letter-spacing: -0.02em;
background: linear-gradient(90deg, #4285f4, #34a853, #fbbc04, #ea4335);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.tag { color: var(--muted); margin: 0; }
.view {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
padding: 28px;
}
.view + .view { margin-top: 16px; }
.hidden { display: none !important; }
h2 { margin: 0 0 16px; font-size: 20px; font-weight: 600; }
h3 { margin: 24px 0 8px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
input[type="text"], input[type="password"], textarea {
width: 100%;
background: var(--panel-2);
color: var(--text);
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px 14px;
font-size: 15px;
font-family: inherit;
outline: none;
transition: border-color 0.15s;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 84px; }
button {
font-family: inherit;
font-size: 14px;
cursor: pointer;
}
button.primary {
background: linear-gradient(180deg, var(--accent), var(--accent-2));
color: white;
border: none;
border-radius: 10px;
padding: 12px 18px;
font-weight: 600;
width: 100%;
transition: filter 0.15s, transform 0.05s;
}
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.primary:active:not(:disabled) { transform: translateY(1px); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }
button.google {
background: white;
color: #1f1f1f;
border: 1px solid #dadce0;
border-radius: 10px;
padding: 12px 18px;
font-weight: 500;
font-size: 15px;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
cursor: pointer;
transition: background 0.15s, box-shadow 0.15s;
}
button.google:hover:not(:disabled) { background: #f6f9ff; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
button.google:active:not(:disabled) { background: #ebf2ff; }
button.google:disabled { opacity: 0.6; cursor: not-allowed; }
button.google svg { width: 18px; height: 18px; flex-shrink: 0; }
.banner-warn {
background: rgba(234, 67, 53, 0.1);
border: 1px solid rgba(234, 67, 53, 0.4);
color: #ffd2cd;
border-radius: 10px;
padding: 14px 16px;
font-size: 13px;
margin-bottom: 16px;
line-height: 1.55;
}
.banner-warn code {
background: rgba(0,0,0,0.35);
border-radius: 4px;
padding: 1px 6px;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 12px;
}
.banner-warn a { color: #ffe; }
button.ghost {
background: transparent;
color: var(--muted);
border: 1px solid var(--border);
border-radius: 8px;
padding: 6px 12px;
}
button.ghost:hover { color: var(--text); border-color: var(--muted); }
.status {
font-size: 13px;
color: var(--muted);
margin: 12px 0 0;
min-height: 18px;
}
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }
.profile {
display: grid;
grid-template-columns: 64px 1fr auto;
gap: 14px;
align-items: center;
margin-bottom: 24px;
}
.profile img {
width: 64px;
height: 64px;
border-radius: 50%;
background: var(--panel-2);
object-fit: cover;
}
.profile h2 { margin: 0; }
.profile .npub {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 12px;
color: var(--muted);
margin: 2px 0 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 360px;
}
.composer { display: grid; gap: 10px; margin-bottom: 8px; }
.relays-bar {
display: flex;
align-items: center;
gap: 8px;
margin-top: 18px;
font-size: 12px;
color: var(--muted);
}
.relays-bar .label { text-transform: uppercase; letter-spacing: 0.05em; }
.relay-dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 4px;
background: var(--border);
cursor: help;
transition: background 0.2s;
}
.relay-dot.open { background: var(--ok); }
.relay-dot.connecting { background: #facc15; animation: pulse 1s infinite; }
.relay-dot.timeout, .relay-dot.closed { background: var(--danger); }
@keyframes pulse { 50% { opacity: 0.4; } }
table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
th, td {
text-align: left;
padding: 10px 12px;
border-bottom: 1px solid var(--border);
vertical-align: top;
}
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
td:first-child { color: var(--muted); white-space: nowrap; width: 140px; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
.lead { color: var(--muted); font-size: 14px; margin-top: -8px; }
#signin-passkey { margin-top: 10px; }
.banner-ok {
background: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.4);
color: #c9f7e6;
border-radius: 10px;
padding: 14px 16px;
font-size: 14px;
margin-bottom: 16px;
}
.card {
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 12px;
padding: 18px;
margin-top: 14px;
}
.card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card p { margin: 6px 0; }
.card input { margin-top: 8px; }
.card > button, .card > div > button.primary, a.button { margin-top: 10px; }
.pill {
font-size: 11px;
font-weight: 500;
color: var(--muted);
border: 1px solid var(--border);
border-radius: 999px;
padding: 1px 8px;
}
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; }
.sub { margin: 18px 0 4px !important; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.secret { word-break: break-all; background: var(--bg); border-radius: 8px; padding: 10px; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.row > input { flex: 1; min-width: 0; margin-top: 0; }
.row > button { width: auto; flex-shrink: 0; margin-top: 0; }
.row .status { margin: 0; flex: 1; }
.card .row button.primary { flex: 1; }
a.button {
display: block;
text-align: center;
text-decoration: none;
border-radius: 10px;
padding: 12px 18px;
font-weight: 600;
font-size: 14px;
}
a.button.primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: white; }
.steps { margin: 12px 0 4px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin: 4px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
padding: 8px 0;
border-bottom: 1px solid var(--border);
}
.list li:last-child { border-bottom: none; }
.list li .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.list li.fail .what { color: var(--danger); }
@media (max-width: 520px) {
main { padding: 28px 16px 60px; }
.view { padding: 20px; }
.profile { grid-template-columns: 48px 1fr; }
.profile img { width: 48px; height: 48px; }
.profile #sign-out { grid-column: 1 / -1; }
.profile .npub { max-width: 100%; }
.row { flex-wrap: wrap; }
}
.profile > div { min-width: 0; }
#sign-out { white-space: nowrap; }