* { box-sizing: border-box; }
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  background: #f4f1ea;
  color: #1a1a1a;
}
.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}
header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px 16px;
  border-bottom: 3px solid #154734;
  margin-bottom: 16px;
}
header.top h1 {
  font-size: 20px;
  margin: 0;
  color: #154734;
}
.progress {
  font-size: 14px;
  font-weight: bold;
  color: #154734;
  background: #e4ede9;
  border: 1px solid #154734;
  border-radius: 20px;
  padding: 6px 14px;
}
.instructions {
  background: #e1eef9;
  border-left: 6px solid #0065bd;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.scene-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ddd;
  border: 2px solid #333;
  border-radius: 6px;
  overflow: hidden;
}
.scene-frame img.scene-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hotspot {
  position: absolute;
  /* width/height are set per-item inline from items.js pos/size data */
  width: 9%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 3px solid #daaa00;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.hotspot img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.06); }
.hotspot.done {
  border-color: #154734;
  opacity: 0.55;
}
.hotspot.done::after {
  content: "\2713";
  position: absolute;
  top: -10px;
  right: -10px;
  background: #154734;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff;
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.modal h2 { margin-top: 0; color: #154734; font-size: 18px; }
.modal-item-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
  float: left;
  margin: 0 12px 8px 0;
}
.choice-list { list-style: none; padding: 0; margin: 12px 0; clear: both; }
.choice-list li { margin-bottom: 8px; }
.choice-list button, .yesno button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 2px solid #ccc;
  background: #fafafa;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.choice-list button:hover, .yesno button:hover { border-color: #daaa00; }
.yesno { display: flex; gap: 10px; margin: 14px 0; clear: both; }
.yesno button { text-align: center; font-weight: bold; }

.feedback {
  padding: 12px 14px;
  border-radius: 6px;
  margin: 14px 0;
  font-size: 14px;
}
.feedback.correct { background: #e4ede9; border-left: 6px solid #154734; }
.feedback.incorrect { background: #fde3d3; border-left: 6px solid #ff6e00; }

textarea.reflection {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid #999;
  border-radius: 6px;
  resize: vertical;
}
.reflection-note { font-size: 12px; color: #555; margin-top: 4px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.btn {
  padding: 9px 18px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
}
.btn.primary { background: #154734; color: #fff; }
.btn.primary:disabled { background: #99a; opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: #eee; color: #333; border: 1px solid #999; }

.summary-screen { text-align: center; padding: 40px 20px; }
.summary-screen .score { font-size: 42px; font-weight: bold; color: #154734; }
.summary-screen .status.passed { color: #154734; }
.summary-screen .status.failed { color: #ed2939; }
