* {
    box-sizing: border-box;
}

html {
    height: 100vh;
    touch-action: manipulation;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #2b241d;
    background-image:
        radial-gradient(ellipse at top, rgba(255, 220, 160, 0.06), transparent 60%),
        repeating-linear-gradient(180deg, #322a21 0px, #322a21 1px, #2b241d 1px, #2b241d 3px);
    font-family: 'Lato', sans-serif;
    color: #f2ece1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    text-align: center;
    padding: 9vh 24px 6vh;
}

h1 {
    margin: 0;
    font-weight: 900;
    font-size: clamp(2.2rem, 7vw, 3.4rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f6ecd9;
}

h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 18px auto 0;
    background: #d4a03c;
}

header p {
    margin: 16px 0 0;
    font-size: 1.05rem;
    color: #b8ab97;
}

.shelf-grid {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 32px 12vh;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 56px 32px;
}

.shelf-slot {
    width: 180px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.game-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #ebebeb;
    border-radius: 10px;
    padding: 14px 14px 14px 22px;
    box-shadow: 0 18px 22px -14px rgba(0, 0, 0, 0.75);
    transform: translateY(0) rotate(0deg);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    border-radius: 10px 0 0 10px;
    background: var(--spine);
}

.game-tile:hover,
.game-tile:focus-visible {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 32px 26px -16px rgba(0, 0, 0, 0.8);
}

.game-tile:active {
    transform: translateY(-2px) rotate(0deg);
}

.game-tile:focus-visible {
    outline: 2px solid #d4a03c;
    outline-offset: 3px;
}

.tile-art {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
}

.tile-art img {
    display: block;
    width: 100%;
    height: auto;
}

.tile-label {
    margin-top: 12px;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: #2b241d;
    text-align: center;
}

.ledge {
    height: 14px;
    margin-top: 14px;
    border-radius: 3px;
    background: linear-gradient(180deg, #7a5638 0%, #5c3f27 55%, #4a3220 100%);
    box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .game-tile {
        transition: none;
    }
}
