:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #5a5a5a;
    --line: #e2e2e2;
    --card: #f6f6f4;
    --accent: #c44f00;
    --on-accent: #ffffff;
    --ok: #1f7a3a;
    --warn: #9a6200;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e0e0e;
        --text: #f5f5f5;
        --muted: #a8a8a8;
        --line: #2a2a2a;
        --card: #171717;
        --accent: #ff6600;
        --on-accent: #111111;
        --ok: #4cc26e;
        --warn: #e0a030;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
    padding: 48px 16px 40px;
}

main { max-width: 34rem; margin: 0 auto; display: flex; flex-direction: column; gap: 2rem; }

header { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.brand img { width: 64px; height: 64px; }
.brand h1 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.2; font-weight: 700; }
.lead { color: var(--muted); }

a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; word-break: break-all; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; }
.card h2 { font-size: 1rem; margin-bottom: 0.35rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

.pay form { display: flex; flex-direction: column; gap: 0.75rem; text-align: center; }
.pay label { font-weight: 600; text-align: left; font-size: 0.9rem; }
input {
    width: 100%; padding: 0.75rem 0.9rem;
    font: inherit; color: var(--text); background: var(--bg);
    border: 1px solid var(--line); border-radius: 12px;
}
input::placeholder { color: var(--muted); opacity: 0.7; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer;
    border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text);
}
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.08); }

.users { display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 0.75rem; }

.account { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.pubkey { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; }
.status { font-weight: 600; font-size: 0.9rem; }
.status::first-letter { text-transform: uppercase; }
.status.pending { color: var(--warn); }
.status.ok { color: var(--ok); }

.invoice { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: 0.5rem; }
.invoice > p:first-child { color: var(--text); }
.qr { width: 240px; height: 240px; max-width: 100%; padding: 12px; background: #ffffff; border-radius: 12px; image-rendering: pixelated; }
.address {
    width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 0.75rem 0.9rem; white-space: pre-wrap; text-align: left; user-select: all;
}
.address code { font-size: 0.8rem; }

.paid { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-top: 0.5rem; color: var(--ok); }
.paid p { color: var(--text); }
.paid p.muted { color: var(--muted); }

.note { border-left: 3px solid var(--accent); padding: 0.75rem 1rem; background: var(--card); border-radius: 0 12px 12px 0; font-size: 0.95rem; }

footer { border-top: 1px solid var(--line); padding-top: 1.25rem; font-size: 0.85rem; color: var(--muted); text-align: center; }

@media (max-width: 520px) {
    body { padding-top: 32px; }
}
