:root {
    --bg: #f7f8f6;
    --text: #17201a;
    --muted: #5d685f;
    --line: #dfe5df;
    --brand: #8bc53f;
    --accent: #145c36;
    --panel: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.topbar {
    align-items: center;
    background: rgba(247, 248, 246, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px clamp(16px, 4vw, 48px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    align-items: center;
    display: flex;
    min-width: 0;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: clamp(34px, 5vw, 50px);
    max-width: min(58vw, 300px);
    object-fit: contain;
}

.brand-fallback {
    align-items: center;
    background: var(--brand);
    border-radius: 7px;
    color: var(--accent);
    display: grid;
    flex: 0 0 54px;
    font-weight: 800;
    height: 38px;
    place-items: center;
}

h1 {
    font-size: 18px;
    line-height: 1.1;
    margin: 0;
}

.brand p,
.intro p,
.empty p {
    color: var(--muted);
    margin: 3px 0 0;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 12px;
    text-decoration: none;
}

main {
    margin: 0 auto;
    max-width: 1260px;
    padding: 18px clamp(8px, 2.4vw, 28px) 48px;
}

.intro {
    padding: 8px 2px 16px;
    text-align: center;
}

.intro p {
    font-size: 14px;
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 1120px;
}

.tile {
    aspect-ratio: 4 / 5;
    background: #e7ece8;
    display: block;
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

.tile img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease, filter 180ms ease;
    width: 100%;
}

.tile span {
    background: rgba(13, 43, 24, 0.88);
    border-radius: 7px;
    bottom: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    left: 8px;
    max-width: calc(100% - 16px);
    overflow: hidden;
    padding: 6px 8px;
    position: absolute;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tile:hover img,
.tile:focus-visible img {
    filter: saturate(1.06) contrast(1.04);
    transform: scale(1.035);
}

.tile:focus-visible,
.nav a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.empty {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 80px auto 0;
    max-width: 520px;
    padding: 32px;
    text-align: center;
}

.empty h2 {
    font-size: 22px;
    margin: 0;
}

@media (min-width: 760px) {
    .grid {
        gap: 6px;
    }

    .intro p {
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        flex: 1;
        text-align: center;
    }

    main {
        padding-left: 0;
        padding-right: 0;
    }

    .intro {
        padding-left: 12px;
        padding-right: 12px;
    }

    .grid {
        gap: 2px;
        max-width: none;
    }
}
