/* ── Confirm modal ────────────────────────────────────────────────────────── */
#confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 700; /* above every modal (600) and the brain overlay (500): a confirm can come from any of them */
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--shadow) 55%, transparent);
  backdrop-filter: blur(4px);
}

#confirm-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 28px 22px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 8px 40px color-mix(in srgb, var(--shadow) 50%, transparent);
}

#confirm-msg {
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 22px;
  text-align: center;
}

.confirm-btns {
  display: flex;
  gap: 10px;
}

.confirm-btns button {
  flex: 1;
}

#confirm-ok {
  background: var(--ko);
  border: 1px solid var(--ko);
  border-radius: 10px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
}

#confirm-ok:hover { background: var(--ko-line); border-color: var(--ko-line); }

/* ── Tutorial (guided tour) ────────────────────────────────────────────────── */
#tutorial-btn { margin-left: auto; }

#tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 600; /* above the brain overlay (500) so the tour drives it too */
  pointer-events: none; /* let clicks reach the page; the click-guard enforces lock-out */
}

#tut-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--scrim) 82%, transparent);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

#tut-spotlight {
  position: fixed;
  border-radius: 12px;
  border: 2px solid var(--action);
  box-shadow: 0 0 0 9999px color-mix(in srgb, var(--scrim) 82%, transparent), 0 0 24px var(--action-glow);
  pointer-events: none;
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}

#tut-tooltip {
  position: fixed;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 48px color-mix(in srgb, var(--shadow) 55%, transparent);
  pointer-events: auto;
  z-index: 1;
}

#tut-progress {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 8px;
}

#tut-title .tut-en {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
#tut-title .tut-fr {
  display: block;
  font-size: 13px;
  font-style: italic;
  color: var(--action-lilac);
  margin-top: 2px;
}

#tut-body {
  margin-top: 12px;
}
#tut-body .tut-en {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
#tut-body .tut-fr {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
  color: var(--muted);
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

#tut-action {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--action) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--action) 40%, transparent);
}
#tut-action .tut-en {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
#tut-action .tut-fr {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  margin-top: 4px;
}

#tut-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.tut-nav-right {
  display: flex;
  gap: 8px;
}
#tut-nav button {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 9px;
}
#tut-skip { padding-left: 0; }

/* On phones the card fills the viewport, so the tooltip can't sit beside it.
   tutorial.js docks it as a bottom sheet (left/right/bottom set inline); cap its
   height and let it scroll so it never grows tall enough to bury the card. */
@media (max-width: 720px) {
  #tut-tooltip {
    max-height: 46vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
