:root {
    --bg: #f3f5f1;
    --card: #ffffff;
    --text: #1d2a22;
    --muted: #5d6b62;
    --line: #d9e0da;
    --accent: #2f6b45;
    --accent-ink: #ffffff;
    --err-bg: #fbeceb;
    --err: #a3302a;
    --ok-bg: #e7f3ea;
    --ok: #24623a;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121714;
        --card: #1b221e;
        --text: #e4ebe6;
        --muted: #9aa8a0;
        --line: #2f3a34;
        --accent: #5fae7c;
        --accent-ink: #0d1510;
        --err-bg: #3a1d1b;
        --err: #f2a29c;
        --ok-bg: #1b3324;
        --ok: #8fd6a6;
    }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 440px; margin: 0 auto; padding: 32px 16px 48px; }

.top { margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand .logo {
    display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent); color: var(--accent-ink); font-size: 22px;
}
.brand strong { display: block; font-size: 1.15rem; }
.brand small { color: var(--muted); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}
.card.center { text-align: center; }
h1 { font-size: 1.3rem; margin: 0 0 16px; }

label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .95rem; }
label small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 4px; }
input {
    display: block; width: 100%; margin-top: 6px;
    padding: 11px 12px; font: inherit; font-weight: 400;
    color: var(--text); background: var(--bg);
    border: 1px solid var(--line); border-radius: 9px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.addr { display: flex; align-items: stretch; margin-top: 6px; }
.addr input { margin-top: 0; border-radius: 9px 0 0 9px; min-width: 0; }
.addr .suffix {
    display: flex; align-items: center; padding: 0 10px;
    border: 1px solid var(--line); border-left: 0; border-radius: 0 9px 9px 0;
    color: var(--muted); font-weight: 400; font-size: .85rem; white-space: nowrap;
}

button {
    width: 100%; padding: 12px; margin-top: 6px;
    font: inherit; font-weight: 600; cursor: pointer;
    color: var(--accent-ink); background: var(--accent);
    border: 0; border-radius: 9px;
}
button:hover { filter: brightness(1.08); }

a { color: var(--accent); }
.btn-link { font-weight: 600; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.cta { text-align: center; margin: 4px 0 20px; }

.msg { padding: 10px 14px; border-radius: 9px; margin: 0 0 16px; }
ul.msg { padding-left: 32px; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.help { padding: 8px 24px; }
details { padding: 10px 0; }
details + details { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 4px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
th, td { text-align: left; padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; padding-right: 12px; white-space: nowrap; }
td { overflow-wrap: anywhere; }
tr:last-child th, tr:last-child td { border-bottom: 0; }

.spinner {
    width: 36px; height: 36px; margin: 4px auto 16px;
    border: 4px solid var(--line); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 24px; }
