/* "Show me how": the tours' cursor, its rings and captions (web/lib/showme.js). Over everything,
   and never in the way: only the caption's buttons take the pointer. */

#showme {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#showme.on {
  opacity: 1;
}

.showme-cursor {
  position: absolute;
  left: 0;
  top: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.45));
  /* Shorter than the press itself (lib/showme.js's PRESS_MS), so that it is seen all the way down. */
  transition: scale 0.12s ease;
  transform-origin: 3px 2px;
}

.showme-cursor path {
  fill: var(--gold-hi, #f5e2a6);
  stroke: var(--ob-0, #060508);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.showme-cursor.down {
  scale: 0.86;
}

.showme-ring {
  position: absolute;
  border: 2px solid var(--gold, #d4af37);
  border-radius: 8px;
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.18),
    0 0 22px rgba(212, 175, 55, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
  animation: showme-breathe 1.6s ease-in-out infinite;
}

.showme-ring.on {
  opacity: 1;
}

@keyframes showme-breathe {
  50% {
    box-shadow:
      0 0 0 7px rgba(212, 175, 55, 0.1),
      0 0 30px rgba(212, 175, 55, 0.65);
  }
}

/* A click: a bubble swelling from the very point the tip pressed, the cursor staying where it is. */
.showme-ripple {
  position: absolute;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 2px solid var(--gold-hi, #f5e2a6);
  background: radial-gradient(circle, rgba(245, 226, 166, 0.55) 0 18%, rgba(212, 175, 55, 0.22) 19% 100%);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.55);
  opacity: 0;
}

.showme-ripple.right {
  border-color: var(--rose, #d08a93);
  background: radial-gradient(circle, rgba(208, 138, 147, 0.55) 0 18%, rgba(208, 138, 147, 0.2) 19% 100%);
  box-shadow: 0 0 16px rgba(208, 138, 147, 0.55);
}

.showme-ripple.go {
  animation: showme-ripple 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes showme-ripple {
  from {
    opacity: 1;
    transform: scale(0.15);
  }
  45% {
    opacity: 0.85;
  }
  to {
    opacity: 0;
    transform: scale(1.25);
  }
}

.showme-keycap {
  position: absolute;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--lacquer-hi, #1b1820);
  border: 1px solid var(--line-3, rgba(212, 175, 55, 0.45));
  color: var(--gold-hi, #f5e2a6);
  font:
    600 13px/1.2 ui-monospace,
    monospace;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  opacity: 0;
}

.showme-keycap.on {
  animation: showme-key 1.4s ease forwards;
}

@keyframes showme-key {
  10%,
  75% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.showme-card {
  position: absolute;
  max-width: min(520px, calc(100vw - 16px));
  padding: 14px 18px 14px;
  border-radius: 12px;
  background: var(--lacquer, #141217);
  border: 1px solid var(--line-3, rgba(212, 175, 55, 0.45));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.6),
    var(--glow, 0 0 14px rgba(212, 175, 55, 0.35));
  color: var(--text, #ebe1cd);
  /* Read while the music is made: large enough to follow from a step back. */
  font-size: 21px;
  line-height: 1.4;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    left 0.3s ease,
    top 0.3s ease;
}

.showme-card.on {
  opacity: 1;
  visibility: visible;
}

.showme-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--gold, #d4af37);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.showme-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showme-count {
  color: var(--muted, #a39780);
}

.showme-x {
  border: 0;
  background: none;
  color: var(--muted, #a39780);
  cursor: pointer;
  font-size: 17px;
  padding: 0 2px;
}

.showme-x:hover {
  color: var(--gold-hi, #f5e2a6);
}

/* Back and Next: plain buttons in the card's foot, to the caption before or on to the next. */
.showme-btn.showme-nav:hover:not(:disabled) {
  border-color: var(--gold, #d4af37);
}
.showme-btn.showme-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

/* How to pause or stop a tour, under every caption of one. */
.showme-keys {
  margin-top: 10px;
  color: var(--muted, #a39780);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.showme-keys:empty {
  display: none;
}

/* Paused (Space): the counter says so, the caption dims a little. */
.showme-count[data-paused]:not([data-paused=""])::after {
  content: " · " attr(data-paused);
  color: var(--gold-hi, #f5e2a6);
}

.showme-card.paused .showme-say {
  opacity: 0.7;
}

.showme-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.showme-foot[hidden],
.showme-btn[hidden] {
  display: none;
}

/* A caption's own buttons (Next, Close…) between Back and Next, in the same row. */
.showme-own {
  display: contents;
}

.showme-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-2, rgba(212, 175, 55, 0.24));
  background: var(--lacquer-hi, #1b1820);
  color: var(--text, #ebe1cd);
  cursor: pointer;
  font: inherit;
  font-size: 17px;
}

.showme-btn.main {
  background: var(--metal-soft, #c6a152);
  border-color: transparent;
  color: var(--ob-0, #060508);
  font-weight: 600;
}

.showme-hint {
  margin-left: auto;
  color: var(--muted, #a39780);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .showme-ring,
  .showme-ripple.go,
  .showme-keycap.on {
    animation: none;
  }
  .showme-card {
    transition: opacity 0.2s ease;
  }
}
