/* The tour: a page laid out like a recording being watched. Copy on the
   left says what one thing is and how to use it; the picture on the right is
   a hands-on demo of it; the timeline under both is the table of contents.
   The picture is dark in either theme, as a player is. */

.tour {
  overflow-x: clip;
  /* Room for the top bar, which stays put, when a chapter is scrolled to. */
  scroll-margin-top: 56px;
  --screen: #0d1b1f;
  --screen-2: #13272c;
  --screen-ink: #e6f2f4;
  --screen-soft: #93b1b7;
  --screen-rule: rgba(255, 255, 255, 0.1);
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 56px;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  grid-template-areas:
    "copy screen"
    "bar  bar"
    "nav  nav";
  gap: 28px 40px;
  align-items: start;
}

/* --- the copy ------------------------------------------------------------ */

.tour-copy { grid-area: copy; padding-top: 6px; }
.tour-time {
  display: flex; gap: 10px; align-items: baseline; margin: 0 0 14px;
  font: 600 14px/1 var(--mono); color: var(--brand-ink);
}
.tour-time #chapterCount { font: 500 13px/1 var(--ui); color: var(--ink-quiet); }
.tour-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 750;
  text-wrap: balance;
}
.tour-lead { margin: 0 0 22px; font-size: 17px; line-height: 1.5; color: var(--ink-soft); max-width: 34ch; }
.tour-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.tour-steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start;
  font-size: 15px; line-height: 1.45;
}
.tour-steps li::before {
  content: counter(step);
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
  font: 650 13px/1 var(--ui);
}
.tour-steps kbd, .find-keys kbd {
  padding: 1px 6px; border: 1px solid var(--rule-strong); border-radius: 5px;
  font: 500 12.5px/1.4 var(--mono); background: var(--card);
}

/* --- the picture ----------------------------------------------------------- */

.tour-screen {
  grid-area: screen;
  position: relative;
  min-height: 460px;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(42, 125, 148, 0.28), transparent 60%),
    var(--screen);
  color: var(--screen-ink);
  box-shadow: 0 30px 70px -36px rgba(8, 36, 46, 0.7), inset 0 0 0 1px var(--screen-rule);
  overflow: hidden;
}
.demo { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 26px; gap: 18px; }
.demo[hidden] { display: none; }
.demo.is-entering { animation: demo-in 260ms ease-out; }
@keyframes demo-in { from { opacity: 0; transform: translateY(6px); } }
.demo > :first-child { flex: 1; min-height: 0; }

.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.demo-controls .grow { flex: 1; }
.demo-hint { font-size: 14px; color: var(--screen-soft); }

/* Buttons and switches inside the picture, drawn for the dark ground. */
.tbtn {
  height: 38px; padding: 0 16px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.1); color: var(--screen-ink);
  font: 600 14.5px/1 var(--ui); cursor: pointer;
}
.tbtn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.17); }
.tbtn:disabled { opacity: 0.4; cursor: default; }
.tbtn-rec { background: var(--coral); color: #fff; }
.tbtn-rec:hover:not(:disabled) { background: var(--coral-hover); }
.tbtn-primary { background: #2f8aa3; color: #fff; }
.tbtn-primary:hover:not(:disabled) { background: #3798b2; }
.tour-screen :focus-visible { outline: 2px solid #8fd3e4; outline-offset: 2px; }

.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, 0.07); }
.seg button {
  height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--screen-soft); font: 550 13.5px/1 var(--ui); cursor: pointer;
}
.seg button[aria-checked="true"] { background: rgba(255, 255, 255, 0.14); color: var(--screen-ink); }
.seg-small button { padding: 0 10px; }

.toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; color: var(--screen-ink); }
.toggle input {
  appearance: none; -webkit-appearance: none; position: relative; margin: 0;
  width: 34px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); cursor: pointer;
  transition: background 140ms ease;
}
.toggle input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform 140ms ease;
}
.toggle input:checked { background: #2f8aa3; }
.toggle input:checked::after { transform: translateX(14px); }

/* --- 1. record ----------------------------------------------------------- */

.desk {
  position: relative; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #20444d, #142a30);
  display: grid; place-items: center; padding: 28px;
}
.desk-window { width: min(440px, 100%); border-radius: 10px; background: #f4f9fa; color: #1b2a2e; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.desk-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid #dbe8eb; font-size: 12px; color: #61777c; }
.desk-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c9d9dd; }
.desk-bar span { margin-left: 8px; }
.desk-body { position: relative; padding: 16px 18px 18px; }
.desk-h { margin: 0 0 10px; font-weight: 700; font-size: 16px; }
.desk-row { margin: 0; padding: 7px 0; display: flex; justify-content: space-between; border-top: 1px solid #e3eef0; font-size: 14px; color: #4b6166; }
.desk-row b { color: #1b2a2e; font-weight: 600; }
.desk-private { transition: filter 200ms ease; }
.is-blurred .desk-private b { filter: blur(6px); }
.blur-frame {
  position: absolute; left: 10px; right: 10px; top: 77px; height: 36px;
  border: 2px dashed #2f8aa3; border-radius: 6px;
}
.blur-frame::after {
  content: attr(data-label); position: absolute; right: -2px; bottom: calc(100% + 2px);
  padding: 2px 6px; border-radius: 5px; background: #2f8aa3; color: #fff; font: 600 10.5px/1.3 var(--ui);
}
.blur-frame { pointer-events: none; }
.cam-bubble {
  position: absolute; right: 22px; bottom: 22px; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #f2c9a8 0 17%, transparent 18%),
              radial-gradient(ellipse at 50% 96%, #2f8aa3 0 40%, transparent 41%), #e7eef0;
  border: 3px solid #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.rec-badge {
  position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 20px; background: var(--coral); color: #fff;
  font: 650 12.5px/1 var(--ui); letter-spacing: 0.03em;
}
.rec-badge i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tour-pulse 1.4s ease-in-out infinite; }
.rec-badge span { font-family: var(--mono); letter-spacing: 0; }
.rec-badge-inline { position: static; }
.rec-badge-inline.is-idle { background: rgba(255, 255, 255, 0.12); color: var(--screen-soft); }
.rec-badge-inline.is-idle i { animation: none; background: var(--screen-soft); }
@keyframes tour-pulse { 50% { opacity: 0.25; } }
.count {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(6, 14, 17, 0.8); font: 750 120px/1 var(--ui); color: #fff;
}
.desk-done {
  position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; padding: 12px 14px;
  border-radius: 10px; background: rgba(6, 14, 17, 0.82); font-size: 14px;
}

/* --- 2. trim ------------------------------------------------------------- */

.strip-wrap { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.strip { position: relative; height: 118px; border-radius: 12px; touch-action: none; user-select: none; }
.strip-frames { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; border-radius: 12px; overflow: hidden; }
.f { position: relative; background: linear-gradient(170deg, #2a5560, #183a42); }
.f:nth-child(even) { background: linear-gradient(170deg, #2f5f6b, #1b4049); }
.f em {
  position: absolute; left: 6px; right: 6px; top: 10px; padding: 5px 7px; border-radius: 8px;
  background: #fff; color: #1b2a2e; font: italic 500 11.5px/1.25 var(--ui);
}
.strip-cut { position: absolute; top: 0; bottom: 0; background: rgba(6, 14, 17, 0.72); pointer-events: none; }
.strip-cut-l { left: 0; border-radius: 12px 0 0 12px; }
.strip-cut-r { right: 0; border-radius: 0 12px 12px 0; }
.grip {
  position: absolute; top: -6px; bottom: -6px; width: 18px; margin-left: -9px; padding: 0;
  border: 0; border-radius: 6px; background: #2f8aa3; cursor: ew-resize;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.grip::after { content: ""; position: absolute; left: 8px; top: 40%; bottom: 40%; width: 2px; border-radius: 1px; background: #fff; }
.strip-label { margin: 0; font-size: 15px; color: var(--screen-soft); }
.strip-label b { color: var(--screen-ink); font-family: var(--mono); font-weight: 600; }

/* --- 3. instant link ----------------------------------------------------- */

.up { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.up-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.up-note { font-size: 14.5px; color: var(--screen-soft); }
.up-pieces { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; height: 40px; }
.up-pieces i { border-radius: 4px; background: rgba(255, 255, 255, 0.07); transition: background 200ms ease; }
.up-pieces i.rec { background: rgba(240, 78, 62, 0.55); }
.up-pieces i.up { background: #2f8aa3; }
.up-legend { display: flex; gap: 18px; font-size: 13px; color: var(--screen-soft); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-rec { background: rgba(240, 78, 62, 0.55); }
.lg-up { background: #2f8aa3; }
.up-card { padding: 16px; border-radius: 14px; background: var(--screen-2); box-shadow: inset 0 0 0 1px var(--screen-rule); animation: demo-in 220ms ease-out; }
.up-card-h { margin: 0 0 10px; font-size: 15px; }
.up-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.up-url code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 500 14px/1.4 var(--mono); color: #8fd3e4; }

/* --- 4. comments --------------------------------------------------------- */

.mini { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #000; }
.mini-pic { position: relative; flex: 1; min-height: 190px; background: linear-gradient(135deg, #f4f9fa, #d7e9ee); color: #1b2a2e; display: grid; place-items: center; }
.mini-slide { display: grid; gap: 6px; text-align: center; }
.mini-slide b { font-size: 22px; letter-spacing: -0.02em; }
.mini-slide span { font-size: 14px; color: #4b6166; }
.bubble {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  max-width: min(360px, 86%); padding: 9px 13px; border-radius: 12px;
  background: #123a4a; color: #fff; font-size: 14px; line-height: 1.35; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}
.bubble b { font-weight: 650; }
.bubble .tc { font-family: var(--mono); font-size: 12px; opacity: 0.7; margin-left: 6px; }
.pops { position: absolute; inset: 0; pointer-events: none; }
.pop { position: absolute; bottom: 20%; font-size: 38px; animation: pop-rise 1.1s ease-out forwards; }
@keyframes pop-rise {
  from { opacity: 0; transform: translateY(20px) scale(0.6); }
  25% { opacity: 1; transform: translateY(0) scale(1.08); }
  to { opacity: 0; transform: translateY(-110px); }
}
.mini-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 12px; background: #0b171a; }
.mini-play { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; font-size: 12px; }
.mini-tc { font: 500 13px/1 var(--mono); color: var(--screen-soft); min-width: 34px; }
.mini-track { position: relative; flex: 1; height: 26px; cursor: pointer; }
.mini-track::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.mini-fill { position: absolute; left: 0; top: 16px; height: 4px; border-radius: 2px; background: #2f8aa3; width: 0; }
.mini-pins, .mini-emoji { position: absolute; inset: 0; }
.pin {
  position: absolute; top: 0; width: 18px; height: 22px; margin-left: -9px; padding: 0; border: 0; background: none; cursor: pointer;
}
.pin::before { content: ""; position: absolute; left: 3px; top: 0; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin, #f2a33a); }
.pin::after { content: ""; position: absolute; left: 8px; top: 11px; width: 2px; height: 8px; background: var(--pin, #f2a33a); }
.pin.is-new::before, .pin.is-new::after { --pin: #8fd3e4; }
.mini-emoji span { position: absolute; top: -18px; transform: translateX(-50%); font-size: 15px; }
.say { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); }
.say-at { font: 600 12.5px/1 var(--mono); color: #8fd3e4; white-space: nowrap; }
.say input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--screen-ink); font: inherit; font-size: 14.5px; }
.say input::placeholder { color: var(--screen-soft); }
.react-row { display: inline-flex; gap: 6px; }
.react-row button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-size: 19px; cursor: pointer; transition: transform 100ms ease; }
.react-row button:hover { transform: scale(1.1); background: rgba(255, 255, 255, 0.14); }
.react-row button:active { transform: scale(0.94); }

/* --- 5. share ------------------------------------------------------------ */

.chat { border-radius: 14px; background: #f8fbfc; color: #1d1c1d; overflow: hidden; display: flex; flex-direction: column; }
.chat-head { padding: 12px 18px; border-bottom: 1px solid #e3e8ea; font-weight: 700; font-size: 15px; }
.chat-msg { display: flex; gap: 12px; padding: 18px; }
.chat-av { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: #6d3fb0; color: #fff; font: 700 13px/1 var(--ui); }
.chat-body { min-width: 0; display: grid; gap: 4px; font-size: 15px; }
.chat-body p { margin: 0; }
.chat-link { color: #1264a3; overflow-wrap: anywhere; }
.unfurl { margin-top: 8px; display: grid; grid-template-columns: 3px 1fr; grid-template-rows: auto auto; gap: 8px 12px; max-width: 290px; }
.unfurl::before { content: ""; grid-row: 1 / 3; border-radius: 2px; background: #c7d3d7; }
.unfurl-pic {
  grid-column: 2; position: relative; aspect-ratio: 16 / 9; border-radius: 8px;
  background: linear-gradient(140deg, #dcedf2, #9fcad6); transition: opacity 200ms ease;
}
.unfurl-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; background: rgba(18, 58, 74, 0.85); }
.unfurl-play::after { content: ""; position: absolute; left: 17px; top: 13px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.unfurl-text { grid-column: 2; grid-row: 2; display: grid; gap: 2px; font-size: 14px; }
.unfurl-text b { color: #1264a3; }
.unfurl-text span { color: #616061; }
.unfurl.is-locked .unfurl-pic { display: none; }
.unfurl.is-locked .unfurl-text { grid-row: 1; }

/* --- 6. viewers ---------------------------------------------------------- */

.wave-wrap { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.wave { position: relative; height: 140px; display: flex; align-items: center; gap: 3px; }
.wave i { flex: 1; border-radius: 2px; background: rgba(143, 211, 228, 0.55); min-height: 3px; }
.wave i.quiet { background: rgba(255, 255, 255, 0.12); }
.wave i.past { background: #2f8aa3; }
.wave i.quiet.past { background: rgba(47, 138, 163, 0.35); }
.wave-head { position: absolute; top: -8px; bottom: -8px; width: 2px; left: 0; background: #fff; border-radius: 1px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15); }
.wave-flag {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  padding: 6px 12px; border-radius: 16px; background: #fff; color: #123a4a; font: 650 13px/1 var(--ui);
}
.wave-time { margin: 0; font-size: 15px; color: var(--screen-soft); }
.wave-time #skipClock { font-family: var(--mono); color: var(--screen-ink); }
.wave-saved { color: #8fd3e4; }

/* --- 7. button ----------------------------------------------------------- */

.end {
  position: relative; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(135deg, #f4f9fa, #c9e2e9); overflow: hidden;
}
/* The recording's last frame, dimmed under the button as the player does. */
.end-frame { position: absolute; inset: 0; padding: 9% 11%; display: grid; align-content: start; gap: 12px; }
.end-frame i { display: block; height: 14px; border-radius: 7px; background: rgba(27, 42, 46, 0.22); }
.end-frame i:first-child { width: 46%; height: 22px; background: rgba(27, 42, 46, 0.4); }
.end-frame i:nth-child(2) { width: 72%; }
.end-frame i:nth-child(3) { width: 58%; }
.end::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.end-go, .end-again { position: relative; z-index: 1; }
.end-go {
  max-width: 90%; padding: 15px 30px; border-radius: 14px; background: #2f8aa3; color: #fff;
  font-size: 19px; font-weight: 650; text-decoration: none; text-align: center; overflow-wrap: anywhere;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.end-go:hover { text-decoration: none; }
.end-again { font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.field-inline { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--screen-soft); }
.field-inline input {
  width: 180px; height: 38px; padding: 0 12px; border: 0; border-radius: 9px;
  background: rgba(255, 255, 255, 0.08); color: var(--screen-ink); font: inherit; font-size: 14.5px;
}
.field-inline input:focus { outline: 2px solid #8fd3e4; }

/* --- 8. who watched ------------------------------------------------------ */

.demo-bell { gap: 14px; }
.bellbar { flex: none !important; display: flex; justify-content: flex-end; }
.bell {
  position: relative; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.08);
  display: grid; place-items: center;
}
.bell::before {
  content: ""; width: 18px; height: 18px; border: 2px solid var(--screen-ink); border-bottom: 0;
  border-radius: 9px 9px 2px 2px; margin-top: -2px;
}
.bell::after { content: ""; position: absolute; bottom: 11px; width: 8px; height: 3px; border-radius: 0 0 4px 4px; background: var(--screen-ink); }
.bell.is-ringing { animation: ring 600ms ease; }
@keyframes ring { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.bell i {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--coral); color: #fff; font: 700 11.5px/20px var(--ui); font-style: normal; text-align: center;
}
.notes { flex: 1; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.note {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px;
  background: var(--screen-2); box-shadow: inset 0 0 0 1px var(--screen-rule); animation: note-in 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes note-in { from { opacity: 0; transform: translateX(26px); } }
.note-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--ui); color: #fff; }
.note p { margin: 0; font-size: 14.5px; line-height: 1.4; }
.note small { display: block; margin-top: 3px; color: var(--screen-soft); font-size: 13px; }
.note .guest { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); font-size: 11.5px; color: var(--screen-soft); }

/* --- 9. search ----------------------------------------------------------- */

.find { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.find-keys {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08); color: var(--screen-ink); font: 500 15px/1 var(--ui); cursor: pointer;
}
.find-keys kbd { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.find-box { width: min(520px, 100%); border-radius: 14px; background: #f8fbfc; color: #1b2a2e; overflow: hidden; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45); animation: demo-in 180ms ease-out; }
.find-box input { width: 100%; height: 52px; padding: 0 18px; border: 0; border-bottom: 1px solid #dbe8eb; outline: 0; background: none; font: inherit; font-size: 16px; color: #1b2a2e; }
.find-list { margin: 0; padding: 6px; list-style: none; max-height: 220px; overflow: auto; }
.find-list li { padding: 9px 12px; border-radius: 9px; cursor: pointer; display: grid; gap: 2px; }
.find-list li[aria-selected="true"] { background: rgba(42, 125, 148, 0.14); }
.find-list b { font-weight: 600; font-size: 14.5px; }
.find-list span { font-size: 13px; color: #4b6166; }
.find-list mark { background: none; color: #17596b; font-weight: 700; }
.find-list .kind { font-weight: 600; color: #17596b; }
.find-opened { margin: 0; font-size: 14.5px; color: #8fd3e4; }

/* --- 10. install --------------------------------------------------------- */

.dock { display: flex; align-items: center; justify-content: center; gap: 16px; }
.dock-app { width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); }
.dock-vistilla { position: relative; width: 96px; height: 96px; padding: 0; border: 0; border-radius: 22px; background: none; cursor: pointer; }
.dock-vistilla span { position: absolute; left: 0; right: 0; top: calc(100% + 10px); font: 600 13px/1 var(--ui); color: var(--screen-ink); }
.dock-vistilla img { width: 100%; height: 100%; border-radius: 22px; display: block; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.dock-vistilla.is-opening { animation: dock-bounce 700ms ease; }
@keyframes dock-bounce { 30% { transform: translateY(-26px); } 55% { transform: translateY(0); } 75% { transform: translateY(-9px); } }

/* --- the timeline ---------------------------------------------------------- */

.tour-bar {
  grid-area: bar;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--rule);
}
.tour-play {
  flex: none; position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--brand-solid); cursor: pointer;
}
.tour-play::after {
  content: ""; position: absolute; left: 15px; top: 12px;
  border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.tour-play.is-playing::after {
  left: 13px; top: 13px; width: 4px; height: 14px; border: 0;
  background: #fff; box-shadow: 9px 0 0 #fff;
}
.tour-clock { flex: none; font: 500 14px/1 var(--mono); color: var(--ink-soft); min-width: 92px; }
.tour-track { position: relative; flex: 1; height: 54px; }
.tour-rail { position: absolute; left: 0; right: 0; top: 34px; height: 6px; border-radius: 3px; background: var(--track-rail); overflow: hidden; }
.tour-fill { height: 100%; width: 0; background: var(--brand-solid); transition: width 300ms ease; }
.tour-pins { position: absolute; inset: 0; }
.tour-pin {
  position: absolute; top: 0; bottom: 0; width: 28px; margin-left: -14px; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.tour-pin::before {
  content: ""; position: absolute; left: 7px; top: 8px; width: 14px; height: 14px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--rule-strong); transition: background 160ms ease, transform 160ms ease;
}
.tour-pin::after { content: ""; position: absolute; left: 13px; top: 21px; width: 2px; height: 13px; background: var(--rule-strong); }
.tour-pin.is-seen::before, .tour-pin.is-seen::after { background: var(--brand); }
.tour-pin[aria-current="step"]::before { background: var(--coral); transform: rotate(-45deg) scale(1.25); }
.tour-pin[aria-current="step"]::after { background: var(--coral); }
.tour-pin span {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 6px 9px; border-radius: 8px; background: var(--inverse-bg); color: var(--inverse-ink);
  font: 500 12.5px/1.2 var(--ui); white-space: nowrap; pointer-events: none;
  display: none;
}
/* Shown only while asked for, so a label near the edge never widens the page;
   those at either end line up inward. */
.tour-pin:hover span, .tour-pin:focus-visible span { display: block; }
.tour-pin.tip-start span { left: 0; transform: none; }
.tour-pin.tip-end span { left: auto; right: 0; transform: none; }
@media (hover: none) { .tour-pin:hover span { display: none; } }
.tour-pin:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.tour-nav { grid-area: nav; display: flex; justify-content: space-between; gap: 12px; }
.tour-nav .btn { min-width: 120px; justify-content: center; }

/* --- narrow screens ------------------------------------------------------ */

@media (max-width: 900px) {
  .tour {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "screen" "bar" "nav";
    gap: 20px; padding: 22px 16px 40px;
  }
  .tour-lead { max-width: none; }
  .tour-screen { min-height: 470px; }
  .demo { padding: 16px; gap: 14px; }
  .tour-clock { display: none; }
  .tour-bar { padding: 10px 12px; gap: 10px; }
}
@media (max-width: 520px) {
  .tour-steps li { font-size: 14.5px; }
  .cam-bubble { width: 64px; height: 64px; right: 12px; bottom: 12px; }
  .strip { height: 92px; }
  .f em { font-size: 10.5px; left: 3px; right: 3px; }
  .up-pieces { grid-template-columns: repeat(16, 1fr); }
  .field-inline { width: 100%; justify-content: space-between; }
  .field-inline input { flex: 1; width: auto; }
  .dock-app:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo.is-entering, .up-card, .note, .find-box { animation: none; }
  .pop { animation-duration: 0.5s; }
  .bell.is-ringing, .dock-vistilla.is-opening { animation: none; }
  .rec-badge i { animation: none; }
}
