/* ===== B2B Delect — интерактивное обучение (onboarding tour) ===== */

.obt-root {
  position: fixed;
  inset: 0;
  z-index: 19900;
  pointer-events: none;
}

.obt-root.is-active {
  pointer-events: none;
}

.obt-coach,
.obt-dialog {
  pointer-events: auto;
}

.obt-root[hidden] {
  display: none !important;
}

/* --- Setup coach (живое превью + центральные шаги) --- */
.obt-coach {
  position: fixed;
  z-index: 4;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

.obt-coach[hidden] {
  display: none !important;
}

.obt-coach.is-visible {
  opacity: 1;
}

.obt-coach.is-dock {
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(440px, calc(100vw - 24px));
  transform: translateX(-50%) translateY(0);
}

.obt-coach.is-anchor {
  top: var(--obt-coach-top, auto);
  left: var(--obt-coach-left, auto);
  bottom: auto;
  width: min(360px, calc(100vw - 24px));
  transform: translateY(0);
  z-index: 6;
}

.obt-coach.is-anchor::after {
  content: '';
  position: absolute;
  left: clamp(18px, var(--obt-caret-x, 50%), calc(100% - 18px));
  width: 0;
  height: 0;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  pointer-events: none;
  z-index: 2;
}

.obt-coach.is-anchor[data-caret='top']::after {
  top: -6px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid color-mix(in srgb, var(--card-bg) 90%, transparent);
  filter: drop-shadow(0 -1px 0 color-mix(in srgb, var(--card-border) 78%, var(--accent) 22%));
}

.obt-coach.is-anchor[data-caret='bottom']::after {
  bottom: -6px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid color-mix(in srgb, var(--card-bg) 90%, transparent);
  filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--card-border) 78%, var(--accent) 22%));
}

.obt-coach.is-swapping .obt-coach-inner {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.obt-coach-inner.is-enter {
  animation: obt-coach-content-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes obt-coach-content-in {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.obt-coach.is-center {
  top: 50%;
  left: 50%;
  width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  z-index: 5;
}

.obt-coach-inner {
  position: relative;
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-border) 78%, var(--accent) 22%);
  border-radius: calc(var(--card-radius, 12px) + 8px);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.28),
    0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 24px 24px 20px;
  backdrop-filter: saturate(190%) blur(28px);
  -webkit-backdrop-filter: saturate(190%) blur(28px);
  overflow: hidden;
}

.obt-coach-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent) 55%, #fff),
    transparent
  );
  opacity: 0.85;
  pointer-events: none;
}

.obt-coach-inner--setup {
  padding-top: 22px;
}

.obt-coach-inner--setup .obt-setup-title {
  font-size: clamp(21px, 3.8vw, 26px);
  letter-spacing: -0.035em;
}

.obt-coach-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.obt-coach-live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: obt-live-dot 1.8s ease-in-out infinite;
}

@keyframes obt-live-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.88);
  }
}

.obt-setup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light, rgba(59, 130, 246, 0.12));
  border-radius: 999px;
  padding: 5px 11px;
  margin-bottom: 14px;
}

.obt-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.obt-phase-badge__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 11px;
}

.obt-phase-badge__step {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.obt-phase-badge--setup .obt-phase-badge__label {
  color: #1d4ed8;
  background: color-mix(in srgb, #3b82f6 16%, transparent);
}

html[data-theme='light'] .obt-phase-badge--setup .obt-phase-badge__label {
  color: #1e40af;
  background: color-mix(in srgb, #3b82f6 12%, #fff);
}

.obt-phase-badge--tour .obt-phase-badge__label {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 18%, transparent);
}

html[data-theme='light'] .obt-phase-badge--tour .obt-phase-badge__label {
  color: #5b21b6;
  background: color-mix(in srgb, #8b5cf6 12%, #fff);
}

.obt-coach-inner--setup {
  padding-top: 22px;
}

.obt-coach-inner--tour {
  padding-bottom: 16px;
}

.obt-coach-live-badge--setup::before {
  background: #3b82f6;
  box-shadow: 0 0 0 3px color-mix(in srgb, #3b82f6 22%, transparent);
}

.obt-coach-live-badge--tour::before {
  background: #8b5cf6;
  box-shadow: 0 0 0 3px color-mix(in srgb, #8b5cf6 22%, transparent);
}

.obt-chapter-progress-fill--setup {
  background: linear-gradient(90deg, #3b82f6, color-mix(in srgb, #3b82f6 70%, #60a5fa));
}

.obt-chapter-progress-fill--tour {
  background: linear-gradient(90deg, #7c3aed, color-mix(in srgb, #8b5cf6 70%, #a78bfa));
}

.obt-setup-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.obt-setup-lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.obt-setup-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.obt-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.obt-pill {
  appearance: none;
  border: 1px solid var(--filter-border, var(--card-border));
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.obt-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.obt-pill.is-active {
  border-color: var(--accent);
  background: var(--accent-light, rgba(59, 130, 246, 0.14));
  color: var(--accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    0 8px 20px color-mix(in srgb, var(--accent) 16%, transparent);
}

.obt-pill.is-pulse {
  animation: obt-pill-pulse 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes obt-pill-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.obt-pill:active {
  transform: scale(0.97);
}

.obt-setup-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.obt-setup-progress-dot {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--card-border);
  overflow: hidden;
}

.obt-setup-progress-dot.is-done,
.obt-setup-progress-dot.is-current {
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff));
}

.obt-chapter-progress {
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-border) 88%, transparent);
  overflow: hidden;
  margin: 0 0 16px;
}

.obt-chapter-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #fff));
  transition: width 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.obt-chapter-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.38) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: obt-progress-shine 2.8s ease-in-out infinite;
}

@keyframes obt-progress-shine {
  0%,
  100% {
    transform: translateX(-120%);
  }
  50% {
    transform: translateX(120%);
  }
}

.obt-setup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.obt-coach-kbd-hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-tertiary);
  text-align: center;
}

.obt-kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--card-border) 75%, var(--accent) 25%);
  background: color-mix(in srgb, var(--card-bg) 82%, var(--accent) 8%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  vertical-align: baseline;
}

.obt-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

.obt-btn:active {
  transform: scale(0.97);
}

.obt-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.obt-btn--ghost:hover {
  color: var(--text);
}

.obt-btn--primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff), var(--accent));
  color: #fff;
  box-shadow:
    0 10px 28px color-mix(in srgb, var(--accent) 34%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.obt-btn--primary:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 98%, #fff), var(--accent-hover, var(--accent)));
  box-shadow:
    0 12px 32px color-mix(in srgb, var(--accent) 40%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.obt-setup-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-tertiary);
}

.obt-setup-hint--warn {
  color: var(--warning, #fbbf24);
}

.obt-suppliers-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.obt-suppliers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.obt-suppliers-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.obt-suppliers-actions {
  display: flex;
  gap: 6px;
}

.obt-suppliers-action {
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface-2, var(--bg)) 70%, transparent);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.obt-suppliers-action:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2, var(--bg)));
}

.obt-suppliers-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: color-mix(in srgb, var(--surface-2, var(--bg)) 82%, transparent);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}

.obt-suppliers-search:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.obt-suppliers-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(38vh, 240px);
  overflow: auto;
  padding-right: 2px;
}

.obt-supplier-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.obt-supplier-item:hover {
  background: var(--row-hover, color-mix(in srgb, var(--text) 6%, transparent));
}

.obt-supplier-item input[type='checkbox'] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent, #0078d4);
}

.obt-supplier-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.25;
}

.obt-supplier-badge {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.obt-coach-inner--setup:has(.obt-suppliers-panel) {
  max-width: min(420px, calc(100vw - 32px));
}

/* --- Spotlight tour --- */
.obt-tour-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s;
}

/* Во время обучения — каталог и фильтры поверх гостевого лэндинга */
html.obt-onboarding-active #guest-landing {
  display: none !important;
}

html.obt-onboarding-catalog #home-dashboard {
  display: none !important;
}

html.obt-onboarding-catalog #catalog-filter-bar {
  display: flex !important;
  visibility: visible !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

html.obt-onboarding-catalog #catalog-table-card {
  display: block !important;
  visibility: visible !important;
}

html.obt-onboarding-catalog .right-col > .catalog-search-dock {
  display: block !important;
  visibility: visible !important;
}

html.obt-onboarding-active.guest-landing-active .main-grid,
html.obt-onboarding-active.guest-landing-boot .main-grid {
  grid-template-columns: var(--b2b-sidebar-w, 320px) 20px minmax(0, 1fr) !important;
}

html.obt-onboarding-active.guest-landing-active .right-col,
html.obt-onboarding-active.guest-landing-boot .right-col {
  grid-column: auto !important;
  max-width: none !important;
  width: auto !important;
  margin-inline: 0 !important;
}

html.obt-onboarding-active.guest-landing-active .right-col > .catalog-search-dock,
html.obt-onboarding-active.guest-landing-active .right-col > #search-kind-hint,
html.obt-onboarding-active.guest-landing-boot .right-col > .catalog-search-dock,
html.obt-onboarding-active.guest-landing-boot .right-col > #search-kind-hint {
  display: block !important;
}

html.obt-onboarding-active:not(.obt-onboarding-catalog):not(.obt-tour-spec-panel) #home-dashboard {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--home-dash-gap, 12px) !important;
  visibility: visible !important;
  min-width: 0;
}

html.obt-onboarding-active.obt-tour-spec-panel #home-dashboard {
  display: none !important;
  visibility: hidden !important;
}

html.obt-onboarding-active.obt-tour-spec-panel #catalog-filter-bar,
html.obt-onboarding-active.obt-tour-spec-panel #catalog-table-card {
  display: none !important;
  visibility: hidden !important;
}

html.obt-onboarding-active.obt-tour-spec-panel #spec-match-panel:not([hidden]) {
  display: block !important;
  visibility: visible !important;
}

html.obt-onboarding-active:not(.obt-onboarding-catalog):not(.obt-onboarding-tour) #catalog-filter-bar,
html.obt-onboarding-active:not(.obt-onboarding-catalog):not(.obt-onboarding-tour) #catalog-table-card {
  display: none !important;
}

html.obt-onboarding-active #table-body,
html.obt-onboarding-active #catalog-table-card table tbody {
  overflow-anchor: none;
}

html.obt-onboarding-active.obt-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
  scroll-behavior: auto;
}

html.obt-onboarding-active.obt-scroll-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.obt-onboarding-active.obt-scroll-locked .table-scroll-wrap,
html.obt-onboarding-active.obt-scroll-locked #watchlist-panel-content {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* Экскурсия: не обрезать тени карточек сайдбара (как premium-sidebar в modals.css) */
html.obt-onboarding-active .main-grid:not(.sidebar-collapsed) .left-col {
  overflow: visible;
}

html.obt-onboarding-active.obt-scroll-locked .obt-suppliers-list {
  overflow: auto !important;
  overscroll-behavior: contain;
}

html.obt-onboarding-watchlist #watchlist-overlay.open,
html.obt-onboarding-watchlist #watchlist-panel.open {
  z-index: 20050 !important;
}

html.obt-onboarding-watchlist .obt-root {
  z-index: 20100 !important;
}

html.obt-onboarding-account header.header {
  position: relative;
  z-index: 20060 !important;
}

html.obt-onboarding-account .header-controls,
html.obt-onboarding-account .user-menu-wrap {
  position: relative;
  z-index: 20062;
}

html.obt-onboarding-account #user-menu.open,
html.obt-onboarding-account #notif-dd.open,
html.obt-onboarding-account #theme-panel.open {
  z-index: 20063 !important;
}

html.obt-onboarding-account-menu #user-menu.open {
  z-index: 20064 !important;
}

html.obt-onboarding-active.guest-landing-active .left-col,
html.obt-onboarding-active.guest-landing-active .sidebar-divider,
html.obt-onboarding-active.guest-landing-boot .left-col,
html.obt-onboarding-active.guest-landing-boot .sidebar-divider {
  display: revert !important;
}

.obt-tour-layer.is-open {
  opacity: 1;
  visibility: visible;
}

.obt-tour-layer.is-center-step::before {
  display: none;
}

/* --- Setup: центральная модалка + мягкая атмосфера --- */
.obt-tour-layer.is-setup-center::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 58% at 50% 42%, transparent 0%, rgba(0, 0, 0, 0.14) 100%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 62%);
}

html[data-theme='light'] .obt-tour-layer.is-setup-center::before {
  background:
    radial-gradient(ellipse 72% 58% at 50% 42%, transparent 0%, rgba(15, 23, 42, 0.08) 100%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 62%);
}

.obt-setup-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.obt-setup-ambient[hidden] {
  display: none !important;
}

.obt-setup-ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.42;
  animation: obt-ambient-drift 14s ease-in-out infinite alternate;
}

.obt-setup-ambient__orb--a {
  width: min(42vw, 360px);
  height: min(42vw, 360px);
  top: 12%;
  left: 8%;
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.obt-setup-ambient__orb--b {
  width: min(36vw, 300px);
  height: min(36vw, 300px);
  right: 6%;
  bottom: 14%;
  background: color-mix(in srgb, #8b5cf6 22%, transparent);
  animation-delay: -5s;
  animation-duration: 18s;
}

@keyframes obt-ambient-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(18px, -14px) scale(1.06);
  }
}

.obt-tour-layer.is-setup-center .obt-coach.is-center {
  z-index: 5;
}

.obt-tour-layer.is-setup-phase .obt-setup-ambient__orb {
  animation: none;
  opacity: 0.34;
}

/* --- Chapter breath: мягкий wash + титры (без занавеса) --- */
.obt-stage {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.obt-tour-layer.is-theater-active .obt-stage {
  z-index: 80;
}

.obt-tour-layer.is-theater-veiled #obt-coach,
.obt-tour-layer.is-theater-veiled .obt-spotlight-ring,
.obt-tour-layer.is-theater-veiled .obt-table-copy-demo {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.obt-tour-layer.is-theater-veiled::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(16px) saturate(1.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.22);
  background: rgba(6, 4, 14, 0.38);
  opacity: 0;
  animation: obt-theater-veil-in 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html[data-theme='light'] .obt-tour-layer.is-theater-veiled::before {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

@keyframes obt-theater-veil-in {
  from {
    opacity: 0;
    backdrop-filter: blur(0) saturate(1);
    -webkit-backdrop-filter: blur(0) saturate(1);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(16px) saturate(1.22);
    -webkit-backdrop-filter: blur(16px) saturate(1.22);
  }
}

.obt-stage[hidden] {
  display: none !important;
}

.obt-tour-layer.is-theater-active::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 min(120px, 16vw) rgba(0, 0, 0, 0.28);
  opacity: 1;
  transition: box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.obt-tour-layer.is-theater-veiled::after {
  box-shadow:
    inset 0 0 min(160px, 22vw) rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

html[data-theme='light'] .obt-tour-layer.is-theater-active::after {
  box-shadow: inset 0 0 min(88px, 12vw) rgba(15, 23, 42, 0.1);
}

.obt-stage__bloom {
  position: absolute;
  inset: -8%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 46%,
    color-mix(in srgb, var(--obt-act-accent, var(--accent)) 34%, rgba(255, 220, 150, 0.12)) 0%,
    color-mix(in srgb, var(--obt-act-accent, var(--accent)) 12%, transparent) 34%,
    transparent 68%
  );
  transform: scale(0.9);
}

.obt-stage__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--obt-act-accent, var(--accent)) 72%, #fff);
  box-shadow:
    0 0 36px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 42%, transparent),
    inset 0 0 24px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 18%, transparent);
  opacity: 0;
  transform: scale(0.28);
  pointer-events: none;
  z-index: 4;
}

.obt-stage.is-bloom .obt-stage__bloom {
  animation: obt-stage-bloom 1.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.obt-stage.is-bloom .obt-stage__ring {
  animation: obt-stage-ring-expand 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes obt-stage-bloom {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  38% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.42;
    transform: scale(1.12);
  }
}

@keyframes obt-stage-ring-expand {
  0% {
    opacity: 0.9;
    transform: scale(0.28);
  }
  100% {
    opacity: 0;
    transform: scale(4.6);
  }
}

.obt-stage__spotlight {
  position: absolute;
  top: -6%;
  left: 50%;
  width: min(88vw, 640px);
  height: 64%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse 52% 46% at 50% 8%,
    color-mix(in srgb, var(--obt-act-accent, var(--accent)) 36%, rgba(255, 220, 150, 0.18)) 0%,
    color-mix(in srgb, var(--obt-act-accent, var(--accent)) 14%, transparent) 42%,
    transparent 76%
  );
  transition:
    opacity 0.58s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.obt-stage.is-act-lit .obt-stage__spotlight {
  opacity: 1;
  animation: obt-stage-spotlight-breathe 2.8s ease-in-out infinite;
}

@keyframes obt-stage-spotlight-breathe {
  0%,
  100% {
    opacity: 0.82;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
}

.obt-stage__wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(
      ellipse 72% 58% at 50% 42%,
      color-mix(in srgb, var(--accent) 8%, rgba(255, 214, 150, 0.05)) 0%,
      transparent 62%
    ),
    rgba(8, 6, 14, 0.38);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.55s ease;
}

.obt-stage.is-active .obt-stage__wash {
  opacity: 0.16;
}

.obt-stage.is-veiled .obt-stage__wash {
  opacity: 0.9;
}

html[data-theme='light'] .obt-stage.is-active .obt-stage__wash {
  opacity: 0.1;
}

html[data-theme='light'] .obt-stage.is-veiled .obt-stage__wash {
  opacity: 0.62;
  background:
    radial-gradient(
      ellipse 72% 58% at 50% 42%,
      rgba(255, 255, 255, 0.12) 0%,
      transparent 62%
    ),
    rgba(15, 23, 42, 0.42);
}

.obt-stage.obt-stage--lite .obt-stage__wash,
html.obt-lite-motion .obt-stage__wash {
  transition-duration: 0.22s;
}

.obt-stage.obt-stage--lite .obt-stage__spotlight,
html.obt-lite-motion .obt-stage__spotlight {
  transition-duration: 0.24s;
}

#obt-coach.is-theater-suppressed {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.obt-stage__act {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  pointer-events: none;
}

.obt-stage__act[hidden] {
  display: none !important;
}

.obt-stage__act-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: min(680px, 94vw);
  padding: 36px 40px 34px;
  text-align: center;
  border-radius: 28px;
  background: rgba(6, 4, 12, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  opacity: 0;
  transform: translateY(22px) scale(0.94);
  filter: blur(6px);
  transition:
    opacity 0.58s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.72s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.obt-stage__act-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.14) 0%,
    transparent 38%,
    transparent 62%,
    color-mix(in srgb, var(--obt-act-accent, var(--accent)) 16%, transparent) 100%
  );
  transition: opacity 0.6s ease 0.2s;
}

.obt-stage.obt-stage--lite .obt-stage__act-inner,
html.obt-lite-motion .obt-stage__act-inner {
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  transition-duration: 0.26s, 0.3s;
}

html[data-theme='light'] .obt-stage__act-inner {
  background: rgba(12, 8, 18, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
}

.obt-stage__act-roman {
  font-size: clamp(44px, 9.5vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: color-mix(in srgb, var(--obt-act-accent, var(--accent)) 78%, #f0c878);
  text-shadow:
    0 0 48px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 50%, transparent),
    0 8px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  transition:
    opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
    transform 0.88s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
    filter 0.72s ease 0.1s;
}

.obt-stage__act-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--obt-act-accent, var(--accent)) 72%, #f0c878);
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
  transition:
    opacity 0.68s cubic-bezier(0.16, 1, 0.3, 1) 0.22s,
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1) 0.22s,
    filter 0.68s ease 0.22s;
}

.obt-stage__act-rule {
  display: block;
  width: min(220px, 42vw);
  height: 2px;
  margin: 4px 0 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--obt-act-accent, var(--accent)) 75%, #f0c878),
    transparent
  );
  opacity: 0;
  transform: scaleX(0.2);
  transition:
    opacity 0.58s ease 0.34s,
    transform 0.78s cubic-bezier(0.16, 1, 0.3, 1) 0.34s;
}

.obt-stage__act-title {
  max-width: min(560px, 88vw);
  font-size: clamp(32px, 6.8vw, 52px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: #fff;
  text-shadow:
    0 4px 28px rgba(0, 0, 0, 0.5),
    0 0 56px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 42%, transparent);
  opacity: 0;
  transform: translateY(18px);
  filter: blur(5px);
  transition:
    opacity 0.76s cubic-bezier(0.16, 1, 0.3, 1) 0.38s,
    transform 0.92s cubic-bezier(0.16, 1, 0.3, 1) 0.38s,
    filter 0.76s ease 0.38s;
}

.obt-stage__act-tagline {
  max-width: min(500px, 86vw);
  margin-top: 6px;
  font-size: clamp(15px, 3vw, 18px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.84);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.64s ease 0.5s,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
    filter 0.64s ease 0.5s;
}

.obt-stage__act.is-visible .obt-stage__act-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: obt-act-card-glow 3s ease-in-out infinite;
}

.obt-stage__act.is-visible .obt-stage__act-inner::after {
  opacity: 1;
}

@keyframes obt-act-card-glow {
  0%,
  100% {
    box-shadow:
      0 28px 90px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 48px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 22%, transparent);
  }
  50% {
    box-shadow:
      0 34px 104px rgba(0, 0, 0, 0.58),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 88px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 36%, transparent);
  }
}

.obt-stage__act.is-visible .obt-stage__act-roman,
.obt-stage__act.is-visible .obt-stage__act-label,
.obt-stage__act.is-visible .obt-stage__act-rule,
.obt-stage__act.is-visible .obt-stage__act-title,
.obt-stage__act.is-visible .obt-stage__act-tagline {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.obt-stage__act.is-visible .obt-stage__act-roman {
  animation: obt-act-roman-glow 2.6s ease-in-out infinite;
}

@keyframes obt-act-roman-glow {
  0%,
  100% {
    filter: blur(0) brightness(1);
    text-shadow:
      0 0 48px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 50%, transparent),
      0 8px 32px rgba(0, 0, 0, 0.45);
  }
  50% {
    filter: blur(0) brightness(1.12);
    text-shadow:
      0 0 72px color-mix(in srgb, var(--obt-act-accent, var(--accent)) 62%, transparent),
      0 10px 36px rgba(0, 0, 0, 0.48);
  }
}

.obt-stage__act.is-visible .obt-stage__act-rule {
  transform: scaleX(1);
}

.obt-stage__act.is-out .obt-stage__act-inner {
  opacity: 0;
  transform: translateY(-22px) scale(0.96);
  filter: blur(8px);
  animation: none;
  transition-duration: 0.82s;
  transition-timing-function: cubic-bezier(0.55, 0, 0.45, 1);
}

.obt-stage__act.is-out .obt-stage__act-inner::after {
  opacity: 0;
  transition-delay: 0s;
}

.obt-stage__act.is-out .obt-stage__act-roman,
.obt-stage__act.is-out .obt-stage__act-label,
.obt-stage__act.is-out .obt-stage__act-rule,
.obt-stage__act.is-out .obt-stage__act-title,
.obt-stage__act.is-out .obt-stage__act-tagline {
  opacity: 0;
  transform: translateY(-10px);
  transition-duration: 0.52s;
  transition-delay: 0s;
}

.obt-glass-stack {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.obt-glass-pane {
  position: fixed;
  pointer-events: none;
  background: rgba(8, 10, 16, 0.34);
  backdrop-filter: blur(14px) saturate(155%);
  -webkit-backdrop-filter: blur(14px) saturate(155%);
  transition:
    top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    backdrop-filter 0.28s ease;
}

.obt-tour-layer.is-live-step .obt-glass-pane {
  background: rgba(8, 10, 16, 0.14);
  backdrop-filter: blur(6px) saturate(125%);
  -webkit-backdrop-filter: blur(6px) saturate(125%);
}

.obt-tour-layer.is-live-step.is-table-preview .obt-glass-pane {
  background: rgba(8, 10, 16, 0.07);
  backdrop-filter: blur(3px) saturate(108%);
  -webkit-backdrop-filter: blur(3px) saturate(108%);
}

.obt-tour-layer.is-setup-phase.is-live-step .obt-glass-pane {
  background: rgba(8, 10, 16, 0.05);
  backdrop-filter: blur(2px) saturate(104%);
  -webkit-backdrop-filter: blur(2px) saturate(104%);
}

.obt-tour-layer.is-setup-phase .obt-glass-pane--full {
  background: rgba(8, 10, 16, 0.08);
  backdrop-filter: blur(4px) saturate(110%);
  -webkit-backdrop-filter: blur(4px) saturate(110%);
}

.obt-tour-layer.is-setup-phase.is-setup-catalog-open .obt-glass-pane--full {
  display: none !important;
}

.obt-tour-layer.is-setup-phase.is-setup-no-glass .obt-glass-stack,
.obt-tour-layer.is-setup-phase.is-setup-no-glass .obt-glass-pane,
.obt-tour-layer.is-setup-phase.is-setup-no-glass .obt-spotlight-ring {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.obt-tour-layer.is-setup-phase.is-setup-no-glass {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.obt-tour-layer.is-tour-no-glass .obt-glass-stack,
.obt-tour-layer.is-tour-no-glass .obt-glass-pane,
.obt-tour-layer.is-tour-live-preview .obt-glass-stack,
.obt-tour-layer.is-tour-live-preview .obt-glass-pane {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.obt-tour-layer.is-tour-no-glass {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.obt-tour-layer.is-setup-catalog-open .obt-glass-stack,
.obt-tour-layer.is-setup-catalog-open .obt-spotlight-ring {
  display: none !important;
}

.obt-glass-pane--full {
  inset: 0;
  width: auto;
  height: auto;
}

.obt-spotlight-ring {
  position: fixed;
  box-sizing: border-box;
  pointer-events: none;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 78%, #fff),
    0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent),
    0 0 28px color-mix(in srgb, var(--accent) 28%, transparent);
  z-index: 1;
  animation: obt-ring-breathe 2.6s ease-in-out infinite;
  transition:
    top 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.32s ease;
}

.obt-spotlight-ring.is-snap {
  transition: none !important;
  animation: none !important;
}

.obt-spotlight-ring.is-spec-panel,
html.obt-tour-spec-panel .obt-spotlight-ring {
  animation: none !important;
}

/* Тур: квадратный scroll-wrap внутри скруглённой карточки не должен «торчать» из подсветки */
html.obt-tour-spec-panel #spec-match-panel.table-card,
html.obt-tour-spec-panel #spec-match-panel.spec-match-panel {
  overflow: hidden !important;
}

.obt-spotlight-ring.is-scrim {
  animation: none;
  background: transparent;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 88%, #fff),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 9999px rgba(0, 0, 0, 0.52);
}

html[data-theme='light'] .obt-spotlight-ring.is-scrim {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 82%, #fff),
    0 0 0 1px rgba(255, 255, 255, 0.65),
    0 0 0 9999px rgba(15, 23, 42, 0.34);
}

@keyframes obt-ring-breathe {
  0%,
  100% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent) 78%, #fff),
      0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent),
      0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent) 92%, #fff),
      0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent),
      0 0 36px color-mix(in srgb, var(--accent) 34%, transparent);
  }
}

.obt-target-pulse {
  position: relative;
  z-index: 2;
  animation: obt-target-pulse 2.4s ease-in-out infinite;
}

@keyframes obt-target-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.08);
  }
}

.obt-tour-chapter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light, rgba(59, 130, 246, 0.12));
  border-radius: 999px;
  padding: 5px 11px;
  margin-bottom: 12px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.obt-tour-chapter.is-new {
  animation: obt-chapter-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes obt-chapter-in {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.obt-coach-inner--tour .obt-setup-title {
  font-size: clamp(20px, 3.6vw, 24px);
  margin-bottom: 6px;
}

.obt-coach-inner--tour .obt-setup-lead {
  margin-bottom: 16px;
  font-size: 13.5px;
}

.obt-tour-step-meta {
  margin: -6px 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-tertiary);
}

.obt-tour-layer.is-tour-coach-dock .obt-dialog {
  display: none !important;
}

.obt-tour-layer.is-tour-coach-dock .obt-coach.is-dock,
.obt-tour-layer.is-tour-coach-dock .obt-coach.is-anchor {
  z-index: 5;
  width: min(400px, calc(100vw - 20px));
}

html.obt-onboarding-active .obt-coach.is-dock.is-visible {
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.18);
}

.obt-dialog {
  position: fixed;
  z-index: 3;
  width: min(360px, calc(100vw - 32px));
  background: color-mix(in srgb, var(--card-bg) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-border) 88%, var(--accent) 12%);
  border-radius: calc(var(--card-radius, 12px) + 4px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  padding: 18px 18px 14px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transform: translateY(8px);
  opacity: 0;
  transition:
    top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.26s ease;
}

.obt-tour-layer.is-open .obt-dialog.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.obt-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.obt-dialog-step {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.obt-dialog-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.obt-dialog-close:hover {
  background: var(--row-hover, rgba(255, 255, 255, 0.06));
  color: var(--text);
}

.obt-dialog-close svg {
  width: 14px;
  height: 14px;
}

.obt-dialog-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.obt-dialog-text {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.obt-dialog-progress {
  height: 3px;
  border-radius: 999px;
  background: var(--card-border);
  margin-bottom: 14px;
  overflow: hidden;
}

.obt-dialog-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.obt-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.obt-dialog-actions-right {
  display: flex;
  gap: 8px;
}

.obt-coach-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #8b5cf6));
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}

.obt-coach-avatar svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.obt-dialog-coach-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.obt-finish-burst {
  text-align: center;
  padding: 8px 0 4px;
}

.obt-finish-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22c55e));
  display: grid;
  place-items: center;
  box-shadow:
    0 14px 36px color-mix(in srgb, var(--accent) 38%, transparent),
    0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: obt-finish-pop 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes obt-finish-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.obt-finish-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .obt-coach,
  .obt-spotlight-ring,
  .obt-dialog,
  .obt-glass-pane,
  .obt-coach-inner.is-enter,
  .obt-spotlight-ring.is-scrim,
  .obt-stage,
  .obt-stage__wash,
  .obt-stage__spotlight,
  .obt-stage__bloom,
  .obt-stage__ring,
  .obt-stage__act-inner,
  .obt-tour-layer.is-theater-veiled::before,
  #obt-coach.is-theater-suppressed {
    animation: none !important;
    transition: none !important;
  }
  .obt-tour-layer.is-theater-active::after {
    display: none !important;
  }
  .obt-spotlight-ring.is-snap {
    transition: none !important;
    animation: none !important;
  }
  .obt-chapter-progress-fill::after,
  .obt-setup-ambient__orb,
  .obt-pill.is-pulse {
    animation: none !important;
  }
  .obt-tour-chapter.is-new {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .obt-dialog {
    width: min(340px, calc(100vw - 24px));
    left: 12px !important;
    right: 12px;
    margin: 0 auto;
  }

  .obt-coach.is-dock {
    width: calc(100vw - 20px);
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .obt-coach.is-center {
    width: calc(100vw - 20px);
  }

  .obt-coach-inner {
    padding: 18px 16px 14px;
  }
}

/* --- Легенда избранного (только во время тура) --- */
.obt-wl-legend {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: calc(var(--card-radius, 12px) + 2px);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--card-border));
  background: color-mix(in srgb, var(--accent) 6%, var(--card-bg));
}

.obt-wl-legend__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.obt-wl-legend__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.obt-wl-legend__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.obt-wl-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.obt-wl-legend__dot--price-up {
  background: #ef4444;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 22%, transparent);
}

.obt-wl-legend__dot--price-down {
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}

.obt-wl-legend__dot--qty {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* --- Демо копирования строк таблицы --- */
.obt-table-copy-demo {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.obt-table-copy-demo[hidden] {
  display: none !important;
}

.obt-demo-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  transform-origin: 5px 4px;
  transform: translate(0, 0);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
  z-index: 2;
  will-change: transform;
  pointer-events: none;
}

.obt-demo-cursor.is-instant {
  transition: none !important;
}

.obt-demo-ripples {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.obt-demo-ripple {
  position: fixed;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  pointer-events: none;
}

.obt-demo-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.85));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  opacity: 0.7;
  transform: scale(0.12);
}

.obt-demo-ripple.is-active::after {
  animation: obt-demo-ripple-wave 0.78s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes obt-demo-ripple-wave {
  0% {
    transform: scale(0.12);
    opacity: 0.72;
  }
  100% {
    transform: scale(4.6);
    opacity: 0;
  }
}

.obt-demo-ctrl-key {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(148px, calc(env(safe-area-inset-bottom) + 132px));
  z-index: 4;
  min-width: 52px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--card-border) 70%, var(--accent) 30%);
  background: color-mix(in srgb, var(--card-bg) 88%, var(--accent) 12%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--text);
  animation: obt-ctrl-key-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.obt-demo-ctrl-key[hidden] {
  display: none !important;
}

@keyframes obt-ctrl-key-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.obt-tour-layer.is-table-copy-demo .obt-spotlight-ring {
  z-index: 1;
}

.obt-tour-layer.is-table-copy-demo .obt-coach.is-dock {
  width: min(540px, calc(100vw - 16px));
}

.obt-coach-inner--copy-modes .obt-setup-lead--copy-modes {
  margin-bottom: 14px;
}

.obt-copy-modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

.obt-copy-mode {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--card-border) 82%, transparent);
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: default;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease;
}

.obt-copy-modes.is-interactive .obt-copy-mode:not(:disabled) {
  cursor: pointer;
}

.obt-copy-modes.is-interactive .obt-copy-mode:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--card-border));
  background: color-mix(in srgb, var(--accent) 5%, var(--card-bg) 95%);
}

.obt-copy-mode:disabled {
  opacity: 1;
}

.obt-copy-mode__text strong {
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 92%, var(--accent) 8%);
}

.obt-copy-modes-hint {
  margin: -4px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.obt-copy-mode.is-active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--card-border));
  background: color-mix(in srgb, var(--accent) 7%, var(--card-bg) 93%);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.obt-copy-mode__body {
  min-width: 0;
  flex: 1;
}

.obt-copy-mode__title {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  transition: color 0.28s ease;
}

.obt-copy-mode.is-live .obt-copy-mode__title {
  color: color-mix(in srgb, var(--accent) 82%, var(--text));
}

.obt-copy-mode__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.obt-copy-mode__icon {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--card-border) 75%, var(--accent) 25%);
  background: color-mix(in srgb, var(--card-bg) 86%, var(--accent) 8%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.obt-copy-mode__hash {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-secondary);
  line-height: 1;
}

.obt-copy-mode__pulse {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, #fff);
  opacity: 0;
  transform: scale(0.4);
}

.obt-copy-mode.is-live .obt-copy-mode__pulse {
  animation: obt-copy-mode-pulse 1.4s ease-out infinite;
}

.obt-copy-mode__range {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 4px;
  height: 28px;
  margin-left: -2px;
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 75%, #fff),
    color-mix(in srgb, var(--accent) 35%, transparent)
  );
  opacity: 0.35;
  transform-origin: top center;
  transform: scaleY(0.35);
}

.obt-copy-mode.is-live .obt-copy-mode__range {
  animation: obt-copy-mode-range 1.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.obt-copy-mode__mod-key {
  min-width: 72px;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--card-border) 55%, var(--accent) 45%);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--card-bg) 72%, #fff 10%),
    color-mix(in srgb, var(--card-bg) 92%, var(--accent) 8%)
  );
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.obt-copy-mode--mod.is-live .obt-copy-mode__mod-key {
  animation: obt-mod-key-pulse 1.05s ease-in-out infinite;
}

@keyframes obt-copy-mode-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.45);
  }
  70% {
    opacity: 0;
    transform: scale(1.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes obt-copy-mode-range {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.35);
  }
  45% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes obt-mod-key-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.22),
      inset 0 -3px 0 rgba(0, 0, 0, 0.14),
      0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
  50% {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.28),
      inset 0 -3px 0 rgba(0, 0, 0, 0.14),
      0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .obt-table-copy-demo {
    display: none !important;
  }
  .obt-copy-mode.is-live .obt-copy-mode__pulse,
  .obt-copy-mode.is-live .obt-copy-mode__range,
  .obt-copy-mode--mod.is-live .obt-copy-mode__mod-key {
    animation: none !important;
  }
}
