/* Guide Modal — theme-aware, matches existing modal patterns */
.guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.guide-overlay.visible { opacity: 1; }

.guide-card {
  background: var(--surface, #18160F);
  border: 1px solid var(--border, #454035);
  border-radius: var(--radius, 12px);
  max-width: 440px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px 28px;
}

.guide-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent, #CEB59C);
  margin-bottom: 24px;
  line-height: 1.3;
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  counter-reset: guide-step;
}

.guide-steps li {
  counter-increment: guide-step;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #454035);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text, #DBD6CB);
}
.guide-steps li:last-child { border-bottom: none; }

.guide-steps li::before {
  content: counter(guide-step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim, #584E3B);
  color: var(--accent, #CEB59C);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-dismiss {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius, 12px);
  background: var(--accent, #CEB59C);
  color: var(--bg, #07080A);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.guide-dismiss:hover { background: var(--accent-hover, #DBD6CB); }

/* Help icon button injected into header */
.guide-help-btn {
  background: none;
  border: 1px solid var(--border, #454035);
  color: var(--text-muted, #AEA796);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.guide-help-btn:hover {
  border-color: var(--accent, #CEB59C);
  color: var(--accent, #CEB59C);
}

/* Fallback fixed position when no header found */
.guide-help-btn.fixed {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 9999;
  background: var(--surface, #18160F);
}
