/* Shared welcome dialog, also served by Vibe. */
.walkthrough { width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); color: var(--text); box-shadow: var(--shadow-md); }
.walkthrough::backdrop { background: rgba(11, 31, 51, .62); backdrop-filter: blur(4px); }
.walkthrough-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.walkthrough h1 { max-width: 620px; margin: 10px 0 12px; font: 400 clamp(27px, 4vw, 40px)/1.1 var(--serif); letter-spacing: -.02em; }
.walkthrough > p { color: var(--muted); margin: 0 0 18px; }
.walkthrough-player { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0b1f33; }
.walkthrough video { display: block; width: 100%; aspect-ratio: 80 / 51; }
.walkthrough-play { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; width: 100%; border: 0; border-radius: 0; background: transparent; color: white; text-shadow: 0 1px 4px #0008; }
.walkthrough-play span:first-child { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: var(--accent-text); padding-left: 3px; font-size: 22px; box-shadow: 0 4px 22px #0004; }
.walkthrough .walkthrough-note { font-size: 12px; margin: 10px 0 14px; }
.walkthrough-transcript { font-size: 14px; color: var(--muted); }
.walkthrough-transcript summary { cursor: pointer; color: var(--text); margin: 0; font: inherit; text-transform: none; letter-spacing: normal; list-style: revert; }
.walkthrough-transcript > summary::before { content: none; }
.walkthrough-transcript li { padding: 3px 0; }
.walkthrough-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.walkthrough-help { flex-shrink: 0; }
@media (max-width: 480px) {
  .walkthrough { padding: 16px; width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .walkthrough-play { font-size: 12px; gap: 8px; }
  .walkthrough-play span:first-child { width: 44px; height: 44px; font-size: 16px; }
}


.walkthrough button.icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-color: transparent; background: none; color: var(--muted); font-size: 18px; }
.walkthrough [hidden] { display: none !important; }

/* Use the phone recording at its full readable width; allow vertical scrolling
   on short screens instead of shrinking the entire demonstration. */
.walkthrough[data-recording="mobile"] video { aspect-ratio: 390 / 700; }
.walkthrough[data-recording="mobile"] .walkthrough-player { max-width: 420px; margin-inline: auto; }
.walkthrough[data-recording="mobile"] .walkthrough-top { position: sticky; top: -12px; z-index: 2; background: var(--bg); }
@media (max-width: 600px) {
  .walkthrough { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 12px; border-radius: 16px; overscroll-behavior: contain; }
  .walkthrough-top { position: sticky; top: -12px; z-index: 2; background: var(--bg); padding: 4px 0; }
  .walkthrough button.icon { width: 44px; height: 44px; font-size: 24px; }
  .walkthrough h1 { font-size: 26px; margin: 4px 0 8px; }
  .walkthrough > p { font-size: 14px; line-height: 1.4; margin-bottom: 12px; }
  .walkthrough-play { font-size: 15px; gap: 10px; }
  .walkthrough-play span:first-child { width: 56px; height: 56px; font-size: 20px; }
  .walkthrough-transcript summary { padding-block: 12px; min-height: 44px; }
  .walkthrough-actions { margin-top: 12px; }
  .walkthrough-actions button { min-height: 44px; flex: 1; }
}
