/* "BuildVue in 3 minuten": the animated introduction (tourStory.js). The stage is a fixed
   880x540 mock of the app, scaled to fit; captions and controls stay at full size. */
.ts-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgb(15 41 62 / .82); backdrop-filter: blur(6px); color: #0f293e; }
.ts-overlay[hidden] { display: none; }
.ts-shell { width: min(960px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgb(0 0 0 / .35); overflow-y: auto;
  animation: ts-shell-in .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes ts-shell-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.ts-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ts-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ev-orange-text); }
.ts-top button { border: 0; background: none; border-radius: 9px; padding: 4px 10px; font-size: 22px; line-height: 1; color: var(--ev-steel); cursor: pointer; }
.ts-top button:hover { background: var(--ev-paper-dim); color: var(--ev-graphite); }

.ts-viewport { position: relative; width: 100%; aspect-ratio: 880 / 540; border-radius: 14px; overflow: hidden; background: var(--ev-paper-dim);
  box-shadow: inset 0 0 0 1px var(--ev-steel-light); flex-shrink: 0; }
.ts-stage { position: absolute; left: 0; top: 0; width: 880px; height: 540px; transform-origin: 0 0; overflow: hidden;
  font-size: 12px; line-height: 1.45; color: var(--ev-graphite); user-select: none; }

/* Caption and controls */
.ts-caption { min-height: 104px; }
.ts-count { font-size: 12px; font-weight: 600; color: var(--ev-steel); }
.ts-caption h2 { margin: 2px 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; outline: none; }
.ts-caption p#ts-text { max-width: 75ch; font-size: 14.5px; line-height: 1.6; color: #334155; }
.ts-who { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--ev-blue-light); color: #1e40af;
  font-size: 11px; font-weight: 600; vertical-align: 3px; }
.ts-who[hidden] { display: none; }
.ts-try { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ev-orange-text); }
.ts-try:hover { text-decoration: underline; }
.ts-try[hidden] { display: none; }
.ts-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-controls button { border: 1px solid var(--ev-steel-light); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ts-controls button:hover:not(:disabled) { background: var(--ev-paper); }
.ts-controls button:disabled { opacity: .4; cursor: default; }
.ts-controls #ts-play { min-width: 104px; background: var(--ev-ink); border-color: var(--ev-ink); color: #fff; }
.ts-controls #ts-play:hover { background: var(--ev-ink-light); }
.ts-controls #ts-skip { margin-left: auto; border: 0; color: var(--ev-steel); }
.ts-dots { display: flex; flex: 1 1 220px; gap: 4px; min-width: 180px; }
.ts-dots button { flex: 1; height: 16px; padding: 0; border: 0; border-radius: 0; background: none; position: relative; cursor: pointer; }
.ts-dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 4px; border-radius: 4px; background: var(--ev-steel-light); }
.ts-dots button span { position: absolute; left: 0; top: 6px; height: 4px; width: 0; border-radius: 4px; background: var(--ev-orange); }
.ts-dots button.ts-done span { width: 100%; background: #fdba74; }
.ts-dots button:hover::before { background: #cbd5e1; }
.ts-overlay :focus-visible { outline: 3px solid var(--ev-blue); outline-offset: 2px; }

/* Title card and end card, laid over the stage */
.ts-card-layer { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; justify-content: center; padding: 6%;
  background: var(--ev-ink); color: #fff; animation: ts-fade .4s ease; overflow-y: auto; }
.ts-card-layer[hidden] { display: none; }
.ts-card-layer .ts-eyebrow { color: #fdba74; }
.ts-card-layer h3 { margin: 10px 0 12px; font-size: clamp(20px, 4vw, 36px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.ts-card-layer p { max-width: 56ch; color: #d9e4ed; font-size: clamp(13px, 1.7vw, 15px); line-height: 1.6; }
.ts-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ts-card-actions button, .ts-card-actions a { border-radius: 10px; padding: 11px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid rgb(255 255 255 / .25); background: transparent; color: #fff; }
.ts-card-actions button:hover, .ts-card-actions a:hover { background: rgb(255 255 255 / .08); }
.ts-card-actions .ts-cta { background: var(--ev-orange); border-color: var(--ev-orange); color: #fff; }
.ts-card-actions .ts-cta:hover { background: var(--ev-orange-hover); }
.ts-route { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.ts-route span { padding: 4px 10px; border-radius: 99px; background: rgb(255 255 255 / .08); color: #d9e4ed; font-size: 12px;
  animation: ts-in .4s both; }

/* Mock app chrome */
.ts-window { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ev-bg); }
.ts-bar { height: 30px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--ev-steel-light); }
.ts-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; }
.ts-url { margin-left: 10px; padding: 2px 12px; border-radius: 6px; background: var(--ev-paper-dim); color: var(--ev-steel); font-size: 11px; }
.ts-bell { margin-left: auto; position: relative; width: 22px; height: 22px; display: grid; place-items: center; color: var(--ev-steel); }
.ts-bell b { position: absolute; top: -3px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: var(--ev-orange);
  color: #fff; font-size: 9px; line-height: 15px; text-align: center; }
.ts-app { flex: 1; display: flex; min-height: 0; }
.ts-side { width: 150px; flex-shrink: 0; padding: 14px 10px; background: var(--ev-ink); color: #cbd5e1; }
.ts-logo { display: flex; align-items: center; gap: 7px; margin: 0 4px 16px; color: #fff; font-weight: 700; font-size: 14px; }
.ts-logo i { width: 18px; height: 18px; border-radius: 5px; background: var(--ev-orange); }
.ts-nav { display: block; margin: 2px 0; padding: 6px 9px; border-radius: 7px; font-size: 11.5px; }
.ts-nav.ts-on { background: rgb(255 255 255 / .1); color: #fff; box-shadow: inset 3px 0 0 var(--ev-orange); }
.ts-main { flex: 1; min-width: 0; position: relative; padding: 16px 20px; overflow: hidden; }
.ts-solo .ts-main { padding: 18px 28px; }

/* Mock building blocks */
.ts-crumbs { font-size: 10.5px; color: var(--ev-steel); }
.ts-h { margin: 2px 0 10px; font-size: 17px; font-weight: 700; }
.ts-h small { margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--ev-steel); }
.ts-tabs { display: flex; gap: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--ev-steel-light); font-size: 11.5px; color: var(--ev-steel); }
.ts-tabs span { padding: 0 1px 7px; }
.ts-tabs .ts-on { color: var(--ev-orange-text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ev-orange); }
.ts-card { background: #fff; border: 1px solid var(--ev-steel-light); border-radius: 10px; padding: 12px 14px; }
.ts-card h4 { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.ts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ts-label { margin: 8px 0 3px; font-size: 10.5px; font-weight: 600; color: #334155; }
.ts-input { min-height: 26px; padding: 5px 9px; border: 1px solid var(--ev-steel-light); border-radius: 7px; background: #fff; }
.ts-input.ts-area { min-height: 40px; }
.ts-input.ts-focus { border-color: var(--ev-orange); box-shadow: 0 0 0 3px #f9731626; }
.ts-muted { color: var(--ev-muted); }
.ts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ts-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ts-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 7px; border: 1px solid var(--ev-steel-light);
  background: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ts-btn.ts-primary { background: var(--ev-orange); border-color: var(--ev-orange); color: #fff; }
.ts-btn.ts-dark { background: var(--ev-ink); border-color: var(--ev-ink); color: #fff; }
.ts-btn.ts-good { background: var(--ev-success); border-color: var(--ev-success); color: #fff; }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.ts-chip { padding: 3px 9px; border-radius: 99px; background: var(--ev-paper-dim); font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.ts-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 600; white-space: nowrap;
  background: var(--ev-paper-dim); color: var(--ev-steel); transition: background .3s, color .3s; }
.ts-badge.ts-wait { background: var(--ev-warning-light); color: #b45309; }
.ts-badge.ts-busy { background: var(--ev-blue-light); color: #1d4ed8; }
.ts-badge.ts-ok { background: var(--ev-success-light); color: #15803d; }
.ts-badge.ts-open { background: var(--ev-orange-light); color: var(--ev-orange-text); }
.ts-badge.ts-bad { background: var(--ev-danger-light); color: #b91c1c; }
.ts-list { display: flex; flex-direction: column; }
.ts-list > div { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid #eef1f5; }
.ts-list > div:first-child { border-top: 0; }
.ts-grow { flex: 1; min-width: 0; }
.ts-sub { font-size: 10px; color: var(--ev-steel); }
.ts-avatar { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; }
.ts-highlight { background: var(--ev-orange-light); border-radius: 8px; }
.ts-toast { position: absolute; right: 18px; bottom: 16px; padding: 9px 14px; border-radius: 10px; background: var(--ev-ink); color: #fff;
  font-size: 11.5px; font-weight: 600; box-shadow: 0 10px 30px rgb(15 41 62 / .25); }
.ts-modal { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgb(15 41 62 / .35); }
.ts-modal > .ts-card { width: 360px; box-shadow: 0 20px 60px rgb(15 41 62 / .3); }
.ts-progress { height: 6px; border-radius: 6px; background: var(--ev-paper-dim); overflow: hidden; }
.ts-progress i { display: block; height: 100%; width: 0; background: var(--ev-orange); transition: width 1.1s ease; }
.ts-check { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 5px; border-radius: 4px; border: 1px solid #cbd5e1;
  vertical-align: -3px; font-size: 9px; color: #fff; }
.ts-check.ts-on { background: var(--ev-orange); border-color: var(--ev-orange); }
.ts-field-line { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #eef1f5; font-size: 11px; }
.ts-field-line span:first-child { color: var(--ev-steel); }
.ts-stat { font-size: 20px; font-weight: 700; }

/* Floor plan and pins */
.ts-plan { position: relative; background: #fff; border: 1px solid var(--ev-steel-light); border-radius: 10px; overflow: hidden; }
.ts-plan svg { display: block; width: 100%; height: 100%; }
.ts-plan .ts-wall { fill: none; stroke: #334155; stroke-width: 4; stroke-linecap: square; }
.ts-plan .ts-thin { fill: none; stroke: #94a3b8; stroke-width: 1.5; }
.ts-plan text { font-size: 11px; fill: #94a3b8; font-family: inherit; }
.ts-draw .ts-wall, .ts-draw .ts-thin { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: ts-draw 1.8s ease forwards; }
.ts-draw text { opacity: 0; animation: ts-appear .6s 1.4s forwards; }
@keyframes ts-appear { to { opacity: 1; } }
@keyframes ts-draw { to { stroke-dashoffset: 0; } }
.ts-pin { position: absolute; width: 24px; height: 24px; margin: -24px 0 0 -12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--ev-orange); box-shadow: 0 4px 10px rgb(15 41 62 / .3); display: grid; place-items: center; transition: background .3s; }
.ts-pin b { transform: rotate(45deg); color: #fff; font-size: 10.5px; }
.ts-pin.ts-ok { background: var(--ev-success); }
.ts-pin.ts-check-pin { background: #7c3aed; }
.ts-pin.ts-ghost { background: #fff; border: 2px dashed var(--ev-orange); box-shadow: none; }
.ts-photo { width: 54px; height: 40px; border-radius: 6px; flex-shrink: 0; background: linear-gradient(135deg, #cbd5e1, #94a3b8); position: relative; overflow: hidden; }
.ts-photo::after { content: ""; position: absolute; left: 10px; right: 10px; top: 55%; height: 5px; border-radius: 3px; background: #475569; opacity: .6; }
.ts-photo.ts-after { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }
.ts-photo.ts-after::after { background: #f8fafc; opacity: 1; }
.ts-doc { position: relative; width: 150px; height: 200px; padding: 16px 14px; border-radius: 6px; background: #fff; box-shadow: 0 10px 30px rgb(15 41 62 / .18); }
.ts-doc i { display: block; height: 5px; margin: 7px 0; border-radius: 3px; background: #e2e8f0; transform-origin: left; }
.ts-doc i.ts-short { width: 60%; }
.ts-ring { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ev-success) calc(var(--ts-p, 0) * 1%), var(--ev-paper-dim) 0); transition: --ts-p 1.6s ease; }
.ts-ring span { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
@property --ts-p { syntax: '<number>'; inherits: false; initial-value: 0; }
.ts-bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 70px; }
.ts-bar-chart i { flex: 1; border-radius: 4px 4px 0 0; background: var(--ev-orange); height: 0; transition: height 1s cubic-bezier(.2, .8, .2, 1); }
.ts-bar-chart i.ts-okbar { background: var(--ev-success); }
.ts-flyer { position: absolute; z-index: 4; }
.ts-stamp { position: absolute; padding: 8px 16px; border: 3px solid var(--ev-success); border-radius: 10px; color: var(--ev-success);
  font-weight: 800; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-8deg); background: rgb(255 255 255 / .9); }

/* Cursor, click ripple and typing caret */
.ts-cursor { position: absolute; left: 0; top: 0; z-index: 10; width: 20px; height: 24px; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); transform: translate(700px, 480px); }
.ts-cursor.ts-pressing { scale: .85; }
.ts-ripple { position: absolute; z-index: 9; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--ev-orange); animation: ts-ripple .55s ease-out forwards; }
@keyframes ts-ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.ts-typing::after { content: ""; display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; vertical-align: -2px; background: var(--ev-graphite);
  animation: ts-blink .8s steps(1) infinite; }
@keyframes ts-blink { 50% { opacity: 0; } }
.ts-press { animation: ts-press .25s ease; }
@keyframes ts-press { 50% { transform: scale(.94); } }

/* Entrances: an element with ts-hide appears through show(); data-in picks the motion */
.ts-hide { display: none !important; }
.ts-in { animation: ts-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.ts-in[data-in="pop"] { animation-name: ts-pop; }
.ts-in[data-in="drop"] { animation-name: ts-drop; animation-duration: .6s; }
.ts-in[data-in="fade"] { animation-name: ts-fade; }
.ts-in[data-in="stamp"] { animation-name: ts-stamp; }
.ts-in[data-in="side"] { animation-name: ts-side; }
@keyframes ts-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ts-fade { from { opacity: 0; } }
@keyframes ts-pop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } }
@keyframes ts-side { from { opacity: 0; transform: translateX(40px); } }
@keyframes ts-drop { from { opacity: 0; translate: 0 -60px; } 60% { opacity: 1; translate: 0 4px; } 80% { translate: 0 -3px; } }
@keyframes ts-stamp { from { opacity: 0; transform: rotate(-8deg) scale(2); } }
.ts-pulse { animation: ts-pulse 1.4s ease-in-out infinite; }
@keyframes ts-pulse { 50% { box-shadow: 0 0 0 6px #f9731633; } }

@media (max-width: 640px) {
  .ts-overlay { padding: 0; align-items: stretch; }
  .ts-shell { max-height: 100dvh; border-radius: 0; padding: 14px; }
  .ts-caption h2 { font-size: 18px; }
  .ts-caption p#ts-text { font-size: 14px; }
  .ts-controls #ts-skip { margin-left: 0; }
  /* The stage is small on a phone: the title and end cards grow the viewport instead of clipping. */
  .ts-viewport:has(> .ts-card-layer:not([hidden])) { aspect-ratio: auto; }
  .ts-card-layer { position: relative; inset: auto; padding: 22px 18px; }
  .ts-route { display: none; }
}
/* Reduced motion: every scene is shown in its end state and nothing moves on its own. */
.ts-reduced *, .ts-reduced *::before, .ts-reduced *::after { animation: none !important; transition: none !important; }
.ts-reduced .ts-cursor, .ts-reduced .ts-ripple { display: none; }
.ts-reduced .ts-draw .ts-wall, .ts-reduced .ts-draw .ts-thin { stroke-dashoffset: 0; }
.ts-reduced .ts-draw text { opacity: 1; }
.ts-chip.ts-on { background: var(--ev-ink); color: #fff; }
