/* Aurelia guided tour. Lives on top of the client site, in Aurelia's own palette. */
.tour-root, .tour-ring {
  --a-navy: #1b1f2a;
  --a-navy-2: #262b38;
  --a-ivory: #f3f0e8;
  --a-ivory-dim: rgba(243, 240, 232, 0.66);
  --a-sand: #e9dcc8;
  --a-gold: #ffc83d;
  --a-line: rgba(243, 240, 232, 0.12);
}
.tour-root { font-family: var(--body, "Inter"), system-ui, -apple-system, "Segoe UI", sans-serif; }
.tour-root * { box-sizing: border-box; }

/* side launcher */
.tour-launch {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 70;
  display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border: 0; cursor: pointer;
  background: var(--a-navy); color: var(--a-ivory); border-radius: 999px 0 0 999px;
  box-shadow: 0 18px 40px -14px rgba(10, 12, 20, 0.6), 0 0 0 1px rgba(243, 240, 232, 0.08) inset;
  transition: background-color .2s, opacity .3s, visibility .3s; text-align: left;
}
.tour-launch:hover { background: var(--a-navy-2); }
.tour-launch.gone { opacity: 0; visibility: hidden; }
.tl-disc { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--a-ivory); display: grid; place-items: center; flex: none; }
.tl-disc img { width: 34px; height: auto; }
.tl-disc::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--a-gold); opacity: 0; animation: tlPulse 2.4s ease-out infinite; }
.tl-play { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--a-gold); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--a-navy); }
.tl-play svg { width: 10px; height: 10px; margin-left: 1px; color: var(--a-navy); }
.tl-text b { display: block; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.tl-text small { display: block; font-size: 12.5px; color: var(--a-ivory-dim); margin-top: 1px; }
@keyframes tlPulse { 0% { transform: scale(0.9); opacity: 0.9; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

/* greeting bubble */
.tour-hello {
  position: fixed; right: 16px; top: calc(50% + 48px); z-index: 71; width: 330px;
  background: var(--a-navy); color: var(--a-ivory); border-radius: 20px; padding: 20px;
  box-shadow: 0 30px 70px -20px rgba(10, 12, 20, 0.65); opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.tour-hello.on { opacity: 1; transform: none; pointer-events: auto; }
.tour-hello::before { content: ""; position: absolute; top: -7px; right: 42px; width: 14px; height: 14px; background: var(--a-navy); transform: rotate(45deg); border-radius: 3px; }
.tour-hello h4 { margin: 0 0 6px; font-weight: 600; letter-spacing: -0.01em; font-size: 21px; line-height: 1.2; }
.tour-hello p { margin: 0; color: var(--a-ivory-dim); font-size: 14.5px; line-height: 1.5; }
.tour-hello .row { display: flex; gap: 8px; margin-top: 16px; }
.t-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 14.5px; transition: background-color .2s, color .2s; }
.t-btn svg { width: 14px; height: 14px; }
.t-btn.gold { background: var(--a-gold); color: var(--a-navy); flex: 1; }
.t-btn.gold:hover { background: #ffd566; }
.t-btn.quiet { background: transparent; color: var(--a-ivory-dim); }
.t-btn.quiet:hover { color: var(--a-ivory); }
.t-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--a-ivory-dim); cursor: pointer; display: grid; place-items: center; }
.t-x:hover { color: var(--a-ivory); background: rgba(243, 240, 232, 0.08); }
.t-x svg { width: 16px; height: 16px; }

/* player */
.tour {
  position: fixed; right: 24px; bottom: 24px; z-index: 72; width: 400px;
  background: var(--a-navy); color: var(--a-ivory); border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 90px -24px rgba(8, 10, 18, 0.7), 0 0 0 1px rgba(243, 240, 232, 0.06) inset;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s ease, transform .35s ease;
}
.tour.on { opacity: 1; transform: none; pointer-events: auto; }
.tour-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 0 18px; }
.tour-head .mk { width: 38px; height: 38px; border-radius: 12px; background: var(--a-ivory); display: grid; place-items: center; flex: none; }
.tour-head .mk img { width: 26px; height: auto; }
.tour-head b { display: block; font-weight: 600; letter-spacing: -0.01em; font-size: 16.5px; }
.tour-head span { display: block; font-size: 12.5px; color: var(--a-ivory-dim); }
.tour-head .t-x { position: static; margin-left: auto; }
.tour-stage { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 6px; min-height: 108px; }
.eq { display: flex; align-items: center; gap: 3px; height: 40px; width: 40px; flex: none; justify-content: center; border-radius: 50%; background: rgba(255, 200, 61, 0.12); }
.eq i { width: 3px; height: 6px; border-radius: 3px; background: var(--a-gold); transition: height .12s; }
.tour.speaking .eq i { animation: eq 0.9s ease-in-out infinite; }
.tour.speaking .eq i:nth-child(2) { animation-delay: -0.3s; }
.tour.speaking .eq i:nth-child(3) { animation-delay: -0.6s; }
.tour.speaking .eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.tour-cap { margin: 0; font-size: 18px; line-height: 1.42; font-weight: 500; letter-spacing: -0.012em; min-height: 3.9em; }
.tour-cap w { color: rgba(243, 240, 232, 0.38); transition: color .15s; }
.tour-cap w.said { color: var(--a-ivory); }
.tour-cap w.now { color: var(--a-gold); }
.tour-card { display: none; margin: 4px 18px 8px; padding: 16px; border-radius: 16px; background: rgba(243, 240, 232, 0.06); border: 1px solid var(--a-line); }
.tour-card.on { display: block; animation: tUp .35s ease; }
.tour-card h5 { margin: 0 0 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 15px; color: var(--a-sand); }
.tour-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tour-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.tour-card li.in { opacity: 1; transform: none; }
.tour-card li svg { width: 17px; height: 17px; color: var(--a-gold); flex: none; margin-top: 1px; }
.tour-card .reply { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--a-line); font-size: 14px; color: var(--a-ivory); font-weight: 600; }
@keyframes tUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tour-prog { display: flex; gap: 3px; padding: 8px 18px 0; }
.tour-prog button { flex: 1; height: 16px; border: 0; padding: 6px 0; background: transparent; cursor: pointer; }
.tour-prog button i { display: block; height: 4px; border-radius: 4px; background: rgba(243, 240, 232, 0.16); overflow: hidden; }
.tour-prog button i b { display: block; height: 100%; width: 0; background: var(--a-gold); }
.tour-ctrl { display: flex; align-items: center; gap: 10px; padding: 8px 14px 14px 14px; }
.t-round { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--a-ivory); color: var(--a-navy); transition: background-color .2s; flex: none; }
.t-round:hover { background: #fff; }
.t-round svg { width: 18px; height: 18px; }
.t-round.ghost { background: rgba(243, 240, 232, 0.08); color: var(--a-ivory); width: 38px; height: 38px; }
.t-round.ghost:hover { background: rgba(243, 240, 232, 0.16); }
.t-round.ghost svg { width: 16px; height: 16px; }
.tour-time { font-size: 13px; color: var(--a-ivory-dim); font-variant-numeric: tabular-nums; }
.tour-by { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--a-ivory-dim); text-decoration: none; }
.tour-by img { height: 14px; width: auto; filter: brightness(0) invert(0.95); }

/* highlight rings */
.tour-ring {
  position: fixed; z-index: 45; pointer-events: none; border-radius: 20px;
  border: 3px solid var(--a-gold); box-shadow: 0 0 0 6px rgba(255, 200, 61, 0.18), 0 0 40px rgba(255, 200, 61, 0.35);
  opacity: 0; transition: opacity .35s ease;
}
.tour-ring.on { opacity: 1; animation: ringIn .5s ease; }
.tour-ring em {
  position: absolute; left: 14px; top: -16px; background: var(--a-gold); color: var(--a-navy);
  font: 600 13px/1 var(--body, "Inter"), system-ui, sans-serif; font-style: normal; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.4);
}
@keyframes ringIn { from { transform: scale(1.025); } to { transform: none; } }

@media (max-width: 700px) {
  .tour-launch { top: calc(var(--head-h, 66px) + 12px); transform: none; padding: 6px 12px 6px 6px; gap: 9px; }
  .tl-disc { width: 44px; height: 44px; }
  .tl-disc img { width: 29px; }
  .tl-text b { font-size: 14.5px; }
  .tl-text small { font-size: 11.5px; }
  .tour-hello { left: 12px; right: 12px; width: auto; top: calc(var(--head-h, 66px) + 80px); }
  .tour-hello::before { right: 44px; }
  .tour { left: 10px; right: 10px; width: auto; bottom: calc(82px + env(safe-area-inset-bottom)); border-radius: 22px; }
  .tour-head { padding: 12px 12px 0 14px; }
  .tour-head .mk { width: 34px; height: 34px; border-radius: 10px; }
  .tour-stage { padding: 10px 14px 2px; min-height: 84px; gap: 12px; }
  .eq { width: 34px; height: 34px; }
  .tour-cap { font-size: 16.5px; min-height: 3.6em; }
  .tour-card { margin: 4px 12px 6px; padding: 12px 14px; }
  .tour-card li { font-size: 13.5px; }
  .tour-card ul { gap: 7px; }
  .tour-prog { padding: 4px 14px 0; }
  .tour-ctrl { padding: 6px 10px 10px; }
  .tour-by span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-disc::after, .tour.speaking .eq i, .tour-ring.on { animation: none; }
}
