:root {
    color-scheme: light dark;
    --bg: #f6f5f9;
    --card: #ffffff;
    --text: #1b1a21;
    --muted: #6b6878;
    --accent: #6d4aff;
    --accent-text: #ffffff;
    --border: #dcd9e4;
    --error: #c0262d;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16141c;
        --card: #211f29;
        --text: #f0eef6;
        --muted: #a29fb0;
        --border: #3a3746;
        --error: #ff6b6b;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
    color: var(--text);
}

main {
    width: min(26rem, calc(100vw - 2rem));
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
}

h1 {
    font-size: 1.4rem;
    margin: 0 0 1.25rem;
}

h2 {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
}

form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
}

label.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input:not([type='checkbox']) {
    font: inherit;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: inherit;
}

input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button,
.button {
    font: inherit;
    font-weight: 600;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-text);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.error {
    color: var(--error);
    margin: 0;
    font-size: 0.9rem;
}

.notice {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.85rem;
    margin: 0;
}

code {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    word-break: break-all;
}

a {
    color: var(--accent);
}
