.uos-tour-root[hidden] {
  display: none;
}

.uos-tour-root {
  position: fixed;
  z-index: 10000;
  inset: 0;
  pointer-events: none;
  color: var(--uos-ink, #101c35);
  font-family: var(--uos-font-sans, Inter, Arial, sans-serif);
}

.uos-tour-curtain {
  position: fixed;
  z-index: 1;
  background: rgba(2, 6, 17, .78);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.uos-tour-focus {
  position: fixed;
  z-index: 2;
  border: 2px solid var(--uos-cyan, #38e5ff);
  border-radius: 16px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--uos-cyan, #38e5ff) 14%, transparent), 0 0 34px color-mix(in srgb, var(--uos-cyan, #38e5ff) 54%, transparent);
  pointer-events: none;
  transition: inset .22s ease, width .22s ease, height .22s ease;
}

.uos-tour-card {
  position: fixed;
  z-index: 3;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--uos-core, #176bff) 42%, var(--uos-line, #d8e2ed));
  border-radius: 18px;
  background: var(--uos-surface-raised, #fff);
  color: var(--uos-ink, #101c35);
  box-shadow: var(--uos-shadow-2, 0 28px 90px rgba(2, 6, 17, .5));
  pointer-events: auto;
}

.uos-tour-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.uos-tour-kicker {
  display: block;
  color: var(--uos-core, #176bff);
  font: 750 9px/1.3 var(--uos-font-mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.uos-tour-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border: 1px solid var(--uos-line, #d8e2ed);
  border-radius: 10px;
  background: var(--uos-surface, #fff);
  color: var(--uos-ink, #101c35);
  font-size: 19px;
  cursor: pointer;
}

.uos-tour-progress {
  height: 4px;
  margin: 17px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--uos-canvas-soft, #edf3f9);
}

.uos-tour-progress > i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--uos-core, #176bff), var(--uos-violet, #8065ff));
  transition: width .22s ease;
}

.uos-tour-count {
  color: var(--uos-ink-faint, #718199);
  font: 700 9px var(--uos-font-mono, monospace);
  direction: ltr;
  unicode-bidi: isolate;
}

.uos-tour-card h2 {
  margin: 15px 0 9px;
  color: var(--uos-ink, #101c35);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.uos-tour-card p {
  margin: 0;
  color: var(--uos-ink-soft, #51627c);
  font-size: 13px;
  line-height: 1.6;
}

.uos-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 21px;
}

.uos-tour-skip {
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--uos-ink-soft, #51627c);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.uos-tour-nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--uos-line, #d8e2ed);
  border-radius: 13px;
  background: var(--uos-canvas-soft, #edf3f9);
}

.uos-tour-nav button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--uos-ink, #101c35);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.uos-tour-nav button:last-child {
  min-width: 102px;
  background: var(--uos-core, #176bff);
  color: var(--uos-canvas, #fff);
}

:root[data-theme="light"] .uos-tour-nav button:last-child {
  color: #fff;
}

.uos-tour-nav button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.uos-tour-card button:focus-visible {
  outline: 3px solid var(--uos-focus, #7b4dff);
  outline-offset: 2px;
}

.uos-tour-root[data-side="compact"] .uos-tour-card {
  inset: auto 12px 12px !important;
  width: auto;
  max-height: min(52vh, 520px);
  border-radius: 18px;
}

.uos-tour-root[data-side="compact"] .uos-tour-focus {
  border-radius: 12px;
}

.uos-tour-root[data-side="compact"] .uos-tour-actions {
  align-items: stretch;
  flex-direction: column-reverse;
}

.uos-tour-root[data-side="compact"] .uos-tour-skip {
  align-self: flex-start;
}

.uos-tour-root[data-side="compact"] .uos-tour-nav {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  width: 100%;
}

.uos-tour-root[data-side="compact"] .uos-tour-nav button {
  width: 100%;
}

[dir="rtl"] .uos-tour-actions,
[dir="rtl"] .uos-tour-card-header {
  direction: rtl;
}

@media (prefers-reduced-motion: reduce) {
  .uos-tour-focus,
  .uos-tour-progress > i {
    transition: none;
  }

  .uos-tour-curtain {
    backdrop-filter: none;
  }
}
