@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --background: #e8e0d1;
    --card: #f7f2e8;
    --text: #25231f;
    --muted: #716b60;
    --accent: #a4472f;
    --border: #c8bdab;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 25px 15px;
    display: grid;
    place-items: center;
    background: var(--background);
    color: var(--text);
    font-family: 'DM Sans', Arial, sans-serif;
}

.game {
    width: 100%;
    max-width: 700px;
    padding: 45px 55px 35px;
    border: 1px solid #aaa092;
    background: var(--card);
    box-shadow: 7px 8px 0 rgba(37, 35, 31, .12);
}

.intro {
    margin-bottom: 32px;
}

.eyebrow,
.side-label,
.score span {
    color: var(--accent);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0 0 12px;
}

h1 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    line-height: 1;
}

.quote {
    margin: 16px 0 0;
    color: var(--muted);
}

.scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 65px;
    margin-bottom: 20px;
    padding: 15px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.score {
    display: grid;
    gap: 5px;
}

.score strong {
    font-size: 2.2rem;
    font-weight: 500;
}

.score-divider {
    color: var(--accent);
    font-size: 1.7rem;
}

.round-timer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin: 0 auto 25px;
    padding: 6px 8px 6px 12px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
}

.round-timer strong {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--text);
    color: var(--card);
}

.round-timer.urgent {
    border-color: var(--accent);
    color: var(--accent);
}

.round-timer.urgent strong {
    background: var(--accent);
}

.round-timer.resting strong {
    background: var(--border);
    color: var(--text);
}

.battle {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.side {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.hand {
    display: grid;
    width: 160px;
    max-width: 100%;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid #aaa092;
    border-radius: 50%;
    background: var(--background);
    box-shadow: 3px 4px 0 rgba(37, 35, 31, .12);
    font-size: 4.5rem;
}

.versus {
    color: var(--accent);
    font-family: Georgia, serif;
    font-style: italic;
}

.result {
    margin: 0 0 7px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.message {
    min-height: 22px;
    margin: 0 0 25px;
    color: var(--muted);
    font-size: .85rem;
}

.choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

button {
    font: inherit;
    cursor: pointer;
}

.choice {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 14px 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: .8rem;
    font-weight: 700;
}

.choice:hover:not(:disabled) {
    border-color: var(--accent);
    background: #f1e5d1;
}

.choice:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.choice-icon {
    font-size: 1.8rem;
}

.game-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-top: 22px;
}

.start {
    padding: 11px 24px;
    border: 0;
    background: var(--accent);
    color: var(--card);
    font-size: .8rem;
    font-weight: 700;
}

.start:hover {
    background: #823725;
}

.reset {
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: .75rem;
    text-decoration: underline;
}

.reset:hover {
    color: var(--accent);
}

button:focus-visible {
    outline: 2px solid #d6aa48;
    outline-offset: 3px;
}

@media (max-width: 520px) {
    body {
        padding: 12px 8px;
    }

    .game {
        padding: 30px 16px 25px;
    }

    .scoreboard {
        gap: 35px;
    }

    .battle {
        gap: 8px;
    }

    .hand {
        font-size: 3.5rem;
    }

    .side-label {
        font-size: .6rem;
    }
}
