
/* Guided tour, narrated by the series' characters.
   Same engine idea as the theme's js/tour.js (data-tour anchors, spotlight made of one huge shadow,
   physical-pixel geometry so RTL never flips it, missing targets skipped), plus: each step is a comic
   speech bubble said by one of the characters, and some steps are done for real by the parent. */
.wt-root { position: fixed; inset: 0; z-index: 1100; /* above the fixed header (#hn2, 1000) */ opacity: 0; transition: opacity .25s ease; }
.wt-root.is-in { opacity: 1; }
.wt-block { position: absolute; inset: 0; cursor: pointer; }
.wt-root.is-try .wt-block { pointer-events: none; }
.wt-root.is-try { pointer-events: none; }
.wt-root.is-try .wt-guide { pointer-events: auto; }
.wt-spot { position: absolute; pointer-events: none; border-radius: 28px; box-shadow: 0 0 0 9999px rgb(14 22 40 / .62), 0 0 0 3px var(--coral) inset; transition: left .45s cubic-bezier(.16,1,.3,1), top .45s cubic-bezier(.16,1,.3,1), width .45s cubic-bezier(.16,1,.3,1), height .45s cubic-bezier(.16,1,.3,1), opacity .25s; }
.wt-root.is-try .wt-spot { animation: wt-ring 1.6s cubic-bezier(.16,1,.3,1) infinite; }
@keyframes wt-ring { 50% { box-shadow: 0 0 0 9999px rgb(14 22 40 / .62), 0 0 0 6px var(--coral) inset; } }

.wt-guide { position: absolute; display: flex; align-items: flex-end; width: min(520px, calc(100vw - 16px)); transition: left .45s cubic-bezier(.16,1,.3,1), top .45s cubic-bezier(.16,1,.3,1); }
/* who stands where: both characters look to screen-right, so a lone speaker stands LEFT of the balloon
   and faces it. When both talk, the girl stands on the right, mirrored, so they face each other.
   In RTL flex, order 0 = right, order 2 = left. */
.wt-who { flex: none; width: 104px; height: 176px; position: relative; }
.wt-who.r, .wt-who.l { order: 2; }
.wt-guide.sp-duo .wt-who.r { order: 0; }
.wt-guide.sp-duo .wt-who.r img { transform: scaleX(-1) translateY(16px) scale(.85); }
.wt-guide.sp-duo .wt-who.r img.on { transform: scaleX(-1); }
.wt-who img { position: absolute; bottom: 0; inset-inline: 0; margin-inline: auto; height: 176px; width: auto; transform-origin: 50% 100%; filter: drop-shadow(0 12px 10px rgb(0 0 0 / .28)); opacity: 0; transform: translateY(16px) scale(.85); transition: opacity .3s, transform .5s cubic-bezier(.34,1.56,.64,1); }
.wt-who img.on { opacity: 1; transform: none; }
.wt-col { order: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }

/* comic speech balloon: ink outline, hand-drawn uneven corners, a curved tail toward the speaker's mouth */
.wt-pop { position: relative; background: #fff; color: #16213A; border: 3px solid #16213A; border-radius: 44px 38px 46px 40px / 40px 46px 38px 44px; padding: 20px 26px 22px; margin-bottom: 100px; box-shadow: 0 22px 40px -22px rgb(0 0 0 / .55); }
.wt-tail { position: absolute; bottom: 16px; width: 52px; height: 46px; overflow: visible; }
.wt-tail path { fill: #fff; stroke: #16213A; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.wt-tail.t2 { display: none; }
.wt-guide.sp-r .wt-tail.t1, .wt-guide.sp-duo .wt-tail.t1 { right: -44px; }
.wt-guide.sp-l .wt-tail.t1 { left: -44px; transform: scaleX(-1); }
.wt-guide.sp-duo .wt-tail.t2 { display: block; left: -44px; transform: scaleX(-1); }
.wt-pop h3 { font-size: 19px; line-height: 1.45; font-weight: 800; margin: 0 0 4px; padding-inline-end: 22px; }
.wt-pop p { font-size: 15.5px; line-height: 1.85; color: #33405C; margin: 0; }
.wt-try { display: none; margin-top: 10px; font-size: 14px; font-weight: 700; color: #2B0C05; background: #FFD9CF; padding: 5px 12px; border-radius: 999px; width: fit-content; }
.wt-root.is-try .wt-try { display: block; }
.wt-x { position: absolute; top: 8px; inset-inline-end: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #54607A; cursor: pointer; display: grid; place-items: center; }
.wt-x:hover { background: #EDF2F8; color: #16213A; }
.wt-foot { position: absolute; bottom: 6px; inset-inline: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.wt-guide.sp-r .wt-foot { padding-inline-start: 96px; } .wt-guide.sp-l .wt-foot { padding-inline-end: 96px; }
.wt-bar { display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: 999px; background: var(--card); box-shadow: 0 14px 30px -14px rgb(0 0 0 / .55); }
.wt-steps { display: flex; gap: 4px; padding-inline: 8px; }
.wt-steps i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); transition: width .3s cubic-bezier(.16,1,.3,1), background-color .3s; }
.wt-steps i.on { width: 18px; background: var(--coral); }
.wt-btn { border: 0; border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--soft); color: var(--ink); transition: transform .2s cubic-bezier(.16,1,.3,1), background-color .2s; }
.wt-btn:active { transform: scale(.96); }
.wt-btn.main { background: var(--ink); color: var(--card); }
.wt-btn.ghost { background: transparent; color: var(--ink-2); }

/* ── motion: each move says something. The balloon pops from its tail, the words arrive at speaking
   pace, the speaker bobs while talking, a new speaker hops in, a success gets a comic burst. ── */
.wt-guide.sp-l .wt-pop { transform-origin: 0% 85%; }
.wt-guide.sp-duo .wt-pop { transform-origin: 50% 100%; }
.wt-pop.in { animation: wt-pop .55s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes wt-pop { 0% { opacity: 0; transform: scale(.35) rotate(-5deg); } 55% { opacity: 1; } 100% { transform: none; } }
.wt-pop .w { display: inline-block; opacity: 0; animation: wt-w .32s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(220ms + var(--i) * 26ms); }
@keyframes wt-w { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.wt-who.talk { animation: wt-talk .38s ease-in-out .2s 3; }
.wt-who.enter { animation: wt-enter .55s cubic-bezier(.34,1.56,.64,1) both, wt-talk .38s ease-in-out .55s 3; }
@keyframes wt-talk { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
@keyframes wt-enter { 0% { opacity: 0; transform: translateX(-36px) translateY(14px) rotate(-6deg); } 100% { opacity: 1; transform: none; } }
.wt-root.is-try .wt-try { animation: wt-nudge 2.4s cubic-bezier(.36,.07,.19,.97) 1.1s infinite; }
@keyframes wt-nudge { 0%, 82%, 100% { transform: none; } 86% { transform: rotate(-3deg); } 90% { transform: rotate(3deg); } 94% { transform: rotate(-2deg); } }
.wt-boom { position: fixed; z-index: 1110; width: 132px; height: 112px; margin: -56px 0 0 -66px; pointer-events: none; display: grid; place-items: center; animation: wt-boom .9s cubic-bezier(.34,1.56,.64,1) forwards; }
.wt-boom svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wt-boom svg path { fill: #FFD23F; stroke: #16213A; stroke-width: 3.5; stroke-linejoin: round; }
.wt-boom b { position: relative; font-size: 22px; font-weight: 800; color: #16213A; transform: rotate(-8deg); }
@keyframes wt-boom { 0% { opacity: 0; transform: scale(.2) rotate(-20deg); } 30% { opacity: 1; transform: scale(1.08) rotate(4deg); } 45% { transform: scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15) translateY(-14px); } }

.wt-launch { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 21; display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 5px 16px 5px 5px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: 0 14px 30px -14px rgb(var(--dac-shadow) / .6); transition: transform .3s cubic-bezier(.16,1,.3,1); direction: rtl; }
.wt-launch:hover { transform: translateY(-2px); }
.wt-launch span.face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--coral) 22%, var(--card)); flex: none; }
.wt-launch span.face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; transform: scale(1.9) translateY(18%); }
.go2 { margin-top: 28px; margin-inline-start: 14px; border: 0; background: none; padding: 8px 4px; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.wt-launch.is-inviting { transform: translateY(-2px); }
/* first-visit invitation: a balloon said by the launcher's girl, beside the launcher (bottom corner), page stays usable */
.wt-invite { position: fixed; right: calc(16px + var(--wt-lw, 190px) + 14px); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 22; width: min(300px, calc(100vw - var(--wt-lw, 190px) - 62px)); padding: 14px 16px 12px; background: var(--dac-balloon, #fff); color: var(--dac-balloon-ink, #16213A); border: 3px solid var(--dac-ink, #16213A); border-radius: 26px 8px 26px 26px; box-shadow: 0 18px 34px -18px rgb(var(--dac-shadow) / .7); font-size: 14px; line-height: 1.65; opacity: 0; transform: translateX(10px) scale(.96); transform-origin: 100% 80%; transition: opacity .25s ease, transform .4s var(--dac-spring); }
.wt-invite.is-in { opacity: 1; transform: none; }
.wt-invite p { margin: 0 0 10px; }
.wt-invite p b { display: block; font-size: 15px; font-weight: 800; }
.wt-invite-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wt-invite .wt-btn { padding: 9px 16px; }
.wt-invite .wt-btn.main { background: #16213A; color: #FFFFFF; } /* the balloon is always white: its buttons do not follow dark mode */
.wt-invite .wt-btn.ghost { color: #54607A; }
.wt-invite-tail { position: absolute; right: -27px; bottom: 16px; width: 30px; height: 24px; fill: var(--dac-balloon, #fff); stroke: var(--dac-ink, #16213A); stroke-width: 3; stroke-linejoin: round; transform: rotate(-90deg) scaleX(-1); }
body.dac.has-mbar .wt-invite { bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 641px) { body.dac.has-mbar .wt-invite { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } }
body.touring .wt-invite { display: none; }

@media (max-width: 640px) { body.touring .font-switch, body.touring .da-switch, body.touring .wt-launch { display: none; } }
@media (max-width: 640px) {
  .wt-guide { width: calc(100vw - 24px); }
  .wt-who { width: 70px; height: 124px; }
  .wt-who img { height: 124px; }
  .wt-pop { padding: 14px 16px 16px; margin-bottom: 62px; border-width: 2.5px; }
  .wt-tail { width: 40px; height: 36px; bottom: 10px; }
  .wt-guide.sp-r .wt-tail.t1, .wt-guide.sp-duo .wt-tail.t1 { right: -32px; } .wt-guide.sp-l .wt-tail.t1, .wt-guide.sp-duo .wt-tail.t2 { left: -32px; }
  .wt-pop h3 { font-size: 16px; }
  .wt-pop p { font-size: 14px; line-height: 1.75; }
  .wt-guide.sp-r .wt-foot { padding-inline-start: 50px; } .wt-guide.sp-l .wt-foot { padding-inline-end: 50px; }
  .wt-skip { display: none; }
  .wt-launch { padding: 4px; } .wt-launch b { display: none; }
  .go2 { margin-top: 14px; margin-inline-start: 0; display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .wt-pop.in, .wt-pop .w, .wt-who.talk, .wt-who.enter, .wt-root.is-try .wt-try { animation: none; opacity: 1; }
  .wt-boom { display: none; }
  .wt-invite { transition: none; }
  .wt-root, .wt-spot, .wt-guide, .wt-who img, .wt-steps i { transition: none; }
  .wt-root.is-try .wt-spot { animation: none; }
}
