.leafy-tour { padding-block: clamp(1rem, 3vw, 2.5rem) 3rem; }
.leafy-tour .tour-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.5rem; margin-bottom: 1.5rem; }
.leafy-tour h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; }
.leafy-tour .tour-heading p { margin: .45rem 0 0; }
.leafy-tour a { color: var(--text); text-decoration: underline; text-underline-offset: .2em; }
.tour-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem 1rem; margin-inline-start: auto; }
.leafy-tour .tour-back-to-popup {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: .4rem .8rem; border: 1px solid currentColor; border-radius: 8px;
  background: var(--button); color: var(--button-text); font-size: .875rem; font-weight: 650; text-decoration: none;
}
.leafy-tour .tour-back-to-popup:hover { background: var(--button-hover); }
.tour-stage { position: relative; }
.tour-step { margin: 0 0 1rem; color: var(--text); }
.tour-step figcaption { min-height: 6rem; margin-bottom: 1rem; }
.tour-navigation:not([hidden]) ~ .tour-frames figcaption { padding-right: 12rem; }
.tour-step h2 { margin: .25rem 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem); line-height: 1.15; }
.tour-step p { max-width: 64ch; margin: 0; }
.tour-step .tour-count { color: var(--muted); font-size: .82rem; font-weight: 650; }
.tour-step picture { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.tour-step img { display: block; width: 100%; height: auto; }
.tour-navigation { position: absolute; z-index: 1; top: .5rem; right: 0; display: flex; gap: .5rem; }
.tour-navigation[hidden], .tour-step[hidden] { display: none; }
.tour-navigation button { min-width: 4.5rem; min-height: 44px; padding: .45rem .8rem; font: inherit; font-weight: 650; cursor: pointer; border: 1px solid var(--border); border-radius: 8px; background: var(--tile); color: var(--text); }
.tour-navigation [data-next] { background: var(--button); color: var(--button-text, white); border-color: transparent; }
.tour-navigation button:disabled { cursor: default; opacity: .55; }
.tour-navigation button:focus-visible, .leafy-tour a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.tour-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (prefers-reduced-motion: no-preference) {
  .tour-navigation:not([hidden]) ~ .tour-frames .tour-step:not([hidden]) picture { animation: tour-appear .16s ease-out; }
  @keyframes tour-appear { from { opacity: .7; } to { opacity: 1; } }
}
@media (max-width: 640px) {
  .tour-step picture { width: min(100%, 375px); margin-inline: auto; }
  .tour-navigation { position: static; justify-content: flex-end; margin-bottom: .75rem; }
  .tour-step figcaption { min-height: 0; }
  .tour-navigation:not([hidden]) ~ .tour-frames figcaption { padding-right: 0; }
}
