/* the auto tour's chrome (tourui.js): a slim paper control bar at the bottom, a Resume pill, a Watch tour chip under the mode bar */
.tour { position: absolute; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; z-index: 4; }
.tour[hidden] { display: none; }
.tour-bar {
  pointer-events: auto; position: absolute; left: 50%; bottom: 18px; width: min(600px, calc(100vw - 32px)); height: 46px;
  display: flex; align-items: center; gap: 12px; padding: 0 7px;
  background: rgba(247, 244, 238, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(26, 26, 26, 0.2); border-radius: 999px; box-shadow: 0 8px 28px rgba(26, 26, 26, 0.08);
  opacity: 0; transform: translate(-50%, 14px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tour.in .tour-bar { opacity: 1; transform: translate(-50%, 0); }
.tb-play {
  flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--ink); color: #fff; transition: transform 0.15s, background 0.2s;
}
.tb-play:hover { background: #000; transform: scale(1.06); }
.tb-play svg { display: block; }
.tb-time { flex: none; min-width: 78px; font: 500 12px/1 var(--lat); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--ink-soft); white-space: nowrap; }
.tb-time b { font-weight: 600; color: var(--ink); }
.tb-track { position: relative; flex: 1; height: 32px; cursor: pointer; touch-action: none; outline: none; }
.tb-rail { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: rgba(26, 26, 26, 0.16); overflow: hidden; transition: height 0.2s, margin-top 0.2s; }
.tb-track:hover .tb-rail, .tb-track.scrubbing .tb-rail { height: 4px; margin-top: -2px; }
.tb-fill { width: 100%; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.tb-ticks i { position: absolute; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px; border-radius: 1px; background: rgba(26, 26, 26, 0.34); pointer-events: none; }
.tb-ticks i.past { background: var(--ink); }
.tb-head {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none;
  background: var(--ink); box-shadow: 0 0 0 3px rgba(247, 244, 238, 0.95), 0 1px 4px rgba(0, 0, 0, 0.2); transition: transform 0.15s;
}
.tb-track:hover .tb-head, .tb-track.scrubbing .tb-head { transform: scale(1.18); }
.tb-track:focus-visible .tb-head { box-shadow: 0 0 0 3px rgba(247, 244, 238, 0.95), 0 0 0 5px var(--ink); }
.tb-tip {
  position: absolute; bottom: 34px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: 7px 11px 6px; border-radius: 4px; background: rgba(26, 26, 26, 0.88); color: #fff;
  font: 500 10.5px/1 var(--lat); letter-spacing: 0.15em; text-transform: uppercase;
}
.tb-tip[hidden] { display: none; }
html[lang="bn"] .tb-tip { font: 500 12.5px/1.1 var(--bn); letter-spacing: 0; text-transform: none; }
.tb-explore {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(26, 26, 26, 0.3); background: transparent; color: var(--ink); font: 500 12.5px/1 var(--lat); white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
html[lang="bn"] .tb-explore { font: 500 13px/1 var(--bn); }
.tb-explore:hover { background: #fff; border-color: rgba(26, 26, 26, 0.6); }
.tb-explore .lbl-short { display: none; }
.tb-play:focus-visible, .tb-explore:focus-visible, .tour-resume:focus-visible, .tour-watch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.tour-resume {
  pointer-events: auto; position: absolute; left: 50%; bottom: 92px; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 20px 0 17px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 500 14px/1 var(--lat); letter-spacing: 0.01em; cursor: pointer;
  box-shadow: 0 10px 30px rgba(26, 26, 26, 0.24); transform: translate(-50%, 0); transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html[lang="bn"] .tour-resume { font: 500 15px/1 var(--bn); }
.tour-resume[hidden] { display: inline-flex; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; }
.tour-resume:hover { background: #000; }

.tour-watch {
  pointer-events: auto; position: absolute; left: 50%; top: 54px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 14px 0 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: rgba(247, 244, 238, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(26, 26, 26, 0.28);
  color: var(--ink); font: 500 12.5px/1 var(--lat); transition: background 0.2s, border-color 0.2s, opacity 0.4s;
}
html[lang="bn"] .tour-watch { font: 500 13.5px/1 var(--bn); }
.tour-watch:hover { background: #fff; border-color: rgba(26, 26, 26, 0.55); }
.tour-watch[hidden] { display: none; }
body.story .tour-watch, body.clean .tour-watch, body.clean .tour { display: none; }
body.touring #credits-btn { display: none; }

@media (max-width: 720px) {
  .tour-bar { bottom: 12px; width: calc(100vw - 24px); gap: 9px; padding: 0 6px; }
  .tb-time { min-width: 0; }
  .tb-time .tot { display: none; }
  .tb-explore { padding: 0 11px 0 12px; }
  .tb-explore .lbl-long { display: none; }
  .tb-explore .lbl-short { display: inline; }
  .tour-resume { bottom: 196px; }                                  /* above the caption card */
  .tour-watch { top: 100px; }
}
@media (prefers-reduced-motion: reduce) { .tour-bar, .tour-resume { transition: none; } }
