/* Игра «Где находится?» — экранная версия.
   Палитра и типографика — общий стиль онлайн-игр a4umka (эталон: NaydiIPokazhi):
   Georgia, кремовые плашки в бежевой рамке, выбранное — светло-зелёное.
   Внешние шрифты не подключаем: сайт самодостаточен и не ходит на сторонние домены. */
* { box-sizing: border-box; }
body {
  margin: 0; padding: 16px 12px 40px;
  font-family: Georgia, 'Times New Roman', serif;
  background: linear-gradient(180deg, #f3f0e4 0%, #e7e0c8 100%);
  color: #3a3320; min-height: 100vh;
  -webkit-user-select: none; user-select: none;
}
.wrap { max-width: 680px; margin: 0 auto; }

.bar { margin-bottom: 12px; }
h1 { font-size: 28px; color: #4a6b2a; margin: 0; }

/* Панель настроек — кремовая карточка, как на остальных онлайн-игр */
.panel {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding: 10px 14px;
  background: #fffdf5; border: 1.5px solid #b8a86c; border-radius: 14px;
}
.levels { display: flex; gap: 6px; flex-wrap: wrap; }
.lv {
  font-family: inherit; font-size: 14px; font-weight: 700; color: #4a6b2a;
  background: #fff; border: 1.5px solid #b8a86c; border-radius: 12px;
  padding: 6px 12px; cursor: pointer; line-height: 1.15;
  display: flex; flex-direction: column; align-items: flex-start;
}
.lv:hover { border-color: #5a8835; }
.lv span { font-weight: 400; font-size: 12.5px; color: #8a7a4a; }
.lv.on { background: #c8d8a4; border-color: #5a8835; color: #3a5520; }
.score { display: flex; gap: 12px; align-items: center; font-size: 14px; color: #8a7a4a; }
.stars b { color: #4a6b2a; font-size: 17px; }

.task {
  display: flex; align-items: center; gap: 10px;
  background: #fffdf5; border: 1.5px solid #b8a86c; border-radius: 14px;
  padding: 10px 14px; font-size: 20px; font-weight: 700; color: #3a5520;
  margin-bottom: 12px; min-height: 56px;
}
.say {
  flex: 0 0 auto; font-size: 20px; line-height: 1; cursor: pointer;
  background: #c8d8a4; border: 1.5px solid #5a8835; border-radius: 10px; padding: 6px 9px;
}
.say:hover { background: #d6e4b6; }

/* Сцена: SVG во всю ширину, поверх неё летает перетаскиваемый предмет */
.stage { position: relative; }
.scene {
  background: #fffdf5; border: 1.5px solid #b8a86c; border-radius: 16px;
  padding: 6px; overflow: hidden;
}
/* Картинка 200×150: во всю ширину она вырастает на пол-экрана, и предмет
   приходится тащить далеко. Ограничиваем высоту и центрируем. */
.scene { display: flex; justify-content: center; }
.scene svg { display: block; width: 100%; max-width: 460px; height: auto; }

.verdict {
  margin-top: 10px; padding: 9px 14px; border-radius: 12px; font-size: 16px;
  background: #f3f0e4; border: 1.5px solid #b8a86c;
}
.verdict.ok { background: #dff2d8; border-color: #5a8835; color: #2a6a1a; font-weight: 700; }
.verdict.warn { background: #fdeedd; border-color: #d8a05a; color: #8a4a10; }

/* Лоток с предметом */
.tray {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; min-height: 74px;
  background: #fffdf5; border: 1.8px dashed #b8a86c; border-radius: 14px; padding: 8px 12px;
}
.tray-hint { color: #8a7a4a; font-size: 14px; }
.tray-slot { width: 62px; height: 62px; flex: 0 0 auto; }
.chip {
  position: absolute; left: 0; top: 0; transform: translate(-50%,-50%);
  width: 62px; height: 62px; cursor: grab;
  background: #f3f0e4; border: 1.5px solid #b8a86c; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  touch-action: none; z-index: 5;
}
.chip svg { width: 46px; height: 46px; display: block; }
.chip.dragging { cursor: grabbing; box-shadow: 0 8px 20px rgba(0,0,0,0.22); border-color: #5a8835; }
/* Поставленный предмет — без кружка-подложки, он часть картинки */
.chip.placed { background: none; border: none; box-shadow: none; cursor: default; }

.hint-dot {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 3px dashed #e8a83c; border-radius: 50%; pointer-events: none;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .9 } 50% { transform: scale(1.18); opacity: .5 } }

.controls { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btn {
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  background: #fffdf5; border: 1.5px solid #b8a86c; border-radius: 12px; padding: 9px 16px; color: #4a6b2a;
}
.btn:hover:not(:disabled) { background: #f3f0e4; border-color: #5a8835; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: #c8d8a4; border-color: #5a8835; color: #3a5520; }

.tip { color: #8a7a4a; font-size: 13.5px; margin-top: 14px; text-align: center; }

@media (max-width: 520px) {
  h1 { font-size: 24px; }
  .task { font-size: 17px; }
  .chip, .tray-slot { width: 54px; height: 54px; }
  .chip svg { width: 40px; height: 40px; }
}

/* зум разрешён (viewport без user-scalable=no), но двойной тап не зумит игру */
body { touch-action: manipulation; }
