/* Practice tour — intro splash + glowing V tracker + floating bubble */

.practice-tour {
  --tour-accent: #d4a017;
  --tour-glow: rgba(212, 160, 23, 0.65);
  --tour-v: #f0c14b;
}

.practice-tour[hidden] {
  display: none !important;
}

/* Lighter dim — tracker is the hero */
.practice-tour__spotlight {
  position: fixed;
  pointer-events: none;
  z-index: 100005;
  border-radius: 12px;
  box-shadow:
    0 0 0 2px var(--tour-glow),
    0 0 24px rgba(212, 160, 23, 0.35),
    0 0 0 9999px rgba(4, 8, 16, 0.48);
  transition: top 0.4s ease, left 0.4s ease, width 0.4s ease, height 0.4s ease, opacity 0.25s ease;
  opacity: 0;
}

.practice-tour__spotlight--on {
  opacity: 1;
}

.practice-tour-target {
  position: relative;
  z-index: 100006 !important;
}

/* ── Intro splash (center) ───────────────────────────────────── */

.practice-tour__intro {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 16, 0.55);
  backdrop-filter: blur(4px);
  animation: practice-fade-in 0.3s ease;
}

.practice-tour__intro[hidden] {
  display: none !important;
}

.practice-tour__intro-card {
  width: min(400px, 100%);
  padding: 28px 24px 22px;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(165deg, #141c30 0%, #0a0f1a 100%);
  border: 1px solid rgba(212, 160, 23, 0.4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 48px rgba(212, 160, 23, 0.12);
  color: #e8ecf4;
}

.practice-tour__intro-v {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 26px/1 "Segoe UI", system-ui, sans-serif;
  color: #1a1408;
  background: linear-gradient(145deg, #f0c14b, #d4a017);
  box-shadow: 0 0 28px var(--tour-glow);
  animation: practice-v-pulse 2s ease-in-out infinite;
}

.practice-tour__intro-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #f8fafc;
}

.practice-tour__intro-card p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: #94a3b8;
}

.practice-tour__intro-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Glowing V tracker ─────────────────────────────────────── */

.practice-tour__tracker {
  position: fixed;
  z-index: 100015;
  width: 44px;
  height: 44px;
  pointer-events: none;
  transition: top 0.45s cubic-bezier(0.22, 1, 0.36, 1), left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.practice-tour__tracker[hidden] {
  display: none !important;
}

.practice-tour--active .practice-tour__tracker {
  z-index: 2147483646;
  pointer-events: none;
}

.practice-tour__tracker-v {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font: 800 20px/1 "Segoe UI", system-ui, sans-serif;
  color: #1a1408;
  background: linear-gradient(145deg, #f0c14b, #d4a017);
  box-shadow: 0 0 20px var(--tour-glow), 0 4px 12px rgba(0, 0, 0, 0.35);
}

.practice-tour__tracker-v::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #d4a017;
  filter: drop-shadow(0 0 4px var(--tour-glow));
}

.practice-tour__tracker-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(240, 193, 75, 0.55);
  animation: practice-tracker-ring 1.8s ease-out infinite;
}

@keyframes practice-tracker-ring {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

@keyframes practice-v-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--tour-glow); }
  50% { box-shadow: 0 0 36px rgba(240, 193, 75, 0.85); }
}

@keyframes practice-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── V coach + compact strip (follows target) ───────────────── */

.practice-tour__coach {
  position: fixed;
  z-index: 2147483647;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: none;
  transition: top 0.4s ease, left 0.4s ease;
}

.practice-tour__coach[hidden] {
  display: none !important;
}

.practice-tour__coach-v {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.practice-tour__coach-v .practice-tour__tracker-v {
  position: relative;
  z-index: 2;
}

.practice-tour__coach-v .practice-tour__tracker-pulse {
  position: absolute;
  inset: -8px;
}

.practice-tour__strip {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(10, 14, 24, 0.92);
  border: 1px solid rgba(212, 160, 23, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  color: #e8ecf4;
  font-size: 12px;
  line-height: 1.45;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.practice-tour__strip[hidden] {
  display: none !important;
}

.practice-tour--active .practice-tour__coach {
  z-index: 2147483647;
}

.practice-tour__bubble-step {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tour-accent);
}

.practice-tour__bubble-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}

.practice-tour__bubble-body {
  margin: 0 0 6px;
  color: #94a3b8;
  font-size: 12px;
}

.practice-tour__bubble-why {
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 120, 212, 0.1);
  border: 1px solid rgba(0, 120, 212, 0.2);
  color: #bae6fd;
  font-size: 11px;
}

.practice-tour__bubble-celebrate {
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  font-weight: 600;
  font-size: 11px;
}

.practice-tour__bubble-why[hidden],
.practice-tour__bubble-celebrate[hidden],
.practice-tour__bubble-wait[hidden],
.practice-tour__bubble-link[hidden] {
  display: none !important;
}

.practice-tour__bubble-wait {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
}

.practice-tour__bubble-wait::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tour-accent);
  animation: practice-wait-pulse 1.2s ease infinite;
}

@keyframes practice-wait-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.practice-tour--no-dim .practice-tour__spotlight--on {
  box-shadow:
    0 0 0 2px var(--tour-glow),
    0 0 24px rgba(212, 160, 23, 0.35);
}

.practice-tour--no-spotlight .practice-tour__spotlight--on {
  opacity: 0 !important;
}

.practice-tour__bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.practice-tour__btn {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font: 600 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.practice-tour__btn--primary {
  background: linear-gradient(135deg, #d4a017, #f0c14b);
  color: #17130a;
}

.practice-tour__btn--ghost {
  background: transparent;
  color: #94a3b8;
}

.practice-tour__btn--sample {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

/* Hints lab + typing zone (unchanged) */
.practice-hints-lab {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.28);
}

.practice-hints-lab__label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.practice-hints-lab__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.practice-hints-lab__btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 8px 16px;
  font: 600 13px/1 system-ui, sans-serif;
  cursor: pointer;
}

.practice-hints-lab__btn--active {
  border-color: rgba(212, 160, 23, 0.65);
  color: #fde68a;
  box-shadow: 0 0 16px rgba(212, 160, 23, 0.25);
}

.practice-typing-zone {
  margin-top: 20px;
  padding: 16px 18px 20px;
  border-radius: 14px;
  border: 1px dashed rgba(0, 120, 212, 0.35);
  background: rgba(0, 120, 212, 0.06);
}

.practice-typing-zone__title {
  margin: 0 0 6px;
  font-size: 15px;
  color: #f1f5f9;
}

.practice-type-body {
  margin-top: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.practice-type-body:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

.practice__intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.practice__steps--tour {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.practice__steps--tour li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #64748b;
  font-size: 13px;
}

.practice__steps--tour li.is-done { color: #86efac; }
.practice__steps--tour li.is-active { color: #f1f5f9; }

.practice__steps--tour .step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.practice__steps--tour li.is-active .step-num {
  background: rgba(212, 160, 23, 0.25);
  color: var(--tour-accent);
  box-shadow: 0 0 12px var(--tour-glow);
}

.practice__steps--tour li.is-done .step-num {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.practice-frame--highlight-key .practice__body {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.35) 0%, transparent 40%);
}
