:root {
    --primary: #8C5535; /* Fás, természetes barna */
    --secondary: #D9B382; /* Homok/bézs */
    --bg: #F4F1EA;
    --text: #333;
}
* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { margin: 0; background-color: var(--bg); color: var(--text); }
#app { max-width: 600px; margin: 0 auto; padding: 20px; }
.screen { animation: fadeIn 0.5s; }

.card {
    background: #fff; border-radius: 12px; padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 20px;
}
.amalka-message { background: #fdf6e3; border-left: 4px solid var(--primary); }

input, select {
    width: 100%; padding: 12px; margin-bottom: 15px;
    border: 1px solid #ccc; border-radius: 8px; font-size: 16px;
}
.btn {
    width: 100%; padding: 14px; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; font-size: 16px; font-weight: bold;
    cursor: pointer;
}
.btn:hover { background: #6b3e23; }
.btn:disabled { background: #ccc; cursor: not-allowed; }
.error { color: red; font-size: 14px; }
.success-text { color: green; font-weight: bold; }
.task-completed { opacity: 0.7; pointer-events: none; border-left: 4px solid green;}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Alsó levágás biztosítása képeknél (15%) */
.image-upload-preview, .pictogram-item img { padding-bottom: 15%; } 

/* --- PIKTOGRAM RÁCS --- */
.pictogram-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 oszlop egymás mellett */
    gap: 8px;
    margin-bottom: 15px;
}
.pictogram-item {
    aspect-ratio: 1 / 1; /* Tökéletes négyzetek */
    background: #eee;
    border: 3px solid transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px; /* Ideiglenes, amíg szöveg van ikon helyett */
    font-weight: bold;
    text-align: center;
    word-break: break-all;
    transition: all 0.2s;
    user-select: none;
}
.pictogram-item.selected {
    border-color: var(--primary);
    background: #e8dccb;
    transform: scale(0.92); /* Látványos animáció kattintáskor */
}
#pic-counter {
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary);
}


/* --- AMÁLKA MESEDOBOZOK STÍLUSAI --- */
.story-container { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; font-family: 'Georgia', serif; }
.story-box { background: #fffdf5; border: 2px solid #e8dcc6; border-radius: 12px; padding: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.story-box h4 { margin-top: 0; color: #8c5535; border-bottom: 1px dashed #e8dcc6; padding-bottom: 8px; margin-bottom: 12px; font-size: 1.2em; font-family: sans-serif; }
.story-box p { margin: 0 0 10px 0; line-height: 1.6; color: #4a4a4a; font-size: 15px; }
.story-box p:last-child { margin-bottom: 0; }

/* Amálka beszél buborék */
.amalka-chat { display: flex; gap: 15px; align-items: flex-start; background: #f0f9f4; border: 2px solid #a3e4d7; border-radius: 12px; padding: 15px; }
.amalka-avatar { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; border: 3px solid #1abc9c; background: #fff; box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.amalka-message { flex-grow: 1; }
.amalka-message h4 { margin-top: 0; color: #16a085; border-bottom: 1px dashed #a3e4d7; padding-bottom: 8px; margin-bottom: 12px; font-size: 1.2em; font-family: sans-serif; }

@media (max-width: 480px) {
    .amalka-chat { flex-direction: column; align-items: center; text-align: center; }
    .amalka-message h4 { text-align: center; }
}