/* The onboarding tour and the city guide.
 *
 * One of the stylesheets split out of the old style.css. index.html links them
 * in the order they had in that file, so the cascade is unchanged - keep
 * that order when adding a rule, or a later sheet may win where it used to lose. */

/* ---------- Onboarding Tour & City Guide ---------- */

/* #dungeon-hud is z-index 12 (hud.css), well under #city-ui's opaque,
 * full-screen z-index 50 backdrop - so unhiding it in the city during the
 * tour (onboarding.js, setDungeonHudVisible) painted it completely behind
 * the city screen. This lifts it above the city, but still under the tour
 * card (z-index 90), only while the tour is holding it open. */
#dungeon-hud.tour-pinned { z-index: 60; }

.city-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.city-tour-btn {
  min-width: unset !important;
  min-height: unset !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  color: var(--gold) !important;
  background: rgba(11, 13, 16, 0.8) !important;
  border: 1px solid var(--gold-dark) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.city-tour-btn:hover {
  opacity: 1;
  border-color: var(--gold) !important;
  color: #fff3d3 !important;
}

#city-ui #btn-city-tools[aria-expanded="true"] {
  border-color: var(--gold) !important;
  color: #fff3d3 !important;
  background: rgba(42, 32, 20, 0.96) !important;
}

@media (max-width: 700px) and (orientation: portrait), (max-width: 560px) {
  #city-ui .city-tour-btn {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 8px 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
}

#onboarding-overlay {
  position: absolute;
  /* Dims the whole screen, under a notch too; the card stays in the safe
     area (base.css, edge to edge). */
  inset: calc(-1 * var(--edge-top)) calc(-1 * var(--edge-right)) calc(-1 * var(--edge-bottom)) calc(-1 * var(--edge-left));
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 calc(20px + var(--edge-right)) calc(28px + var(--edge-bottom)) calc(20px + var(--edge-left));
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
}

.onboarding-card {
  width: min(480px, 94vw);
  padding: 18px 22px;
  background: rgba(11, 13, 16, 0.96);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px #08090a, 0 8px 32px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onboarding-skip {
  min-width: unset !important;
  min-height: unset !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  color: var(--muted) !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.onboarding-skip:hover {
  color: var(--parchment) !important;
}

.onboarding-title {
  margin: 0;
  color: #fff0c9;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 #000;
}

.onboarding-body {
  margin: 0;
  color: #ddd0b2;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}

.onboarding-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.onboarding-nav-btn {
  min-width: 90px !important;
  min-height: 38px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
}

.tour-highlight {
  outline: 2px solid var(--gold) !important;
  outline-offset: 3px;
  box-shadow: 0 0 16px rgba(200, 153, 72, 0.65) !important;
  transition: outline 180ms ease, box-shadow 180ms ease;
  z-index: 70 !important;
}

@media (prefers-reduced-motion: reduce) {
  .tour-highlight { transition: none; }
}
