:root {
    --gold-100: #faecd4;
    --gold-200: #f3cb8f;
    --gold-300: #f0ba64;
    --gold-400: #e0ad59;
    --surface: #ffffff;
    --border: #e7e5e4;
    --content: #1c1917;
    --content-muted: #78716c;
    --danger: #b91c1c;
    --success: #15803d;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --gold-100: #4a3818;
        --gold-200: #6b4f22;
        --gold-300: #8a6224;
        --surface: #1c1b1a;
        --border: #3a3836;
        --content: #f5f5f4;
        --content-muted: #a8a29e;
        --danger: #f87171;
        --success: #4ade80;
    }

    .brand img {
        filter: invert(1);
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font: 14px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--content);
    background: var(--surface);
}

.band {
    position: relative;
    overflow: hidden;
    padding: 16px 16px 34px;
    background: linear-gradient(135deg, var(--gold-200), var(--gold-100));
}

.brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.waves {
    position: absolute;
    inset: auto 0 0;
    width: 100%;
    height: 26px;
}

.waves .back {
    fill: var(--gold-200);
}

.waves .front {
    fill: var(--gold-300);
}

main {
    padding: 16px;
}

p {
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}

.error {
    color: var(--danger);
}

.ok {
    color: var(--success);
    font-weight: 600;
}

.files {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}

.files label {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    overflow-wrap: anywhere;
}

button,
a.button {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #1c1917;
    background: var(--gold-400);
    cursor: pointer;
}

button:hover,
a.button:hover {
    background: var(--gold-300);
}

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

:focus-visible {
    outline: 2px solid var(--gold-400);
    outline-offset: 2px;
}

footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--content-muted);
}

footer button {
    display: inline;
    width: auto;
    margin: 0 0 0 8px;
    padding: 0;
    color: inherit;
    background: none;
    text-decoration: underline;
    font-weight: 400;
}
