.gamification-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #d1e3f8;
  border-radius: 12px;
  box-sizing: border-box;
}

#gamification-layout {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

#gamification-layout > * {
  height: 400px; 
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shelves {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.shelf {
  position: relative;
  width: 100px;
  height: 60px;
  border-bottom: 4px solid #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70px;
  background: #fff;
  border-radius: 6px;
  z-index: 1;
}

.shelf-remove-btn {
  position: absolute !important;
  top: 4px !important;
  right: 6px !important;
  background: none !important;
  border: none !important;
  font-size: 16px !important;
  font-weight: bold !important;
  color: #555 !important;
  cursor: pointer !important;
  z-index: 2 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.shelf::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 25px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.05) 80%,
    transparent 100%
  );
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}


.shelf img {
  height: 60px;
  object-fit: contain;
  cursor: pointer;
}

.character-wrapper {
  position: relative;
  width: 140px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#child-image {
  height: 90%;
  object-fit: contain;
  pointer-events: none;
}

#gamification-footer {
  width: 100%;
  max-width: 700px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
  box-sizing: border-box;
  align-items: stretch;
  text-align: left;
  font-family: sans-serif;
}

.recommended-text {
  font-size: 0.9rem;
  color: #555;
}

.recommended-sum {
  font-size: 1rem;
  font-weight: 600;
  color: #007acc;
  margin-bottom: 6px;
}

#progress-wrapper {
  width: 100%;
  height: 6px;
  background-color: #e9f5ff;
  border-radius: 50px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background-color: #007acc;
  border-radius: 50px;
  transition: width 0.3s ease;
}

.manual-label {
  font-size: 0.9rem;
  color: #444;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap; 
}

.manual-amount {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f8f8f8;
  max-width: 140px;
}

.manual-amount input {
  border: none;
  background: transparent;
  font-size: 1rem;
  width: 100%;
  outline: none;
}

.edit-icon {
  font-size: 1rem;
  color: #888;
  margin-left: 8px;
}

.gamification_manual-error {
  color: red;
  font-size: 12px;
  margin-top: 4px;
}


/* -----------------------------------------------------------------
   MOBILE ≤768 px — залишаємо компоновку як на десктопі,
   тільки зменшуємо розміри
   -----------------------------------------------------------------*/
@media (max-width:768px){

  #gamification-layout          { flex-direction:row; gap:.75rem;  align-items: center; }
  .shelves.left, .shelves       { flex-direction:column; gap:1rem; }

  /* ✔︎ Масштабування елементів */
  .shelf        { width:70px; height:45px; min-height:50px; }
  .shelf img    { height:45px; }
  .character-wrapper { width:110px; height:320px; }

  /* контейнери трохи вужчі, але без зміни орієнтації */
  .gamification-container{ max-width:100%; padding:12px; }
  #gamification-footer   { padding:0 8px; }
    #gamification-layout > * {
    height: 320px;
  }
}

