.demo-overlay {
  position: fixed; inset: 0; z-index: 10000; box-sizing: border-box;
  overflow-y: auto; overscroll-behavior: contain; background: #1a1015;
  color: #f6e6e9; font-family: var(--font-body, sans-serif);
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.demo-overlay * { box-sizing: border-box; }
.demo-panel { width: 100%; max-width: 420px; margin: auto; text-align: center; }
.demo-panel h2 { font-family: var(--font-display, serif); font-size: clamp(24px, 6vw, 32px); font-weight: 400; line-height: 1.2; margin: 0 0 12px; }
.demo-intro { color: #bda0aa; font-size: 15px; line-height: 1.5; margin: 0 auto 12px; max-width: 340px; }
.demo-art { display: block; width: 100%; max-width: 360px; height: auto; aspect-ratio: 1; margin: auto; }
.demo-body { fill: none; stroke: #bda0aa; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.demo-detail { opacity: .35; stroke-width: 1.3; }
.demo-route { fill: none; stroke: #e8a4a4; stroke-width: 1.5; stroke-dasharray: 3 7; opacity: 0; }
.demo-caption { min-height: 48px; margin: 12px 0 0; font-size: 18px; line-height: 1.4; color: #f6e6e9; }
.demo-caption-list { text-align: left; margin: 12px auto 20px; padding-left: 28px; max-width: 340px; color: #f6e6e9; font-size: 16px; line-height: 1.8; }
.demo-overlay [hidden] { display: none; }
.demo-close { min-width: 112px; min-height: 48px; padding: 12px 24px; border: 1px solid #e8a4a4; border-radius: 999px; color: #1a1015; background: #e8a4a4; font: inherit; cursor: pointer; }
.demo-close:focus-visible { outline: 2px solid #f6e6e9; outline-offset: 5px; }
.demo-reduced .demo-route { opacity: .4; }
.demo-reduced .demo-trail { display: none; }
@media (prefers-reduced-motion: reduce) {
  .demo-route { opacity: .4; }
  .demo-trail { display: none; }
}

.demo-inline {
  box-sizing: border-box; width: 100%; max-width: 300px; margin: 14px auto;
  padding: 14px; border-radius: 20px; background: rgba(26,16,21,.55);
  color: #f6e6e9; text-align: center;
}
.demo-inline h3 { margin: 0 0 10px; font-size: 16px; font-weight: 400; }
.demo-inline .demo-art { max-width: 240px; }
.demo-inline .demo-caption { font-size: 16px; }
.demo-inline [hidden] { display: none; }
