:root {
    --ink: #1c1c1e;
    --muted: #6b7280;
    --accent: #111827;
    --border: #e5e7eb;
    --bg: #f7f7f8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: white;
    border-bottom: 1px solid var(--border);
}

.brand {
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
}

.topbar nav a {
    margin-left: 18px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
}

.topbar nav a:hover { color: var(--ink); }

.container {
    max-width: 560px;
    margin: 40px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
}

h1 { font-size: 22px; margin-top: 0; }
p.subtitle { color: var(--muted); margin-top: -8px; }

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }

input[type=text], input[type=file] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
}

button, .btn {
    display: inline-block;
    margin-top: 18px;
    padding: 11px 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

button.secondary, .btn.secondary {
    background: white;
    color: var(--ink);
    border: 1px solid var(--border);
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 14px;
    font-size: 14px;
}

.code-image {
    display: block;
    margin: 20px auto;
    max-width: 320px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--muted); }
.result-row .value { font-weight: 700; }

.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
