cfx-product-tour {
  --tour-panel: #0d1b32;
  --tour-line: #2d4565;
  --tour-dim: #b8c9df;
  --tour-soft: #9db4d0;
  --tour-ink: #f1f7ff;
  --tour-accent: #6ee7ff;
  display: block;
  direction: inherit;
  color: var(--tour-ink);
}
cfx-product-tour [hidden] {display: none !important}
cfx-product-tour button {color: inherit; font: inherit}
cfx-product-tour button:disabled {opacity: .34; cursor: default}
cfx-product-tour :focus-visible {outline: 2px solid var(--tour-accent); outline-offset: 2px}
cfx-product-tour svg {display: block; flex-shrink: 0; width: 18px; height: 18px}
cfx-product-tour .tour-solid {fill: currentColor; stroke: none}

.tour-heading {display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-block-end: 19px}
.tour-heading h2 {margin: 0; font-size: clamp(24px, 2.45vw, 33px); font-weight: 735; line-height: 1.4; letter-spacing: -.045em}
.tour-heading p {margin: 3px 0 0; color: var(--tour-dim); font-size: 13px; line-height: 1.8}
.tour-tabs {
  position: relative; isolation: isolate; display: inline-flex; gap: 2px; max-width: 100%; padding: 4px;
  border: 1px solid #304563; border-radius: 16px; background: var(--cfx-glass);
  box-shadow: inset 0 1px 0 #ffffff08, 0 2px 6px #0000001c;
}
.tour-tab-plate {
  position: absolute; z-index: -1; pointer-events: none; top: 4px; bottom: 4px; left: 0;
  width: var(--plate-width,0px); transform: translateX(var(--plate-x,0px));
  border-radius: 11px; background: var(--cfx-selection);
  box-shadow: inset 0 0 0 1px #62d9ff8a, inset 0 2px 0 #b8ffef17, 0 2px 5px #06101155;
}
.tour-tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 35px;
  border: 0; border-radius: 11px; background: transparent; padding: 5px 10px;
  color: #b1bfc9; font-size: 12px; font-weight: 570; line-height: 1.4; white-space: nowrap;
}
.tour-tabs button svg {width: 16px; height: 16px; color: #9cabb8}
.tour-tabs button[aria-selected="true"] {color: #ecfff9; font-weight: 675}
.tour-tabs button[aria-selected="true"] svg {color: #87edff}
.tour-tab-short {display: none}

.tour-layout {display: grid; grid-template-columns: minmax(270px, 300px) minmax(0, 1fr); align-items: stretch; gap: 16px}
.tour-layout > * {min-width: 0}
.tour-cards {
  display: grid; border: 1px solid var(--cfx-edge); border-radius: 16px;
  background: var(--cfx-glass); box-shadow: var(--cfx-rim);
}
.tour-card {min-width: 0; align-self: stretch; padding: 20px clamp(17px,1.8vw,25px)}
.tour-card-meta {display: flex; align-items: center; gap: 9px; color: var(--tour-soft)}
.tour-card-icon {
  display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #306582; border-radius: 10px;
  background: linear-gradient(145deg,#17405f,#142b46); color: var(--tour-accent); box-shadow: inset 0 1px 0 #b5fff20f;
}
.tour-card-icon svg {width: 17px; height: 17px}
.tour-card-meta small {font-size: 11.5px; font-weight: 540; font-variant-numeric: tabular-nums}
.tour-card h3 {margin: 13px 0 6px; color: #f0f7f6; font-size: clamp(19px,1.8vw,24px); font-weight: 720; line-height: 1.58; letter-spacing: -.04em; text-wrap: pretty}
.tour-current {display: none}
.tour-summary {margin: 0; color: var(--tour-dim); font-size: 13px; line-height: 1.95}
.tour-steps {display: grid; margin-block-start: 16px; padding-block-start: 8px; border-block-start: 1px solid #394652}
.tour-steps button {
  position: relative; width: 100%; min-width: 0; display: grid; grid-template-columns: 23px minmax(0,1fr);
  gap: 9px; align-items: start; padding: 8px 0; border: 0; border-radius: 5px; background: transparent;
  color: #bac6cf; text-align: start;
}
.tour-steps button:not(:last-child)::before {content: ""; position: absolute; inset-inline-start: 11px; top: 31px; bottom: -8px; width: 1px; background: #394953}
.tour-step-num {
  position: relative; display: grid; place-items: center; width: 23px; height: 23px; padding-top: 1px;
  border: 1px solid #475762; border-radius: 50%; background: #19212a; color: #a7b8c2; font-size: 11px; font-weight: 640; line-height: 1;
}
.tour-step-copy {min-width: 0}
.tour-step-copy strong {display: block; font-size: 13px; font-weight: 560; line-height: 23px}
.tour-step-note {display: block; margin-top: 3px; color: var(--tour-dim); font-size: 12px; font-weight: 430; line-height: 1.9}
.tour-steps button[aria-current="step"] .tour-step-num {border-color: #4cc9ed; background: #163c55; color: #b1f3ff}
.tour-steps button[aria-current="step"] strong {color: #8de6ff; font-weight: 680}

.tour-theater {
  display: flex; flex-direction: column; overflow: hidden; align-self: start;
  border: 1px solid #324965; border-radius: 13px; background: #151922; box-shadow: 0 9px 24px #02050833;
}
.tour-stage, .tour-full-stage {position: relative; width: 100%; isolation: isolate; background: #151922}
.tour-stage {height: clamp(348px,30vw,386px)}
.tour-stage cfx-tour-scene, .tour-full-stage cfx-tour-scene {position: absolute; inset: 0; display: block}
.tour-transport {display: flex; align-items: center; gap: 12px; min-height: 50px; border-top: 1px solid #35414d; padding: 5px 10px; background: #142031}
.tour-play, .tour-icon-btn, .tour-expand, .tour-dialog [data-close], .tour-dialog-foot button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 6px;
  min-width: 34px; min-height: 34px; border: 1px solid transparent; border-radius: 7px; background: transparent;
  padding: 4px 6px; color: #c4d2da; font-size: 12px; line-height: 1.5; white-space: nowrap;
}
.tour-play {width: 98px; padding-inline: 8px; border-color: #2c607e; background: #18394f; color: #a2e8ff; font-weight: 615}
.tour-play svg, .tour-actions svg, .tour-expand svg {width: 16px; height: 16px}
.tour-actions {display: inline-flex; align-items: center; gap: 1px}
.tour-expand {border-inline-start-color: #394652; border-start-start-radius: 0; border-end-start-radius: 0; padding-inline-start: 10px; margin-inline-start: 3px}
.tour-timeline {flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px}
.tour-timeline > span {position: relative; flex: 1; height: 3px; border-radius: 4px; background: #445460; overflow: hidden}
.tour-timeline i {position: absolute; inset: 0; border-radius: inherit; background: #83daca; transform: scaleX(0); transform-origin: right center}
.tour-timeline .seen i {transform: scaleX(1)}
.tour-position {flex: none; color: #c4d2db; font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap}

.tour-dialog {
  width: min(96vw, 1480px); max-width: calc(100vw - 20px); height: min(92dvh, 960px); max-height: calc(100dvh - 16px);
  padding: 0; border: 1px solid #4a5b66; border-radius: 12px; background: #151922; color: var(--tour-ink);
  box-shadow: 0 30px 90px #0009; overflow: hidden;
}
.tour-dialog[open] {display: flex; flex-direction: column}
.tour-dialog::backdrop {background: #03080ce8}
.tour-dialog-head, .tour-dialog-foot {display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: #1b242e}
.tour-dialog-head {justify-content: space-between; border-bottom: 1px solid var(--tour-line)}
.tour-dialog-head h3 {margin: 0; font-size: 16px; line-height: 1.7}
.tour-dialog-head [data-close], .tour-dialog-foot button {border-color: #3c4f5c; background: #202c37; padding-inline: 10px}
.tour-dialog-head button svg, .tour-dialog-foot button svg {width: 15px; height: 15px}
.tour-full-stage {flex: 1; min-height: 0}
.tour-dialog-foot {border-top: 1px solid var(--tour-line)}
.tour-dialog-description {flex: 1; margin: 0; color: #c7d5da; font-size: 13px; line-height: 1.85}
@media (hover: hover) {
  .tour-tabs button:not([aria-selected="true"]):hover {color: #eaf5f2; background: #d3fff708}
  .tour-steps button:hover strong {color: #c3f5e9}
  .tour-transport button:enabled:hover, .tour-dialog button:enabled:hover {background: #2d404a; color: #d6fff5}
}
@media (prefers-reduced-motion: no-preference) {
  .tour-tab-plate {transition: transform 390ms cubic-bezier(.2,.8,.2,1), width 390ms cubic-bezier(.2,.8,.2,1)}
  .tour-tabs button, .tour-transport button, .tour-steps strong {transition: color 160ms ease, background-color 160ms ease}
  .tour-card:not([hidden]) {animation: tour-card-in 260ms ease-out both}
  @keyframes tour-card-in {from {opacity: .45; transform: translateY(3px)} to {opacity: 1; transform: none}}
}
@media (min-width: 851px) and (max-width: 1030px) {
  .tour-layout {grid-template-columns: 267px minmax(0,1fr); gap: 12px}
  .tour-heading {gap: 9px 18px}
  .tour-card {padding: 17px}
  .tour-tabs button {padding-inline: 8px}
}
@media (max-width: 850px) {
  .tour-layout {grid-template-columns: minmax(0,1fr); gap: 11px}
  .tour-theater {grid-row: 1}
  .tour-stage {height: clamp(315px,47vw,375px)}
  .tour-card {display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "meta steps" "current current"; align-content: start; gap: 5px 8px; padding: 12px 16px}
  .tour-card:not([hidden]) {animation: none}
  .tour-card-meta {grid-area: meta}
  .tour-card > h3, .tour-card > .tour-summary {display: none}
  .tour-current {display: block; grid-area: current}
  .tour-current h3 {margin: 0; font-size: 16px; line-height: 1.7}
  .tour-current p {margin: 3px 0 0; min-height: 3.7em; color: var(--tour-dim); font-size: 13px; line-height: 1.85}
  .tour-steps {grid-area: steps; display: flex; margin: 0; padding: 0; border: 0}
  .tour-steps button {width: clamp(32px,9vw,44px); min-height: 44px; padding: 0; grid-template-columns: 1fr; place-items: center}
  .tour-steps button:not(:last-child)::before {display: none}
  .tour-step-copy {position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap}
  .tour-play {width: 84px}
}
@media (max-width: 630px) {
  .tour-heading {display: grid; justify-content: stretch; grid-template-columns: minmax(0,1fr); gap: 10px; margin-bottom: 11px}
  .tour-heading h2 {font-size: 24px}
  .tour-tabs {display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1px; border-radius: 14px}
  .tour-tabs button {flex-direction: column; gap: 4px; min-height: 45px; padding: 4px 1px; font-size: 11px}
  .tour-tabs button svg {width: 16px; height: 16px}
  .tour-tab-label {display: none}
  .tour-tab-short {display: inline}
  .tour-theater, .tour-cards {border-radius: 10px}
  .tour-stage {height: clamp(264px,40svh,352px)}
  .tour-transport {min-height: 48px; gap: 6px; padding: 2px 6px}
  .tour-play {height: 44px; padding-inline: 5px; font-size: 11px}
  .tour-timeline {gap: 2px}
  .tour-expand {margin-inline-start: 1px}
  .tour-icon-btn, .tour-expand {min-width: 36px; min-height: 44px; padding-inline: 5px}
  .tour-card-meta {gap: 7px}
  .tour-card-icon {width: 27px; height: 27px; border-radius: 8px}
  .tour-card-icon svg {width: 15px; height: 15px}
  .tour-dialog {width: 100%; height: 100dvh; max-width: 100%; max-height: 100dvh; margin: 0; border: 0; border-radius: 0}
  .tour-dialog-head, .tour-dialog-foot {gap: 7px; padding: 6px 9px}
  .tour-dialog-head h3 {font-size: 14px}
  .tour-dialog-description {font-size: 12px; line-height: 1.65}
}
@media (max-width: 375px) {
  .tour-transport {gap: 4px}
  .tour-tabs button {font-size: 10px}
  .tour-timeline {gap: 1.5px}
}
@media (min-width:631px) and (max-width:850px) and (max-height:430px) {
  .tour-stage {height:clamp(210px,calc(100svh - 120px),315px)}
}
