/* Auto-play tour overlay. Sits on top of the real app; the app styles are untouched. */
.demo-bar #tourBtn { margin-left: 6px; background: #fff; color: var(--brand-deep); border-color: #fff; font-weight: 700; }

/* Keep the driver phone on screen during the tour, even on a laptop-width window */
body.touring .phone-panel { display: flex !important; }
body.touring #phoneClose { display: none; }
@media (max-width: 1500px) {
  body.touring .phone-panel { width: 350px; }
  body.touring .phone-frame { width: 320px; }
}
body.touring .toast { z-index: 10025; }

.tour { position: fixed; inset: 0; z-index: 9000; pointer-events: none; font-family: var(--font); }
.tour .hidden { display: none !important; }
.t-shield { position: fixed; inset: 0; pointer-events: auto; cursor: default; }

.t-ring { position: fixed; border-radius: 12px; border: 3px solid #ffc83d; box-shadow: 0 0 0 9999px rgba(6, 24, 44, .42), 0 0 18px rgba(255, 200, 61, .6); transition: all .35s ease; z-index: 9001; }

.t-bubble { position: fixed; width: 360px; max-width: calc(100vw - 24px); background: #0b2a4a; color: #fff; border-radius: 14px; padding: 14px 18px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); z-index: 10010; animation: t-pop .3s ease; transition: left .3s ease, top .3s ease; }
.t-chap { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffc83d; margin-bottom: 4px; }
.t-text { font-size: 16.5px; line-height: 1.45; }
.t-arrow { position: absolute; width: 16px; height: 16px; background: #0b2a4a; transform: rotate(45deg); display: none; }
.t-arrow.up { display: block; top: -7px; margin-left: -8px; }
.t-arrow.down { display: block; bottom: -7px; margin-left: -8px; }
.t-arrow.left { display: block; left: -7px; top: 22px; }
.t-arrow.right { display: block; right: -7px; top: 22px; }
@keyframes t-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

.t-cursor { position: fixed; z-index: 10030; margin: -3px 0 0 -4px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.t-cursor::after { content: ''; position: absolute; left: -14px; top: -14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 200, 61, .7); opacity: 0; transform: scale(.3); }
.t-cursor.click::after { animation: t-click .45s ease-out; }
@keyframes t-click { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }

.t-ghost { position: fixed; z-index: 10020; background: #fff; border: 2px solid var(--brand2); border-radius: 8px; padding: 8px 14px; box-shadow: 0 10px 26px rgba(7, 53, 102, .35); font-size: 14px; color: var(--ink); white-space: nowrap; transform: rotate(-1.5deg); }

.t-card { position: fixed; inset: 0; z-index: 10015; pointer-events: auto; background: radial-gradient(circle at 50% 40%, #ffffff 0%, #e7eff8 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; animation: t-fade .6s ease; transition: opacity .5s ease; }
.t-card.fade { opacity: 0; }
.t-card img { width: min(420px, 80vw); margin-bottom: 18px; }
.t-card h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 44px); color: var(--brand-deep); letter-spacing: -.01em; }
.t-card p { margin: 0; font-size: clamp(16px, 1.8vw, 21px); color: var(--muted); max-width: 640px; }
.t-btns { display: flex; gap: 12px; margin-top: 28px; }
.t-btns button { border: 0; border-radius: 10px; padding: 12px 22px; font-size: 16px; font-weight: 700; background: var(--brand); color: #fff; }
.t-btns button + button { background: #fff; color: var(--brand-deep); border: 1px solid var(--line); }
@keyframes t-fade { from { opacity: 0; } to { opacity: 1; } }

.t-bar { position: fixed; left: 16px; bottom: 16px; z-index: 10040; pointer-events: auto; display: flex; align-items: center; gap: 8px; background: rgba(11, 42, 74, .92); color: #fff; border-radius: 12px; padding: 8px 10px 8px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.t-name { font-weight: 700; min-width: 120px; }
.t-prog { width: 120px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.t-prog b { display: block; height: 100%; width: 0; background: #ffc83d; transition: width .6s ease; }
.t-bar button { background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 7px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; }
.t-bar button:hover { background: rgba(255, 255, 255, .24); }
.tour.paused .t-name::after { content: ' (paused)'; color: #ffc83d; font-weight: 600; }
