/* GreetRV game kit: coach marks, How to Play, pause menu extras, the fullscreen toast.
   Builds on the shared style.css (#overlay .card, .ribbon, .btn, .menu). */

#overlay { z-index: 40; }

/* ---------- Coach marks ---------- */
.kit-coach { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.kit-coach[hidden], .kit-coach.off { display: none; }
.kit-dim { position: absolute; inset: 0; width: 100%; height: 100%; }
.kit-ring {
  position: absolute; box-sizing: border-box; border-radius: 14px;
  border: 3px dashed rgba(255, 255, 255, 0.8);
}
.kit-ring.lead { border: 4px solid #f2c230; animation: kit-pulse 1.1s ease-in-out infinite; }
@keyframes kit-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 194, 48, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(242, 194, 48, 0); }
}
.kit-bubble {
  position: absolute; pointer-events: auto; box-sizing: border-box;
  width: min(440px, calc(100vw - 16px));
  background: #fffaf0; color: #26313a;
  border: 4px solid #26313a; border-radius: 18px; box-shadow: 0 6px 0 #26313a;
  padding: 12px 14px 10px;
  font: 700 17px/1.3 ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}
.kit-text { margin: 0 0 10px; }
.kit-row { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.kit-row button {
  font: inherit; font-size: 15px; font-weight: 800; border-radius: 12px; cursor: pointer;
  min-height: 40px; padding: 6px 14px; border: 3px solid #26313a;
}
.kit-skip { background: transparent; color: #4a5866; border-color: transparent !important; text-decoration: underline; padding-left: 2px !important; }
.kit-next { background: #f28c28; color: #fff; box-shadow: 0 3px 0 #26313a; margin-left: auto; }
.kit-row button:focus-visible { outline: 3px solid #3fe0ff; outline-offset: 2px; }
@media (max-height: 430px) {
  .kit-bubble { font-size: 15px; padding: 8px 12px 6px; width: min(520px, calc(100vw - 16px)); }
  .kit-text { margin-bottom: 6px; }
  .kit-row button { min-height: 34px; padding: 3px 12px; }
}

/* ---------- Idle nudge (no coach, just a gentle pulse) ---------- */
.kit-nudge { animation: kit-nudge 1.4s ease-in-out infinite; }
@keyframes kit-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 194, 48, 0); }
  50% { box-shadow: 0 0 0 8px rgba(242, 194, 48, 0.55); }
}

/* ---------- Pause menu ---------- */
#overlay .kit-pause { width: min(400px, 100%); }
#overlay .kit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#overlay .kit-grid .btn { min-width: 0; padding-left: 8px; padding-right: 8px; }
#overlay .kit-leave { display: flex; align-items: center; justify-content: center; gap: 6px; background: #26313a; color: #fff; }
#overlay .kit-leave svg { width: 20px; height: 20px; }
@media (max-height: 460px) {
  #overlay .kit-pause { padding-top: 34px; padding-bottom: 10px; }
  #overlay .kit-pause .menu { gap: 8px; }
  #overlay .kit-pause .kit-grid { gap: 8px; }
  #overlay .kit-pause .btn { min-height: 0; padding-top: 7px; padding-bottom: 7px; }
  #overlay .kit-pause .hint { display: none; }
}

/* ---------- How to Play ---------- */
#overlay .kit-howto { width: min(820px, 100%); }
#overlay .kit-panels { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
#overlay .kit-panels li {
  background: #fff; border: 3px solid #e6dccb; border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; text-align: left;
}
#overlay .kit-panels .pic { background: #e9f3e4; border-radius: 12px; display: grid; place-items: center; }
#overlay .kit-panels .pic svg { width: 100%; max-width: 200px; height: auto; display: block; }
#overlay .kit-panels .txt { display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.35; color: #4a5866; font-weight: 600; }
#overlay .kit-panels .txt b { color: #26313a; font-size: 17px; font-weight: 900; display: flex; gap: 8px; align-items: center; }
#overlay .kit-panels .n {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: #f28c28; color: #fff;
  display: grid; place-items: center; font-size: 15px;
}
@media (max-width: 680px), (max-height: 520px) {
  #overlay .kit-panels { grid-template-columns: 1fr; gap: 8px; }
  #overlay .kit-panels li { flex-direction: row; align-items: center; padding: 8px; }
  #overlay .kit-panels .pic { flex: none; width: 112px; }
  #overlay .kit-panels .txt { font-size: 14px; }
  #overlay .kit-panels .txt b { font-size: 15px; }
}
@media (max-height: 520px) and (min-width: 681px) {
  #overlay .kit-panels { grid-template-columns: repeat(3, 1fr); }
  #overlay .kit-panels li { flex-direction: column; align-items: stretch; }
  #overlay .kit-panels .pic { width: auto; }
  #overlay .kit-panels .pic svg { max-height: 74px; }
  #overlay .kit-howto { padding-top: 34px; padding-bottom: 10px; }
  #overlay .kit-howto .buttons { margin-top: 10px; }
}

/* ---------- "Tap pause anytime" toast ---------- */
#kit-toast {
  position: fixed; z-index: 50; left: 50%; top: max(70px, env(safe-area-inset-top));
  transform: translateX(-50%); max-width: calc(100vw - 32px); box-sizing: border-box;
  background: #26313a; color: #fff; border-radius: 999px; padding: 10px 18px;
  font: 800 16px/1.25 ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); pointer-events: none; text-align: center;
  transition: opacity 0.35s;
}
#kit-toast[hidden] { display: none; }
#kit-toast.out { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .kit-ring.lead, .kit-nudge { animation: none; }
  .kit-nudge { box-shadow: 0 0 0 6px rgba(242, 194, 48, 0.55); }
}
@media (max-width: 480px) {
  #kit-toast { border-radius: 16px; font-size: 14px; padding: 8px 14px; width: max-content; max-width: calc(100vw - 48px); }
}
