@font-face {
    font-family: "ComicNeue";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/ComicNeue-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "ComicNeue";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/fonts/ComicNeue-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "ComicNeue";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/ComicNeue-Bold.ttf") format("truetype");
}

body {
    font-family: "ComicNeue", system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff0e4;
    color: #222;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: #7b2511;
    text-decoration: underline;
}

a:hover, a:focus {
    color: #c76c45;
}

header, footer {
    background: #c76c45;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

main {
    max-width: 900px;
    margin: auto;
    padding: 1rem;
}

.animal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .animal-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .animal-card img {
        width: 100%;
        height: auto;
        display: block;
    }
}

.animal-card {
    background: white;
    padding: 0.5rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.animal-card:hover {
    transform: translateY(-3px);
}

.animal-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.animal-age-text {
    color: #7b2511;
}

/* Calculator */
.calculator {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

label {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
}

input, select, button {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.4rem;
    font-size: 1rem;
}

button {
    margin-top: 1.2rem;
    background: #7b2511;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "ComicNeue", system-ui, sans-serif;
}

button:hover,
button:focus,
button:active {
    background: #7b2511;
}

#result {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    background: #e0fce0;
    border-radius: 6px;
    padding: 1rem;
}

.ad {
    margin: 2rem 0;
    text-align: center;
    min-height: 90px;
}

/* Responsive behavior is handled automatically by CSS grid (auto-fit) */
