.tt-root {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  pointer-events: none;
}

.tt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  animation: tt-fade 0.18s ease-out;
  pointer-events: auto;
}

.tt-spotlight {
  position: absolute;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.78), 0 0 0 3px rgba(251, 191, 36, 0.95), 0 0 28px rgba(251, 191, 36, 0.55);
  pointer-events: none;
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease;
}

.tt-tooltip {
  pointer-events: auto;
}

.tt-tooltip {
  position: absolute;
  width: min(360px, calc(100vw - 24px));
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px 14px;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(15, 23, 42, 0.06);
  animation: tt-pop 0.18s ease-out;
  pointer-events: auto;
}

.tt-tooltip-center {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 24px));
}

.tt-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tt-progress {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tt-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.tt-close:hover { background: #f1f5f9; color: #0f172a; }

.tt-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.tt-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: #334155;
  margin: 0 0 14px;
}

.tt-body p { margin: 0 0 8px; }
.tt-body p:last-child { margin-bottom: 0; }

.tt-missing-note {
  margin-top: 10px !important;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-weight: 600;
}

.tt-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tt-btn {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}

.tt-btn:active { transform: translateY(1px); }

.tt-btn-ghost {
  background: #f1f5f9;
  color: #0f172a;
}
.tt-btn-ghost:hover { background: #e2e8f0; }
.tt-btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.tt-btn-primary {
  background: #2563eb;
  color: #ffffff;
}
.tt-btn-primary:hover { background: #1d4ed8; }

.tt-tutorial-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f59e0b;
  color: #ffffff;
  border: 0;
  border-radius: 9999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}

.tt-tutorial-fixed {
  position: fixed !important;
  top: 70px;
  right: 16px;
  z-index: 100000;
}

@media (max-width: 480px) {
  .tt-tutorial-fixed { top: 64px; right: 10px; }
}

.tt-tutorial-btn:hover { background: #d97706; }
.tt-tutorial-btn:active { transform: translateY(1px); }

.tt-tutorial-btn .tt-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  font-weight: 800;
  font-size: 12px;
}

.tt-badge-pulse::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  animation: tt-pulse 1.6s ease-out infinite;
}

@keyframes tt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes tt-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes tt-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tt-tooltip-center {
  animation: tt-pop-center 0.2s ease-out;
}

@keyframes tt-pop-center {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 480px) {
  .tt-tooltip { padding: 14px 14px 12px; }
  .tt-title { font-size: 16.5px; }
  .tt-body { font-size: 14px; }
  .tt-btn { padding: 8px 12px; font-size: 13.5px; }
  .tt-tutorial-btn { padding: 6px 10px; font-size: 13px; }
}
