/* "How this works" guide (#47). Uses the Clear water tokens from styles.css. */
.guide-bar { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: flex; gap: 0.5rem; }
.guide-bar[hidden] { display: none; }
.guide-bar button { font-size: 0.9rem; padding: 0.55rem 1rem; background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 10px 24px -16px rgba(15, 43, 58, 0.6); }
.guide-bar .guide-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -14px rgba(15, 43, 58, 0.9); }
.guide-bar .guide-tour { color: var(--teal-deep); }
.guide-bar [hidden] { display: none; }

.guide-layer { position: fixed; inset: 0; pointer-events: none; z-index: 35; }
/* Markers stay quiet: a small outlined dot, faint until you point at it. */
.guide-marker { position: absolute; pointer-events: auto; width: 1rem; height: 1rem; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font: 700 0.62rem/1 var(--font); font-style: italic;
  background: var(--surface); color: var(--teal-deep); box-shadow: inset 0 0 0 1px rgba(14, 140, 127, 0.45);
  opacity: 0.55; transition: opacity 120ms ease, background 120ms ease; }
.guide-marker:hover, .guide-marker:focus-visible, .guide-marker[aria-expanded="true"] { opacity: 1; background: var(--teal); color: #fff; box-shadow: none; }
.guide-marker[hidden] { display: none; }

.guide-tip { position: fixed; inset: auto; margin: 0; width: min(18rem, calc(100vw - 24px)); padding: 0.75rem 0.9rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: 0 14px 32px -18px rgba(15, 43, 58, 0.45); font: 400 0.86rem/1.45 var(--font); }
.guide-tip h2 { margin: 0 0 0.2rem; font-size: 0.9rem; color: var(--ink); letter-spacing: -0.01em; }
.guide-tip .guide-text { margin: 0; color: var(--soft); }
.guide-tip .guide-step { margin: 0 0 0.2rem; font-size: 0.75rem; font-weight: 700; color: var(--teal-deep); }
.guide-tip .guide-step[hidden] { display: none; }
.guide-actions { display: flex; gap: 0.4rem; justify-content: flex-end; margin-top: 0.6rem; }
.guide-actions button { font-size: 0.8rem; padding: 0.3rem 0.75rem; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.guide-actions .guide-next { background: var(--teal); color: #fff; box-shadow: none; }
.guide-actions [hidden] { display: none; }
/* Hover previews don't need a Close button; pinned tips and the tour do. */
.guide-tip:not(.touring) .guide-close { margin-left: auto; }

.guide-ring { position: fixed; z-index: 34; pointer-events: none; border-radius: 18px;
  box-shadow: 0 0 0 3px var(--teal), 0 0 0 9999px rgba(15, 43, 58, 0.18); transition: all 300ms ease; }
.guide-ring[hidden] { display: none; }

@media (max-width: 640px) {
  /* On a phone the tip is a bottom sheet you dismiss with a tap. */
  .guide-tip { inset: auto 0 0 0; width: 100%; max-width: none; border-radius: 20px 20px 0 0; padding: 1.15rem 1.25rem 1.5rem; }
  .guide-bar { right: 0.75rem; bottom: 0.75rem; }
  .guide-marker { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-marker, .guide-ring { transition: none; }
}

/* On phones the guide folds to one small round button, so it never covers the page. */
@media (max-width: 640px) {
  .guide-bar { right: 0.75rem; bottom: max(0.75rem, env(safe-area-inset-bottom)); gap: 0.4rem; }
  .guide-bar .guide-toggle { font-size: 0; width: 2.6rem; height: 2.6rem; padding: 0; border-radius: 50%; display: grid; place-items: center; }
  .guide-bar .guide-toggle::after { content: "?"; font-size: 1.1rem; font-weight: 800; }
  .guide-bar .guide-tour { font-size: 0.85rem; padding: 0.5rem 0.85rem; }
}

