* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #9edfff;
    color: #222;
}

.game {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #1769aa;
}

.stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stats div {
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    font-size: 14px;
}

.shop {
    position: relative;
    
    /* Nimmt die volle Breite ein */
    width: 100%;
    max-width: none;
    
    /* WICHTIG: Wir geben ihm eine feste maximale Höhe, damit er auf großen Monitoren nicht zu riesig wird */
    max-height: 70vh; 
    
    /* Aber er behält sein 3:2 Seitenverhältnis als Wunsch-Maß */
    aspect-ratio: 3 / 2;      
    
    margin: 10px auto;        
    overflow: hidden;

    background: linear-gradient(
        to bottom,
        #e7f7ff 0%,
        #e7f7ff 38.2%,
        #d7b98c 38.2%,
        #caa879 100%
    );

    border: 5px solid #6d482b;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.speech {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border: 2px solid #6d482b;
    z-index: 10;
    pointer-events: none; /* Klicks gehen durch die Blase hindurch zum Canvas */
}

.message {
    margin: 15px 0;
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

button {
    min-height: 60px;
    border: none;
    border-radius: 12px;
    background: #28a745;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

button:hover {
    filter: brightness(1.08);
}

button:active {
    transform: scale(0.97);
}

button.blue {
    background: #007bff;
}

button.orange {
    background: #f39c12;
    color: #222;
}

button small {
    font-size: 13px;
}

@media (max-width: 700px) {
    .game { padding: 8px; }

    header {
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        text-align: center;
        font-size: 23px;
    }

    .stats { justify-content: center; }

    .stats div {
        flex: 1;
        text-align: center;
        padding: 8px 5px;
    }

    .buttons { grid-template-columns: 1fr 1fr; }

    button {
        min-height: 55px;
    }
}


#shelf-items-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}