/* ══════════════════════════════════════════════════════════════════
   AoE2 RMS — New-user onboarding (guided tour + install walkthrough)
   Drop-in. Uses the theme variables already defined in style.css.
   ══════════════════════════════════════════════════════════════════ */

/* ── Guided tour: cut-out mask + spotlight hole ──
   The four .tour-block panels dim everything EXCEPT the spotlight, and catch
   clicks so the tour drives the flow. The hole is left open: on interactive
   steps (JS sets pointer-events:none) the real element beneath is clickable;
   on info steps (pointer-events:auto) the hole swallows the click. */
.tour-block {
  position: fixed; z-index: 8999;
  background: rgba(6,5,3,0.74);
  transition: all 0.28s cubic-bezier(.4,.1,.2,1);
}
.tour-hole {
  position: fixed;
  z-index: 9000;
  border-radius: 10px;
  box-shadow: 0 0 0 3px var(--accent, #d9b869);
  transition: all 0.28s cubic-bezier(.4,.1,.2,1);
  animation: tour-ring 2.4s ease-in-out infinite;
}
@keyframes tour-ring {
  0%,100% { box-shadow: 0 0 0 3px rgba(217,184,105,0.55); }
  50%     { box-shadow: 0 0 0 5px rgba(242,215,141,0.9); }
}

/* Little "do this" instruction under the coach body on interactive steps */
.tour-hint {
  margin-top: 12px;
  font-family: var(--serif, "EB Garamond", serif);
  font-size: 0.82rem; color: var(--accent2, #f2d78d); text-align: center;
  background: var(--accent-dim, rgba(217,184,105,0.12));
  border: 1px dashed var(--accent, #d9b869); border-radius: 8px;
  padding: 7px 10px;
  animation: tour-hint-pulse 1.6s ease-in-out infinite;
}
@keyframes tour-hint-pulse { 0%,100% { opacity: 0.72; } 50% { opacity: 1; } }

/* ── Coach card ── */
.tour-card {
  position: fixed;
  z-index: 9001;
  width: 340px; max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, var(--surface2, #1e1a12), var(--surface, #16130d));
  border: 1px solid var(--accent, #d9b869);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.7);
  color: var(--text, #f0e8d7);
  animation: tour-pop 0.22s ease-out;
}
@keyframes tour-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.tour-card-arrow {
  position: absolute; width: 16px; height: 16px;
  background: var(--surface2, #1e1a12);
  border: 1px solid var(--accent, #d9b869);
  transform: rotate(45deg);
}
.tour-card-arrow.left   { left: -9px;  border-right: none;  border-top: none; }
.tour-card-arrow.right  { right: -9px; border-left: none;   border-bottom: none; }
.tour-card-arrow.top    { top: -9px;   border-right: none;  border-bottom: none; }
.tour-card-arrow.bottom { bottom: -9px;border-left: none;   border-top: none; }

.tour-eyebrow {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.tour-step-count {
  font-family: var(--display, "Cinzel", serif);
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent, #d9b869);
}
.tour-skip {
  font-family: var(--serif, "EB Garamond", serif);
  font-size: 0.76rem; color: var(--muted, #b0a184);
  background: none; border: none; cursor: pointer; padding: 0;
}
.tour-skip:hover { color: var(--accent2, #f2d78d); }
.tour-title {
  font-family: var(--display, "Cinzel", serif);
  font-weight: 700; font-size: 1.05rem; color: var(--accent2, #f2d78d); margin-bottom: 8px;
}
.tour-body {
  font-family: var(--serif, "EB Garamond", serif);
  font-size: 0.92rem; line-height: 1.55; color: var(--text, #f0e8d7);
}
.tour-body b { color: var(--accent, #d9b869); }

.tour-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border2, #463920); transition: background 0.2s; }
.tour-dot.on { background: var(--accent, #d9b869); }
.tour-btns { display: flex; gap: 8px; }

.tour-btn {
  font-family: var(--display, "Cinzel", serif);
  font-weight: 700; font-size: 0.84rem; cursor: pointer;
  padding: 8px 18px; border-radius: 8px; border: 1px solid;
}
.tour-btn.back {
  background: var(--surface3, #2b2417); color: var(--text, #f0e8d7);
  border-color: var(--border2, #463920); padding: 8px 14px; font-weight: 600;
}
.tour-btn.back:hover { border-color: var(--accent, #d9b869); }
.tour-btn.next {
  background: linear-gradient(180deg, var(--accent2, #f2d78d), var(--accent, #d9b869));
  color: var(--ink, #221909); border-color: #7a5a20;
  box-shadow: inset 0 1px 0 rgba(255,246,214,0.6);
}
.tour-btn.next:hover { filter: brightness(1.06); }
.tour-btn.done {
  background: linear-gradient(180deg, #9dbe77, var(--green, #86a862));
  color: #14100a; border-color: #5f7a44;
}

/* ── "Show me around" relaunch button (injected into the header nav) ── */
.tour-relaunch {
  font-family: var(--display, "Cinzel", serif);
  font-size: 0.78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  color: var(--muted, #b0a184);
  border: 1px solid var(--border2, #463920);
  background: rgba(0,0,0,0.15);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all 0.15s;
}
.tour-relaunch:hover { color: var(--accent2, #f2d78d); border-color: var(--accent, #d9b869); }

/* ══════════════════════════════════════════════════════════════════
   Install walkthrough — upgrades the existing #output-modal install guide
   into the friendly numbered, checkable 3-step card (design 1d).
   ══════════════════════════════════════════════════════════════════ */
.install-guide {
  margin-top: 18px;
  background: linear-gradient(180deg, rgba(255,240,205,0.02), transparent 60%), var(--surface, #16130d);
  border: 1px solid var(--border2, #463920);
  border-radius: 12px;
  padding: 18px 20px;
}
.install-title {
  font-family: var(--display, "Cinzel", serif);
  font-weight: 700; font-size: 1.02rem; color: var(--accent2, #f2d78d);
  margin-bottom: 4px;
}
.install-guide .install-lead {
  font-family: var(--serif, "EB Garamond", serif);
  font-size: 0.86rem; color: var(--muted, #b0a184); margin-bottom: 14px;
}
/* numbered step list */
ol.install-steps { list-style: none; counter-reset: ins; margin: 0; padding: 0; }
ol.install-steps > li {
  counter-increment: ins;
  position: relative;
  padding: 0 0 16px 44px;
  margin: 0;
  font-family: var(--serif, "EB Garamond", serif);
  font-size: 0.92rem; line-height: 1.55; color: var(--text, #f0e8d7);
}
ol.install-steps > li:not(:last-child) { border-bottom: 1px solid var(--border, #2c2415); margin-bottom: 16px; }
ol.install-steps > li::before {
  content: counter(ins);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display, "Cinzel", serif); font-weight: 700; font-size: 0.9rem;
  color: var(--ink, #221909);
  background: radial-gradient(circle at 35% 30%, var(--accent2, #f2d78d), var(--accent, #d9b869) 75%);
  box-shadow: inset 0 1px 0 rgba(255,246,214,0.6);
}
ol.install-steps > li strong { font-family: var(--display, "Cinzel", serif); font-weight: 700; color: var(--text, #f0e8d7); }

.install-path {
  display: flex; gap: 8px; align-items: stretch; margin: 9px 0 6px;
}
.install-path code {
  flex: 1;
  background: #0d1117; border: 1px solid var(--border, #2c2415); border-radius: 7px;
  padding: 9px 11px;
  font-family: "Cascadia Code", "Consolas", monospace; font-size: 0.72rem; line-height: 1.5;
  color: #adbac7; word-break: break-all;
}
.install-path .btn { flex: 0 0 auto; align-self: flex-start; }
.install-hint {
  display: block;
  font-family: var(--serif, "EB Garamond", serif);
  font-size: 0.78rem; font-style: italic; color: var(--muted, #b0a184); margin-top: 4px;
}
.install-hint strong { color: var(--accent, #d9b869); font-style: normal; }
