/* The host keeps native dialog focus, Escape and backdrop behavior. */
#dialog:has(.tour) {
  width: min(570px, calc(100% - 24px));
  max-width: 570px;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
}
#dialog[open]:has(.tour){display:flex;flex-direction:column}
#dialog:has(.tour)>.modal-header{flex-shrink:0;margin:0;padding:16px 24px 12px}
.tour {
  display: flex;
  flex-direction: column;
  flex:1 1 auto;
  min-height:0;
}
.tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 24px 7px;
  flex-shrink: 0;
}
.tour-progress { color: var(--muted); font-size: 12px; font-weight: 600; }
.tour-skip {
  padding: 8px 10px;
  min-height: 44px;
  background: none;
  border: 0;
  border-radius: 9px;
  color: var(--green);
  font-size: 13px;
}
.tour-skip:hover { background: var(--paper); }
.tour-track { display: flex; gap: 5px; padding: 0 24px; flex-shrink: 0; }
.tour-track span { height: 4px; border-radius: 4px; background: var(--border); flex: 1; }
.tour-track .reached { background: var(--green); }
.tour-body { flex:1 1 auto; padding: 24px 24px 18px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.tour-body .eyebrow { font-size: 10px; margin-bottom: 9px; }
.tour-body h2 { font-size: 25px; line-height: 1.2; letter-spacing: -.5px; }
.tour-summary { font-size: 14px; line-height: 1.55; margin-top: 13px; }
.tour-points { list-style: none; margin: 19px 0; padding: 0; display: grid; gap: 13px; }
.tour-points li { position: relative; padding-left: 21px; font-size: 14px; line-height: 1.5; }
.tour-points li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.tour-note { border-radius: 12px; background: #f0f5e8; padding: 12px 14px; color: var(--ink); font-size: 12px; line-height: 1.55; }
.tour-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 13px; }
.tour-section-link { background: none; border: 0; border-radius: 7px; color: var(--green); text-align: left; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; font-weight: 600; min-height: 44px; padding: 5px 2px; }
.tour-link-hint { margin-top: 2px; font-size: 11px; line-height: 1.45; }
.tour-footer { display: flex; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 15px 24px 20px; border-top: 1px solid var(--border); background: #fff; }
.tour-footer .btn { min-width: 100px; }
.tour-footer .btn:disabled { cursor: default; opacity: .45; }
.tour button:focus-visible, .tour h2:focus-visible { outline: 3px solid #88aa70; outline-offset: 2px; }
@media (max-width: 480px) {
  #dialog:has(.tour)>.modal-header{padding:12px 18px 10px}
  .tour-header { padding: 10px 18px 7px; }
  .tour-track { padding: 0 18px; }
  .tour-body { padding: 20px 18px 15px; }
  .tour-body h2 { font-size: 23px; }
  .tour-summary, .tour-points li { font-size: 13px; }
  .tour-points { gap: 12px; margin: 17px 0; }
  .tour-footer { padding: 12px 18px 16px; }
  .tour-footer .btn { min-width: 112px; }
}
