*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f9f7f4;
    --surface: #ffffff;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --accent: #b5895c;
    --accent-hover: #9a6f45;
    --danger: #c0392b;
    --danger-bg: #fdf0ef;
    --success: #2e7d32;
    --success-bg: #f0faf0;
    --radius: 12px;
    --shadow: 0 2px 16px rgba(0,0,0,0.08);
}

html {
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

main {
    width: 100%;
    max-width: 480px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 32px;
}

.card.loser {
    text-align: center;
}

.card.winner-form h1 {
    font-size: 1.6rem;
    font-weight: normal;
    margin-bottom: 8px;
    text-align: center;
}

.subtext {
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.6;
}

.message {
    font-size: 1.25rem;
    line-height: 1.6;
    text-align: center;
    color: var(--text);
}

.message.success {
    color: var(--success);
}

.alert {
    background: var(--danger-bg);
    color: var(--danger);
    border-left: 4px solid var(--danger);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

fieldset {
    border: 1px solid #e0dbd3;
    border-radius: 8px;
    padding: 16px 20px 20px;
    margin-bottom: 20px;
}

legend {
    padding: 0 6px;
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 14px;
}

label input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #d8d2c9;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: #fafaf8;
    outline: none;
    transition: border-color 0.15s;
}

label input:focus {
    border-color: var(--accent);
    background: #fff;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    font-size: 1.05rem;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
}

button[type="submit"]:hover {
    background: var(--accent-hover);
}

@media (max-width: 360px) {
    .card {
        padding: 28px 20px;
    }
}
