/* Demo shell: a slim banner on top, room made for it, and the "Try this" card. */
:root { --demo-h: 36px; --demo-brand: #6E4BF2; }
body { padding-top: var(--demo-h); }
.app { min-height: calc(100vh - var(--demo-h)); }
nav.side { top: var(--demo-h); height: calc(100vh - var(--demo-h)); }
.capture { top: var(--demo-h); }
.tl-wrap { top: calc(74px + var(--demo-h)); }
.tpanel { top: calc(12px + var(--demo-h)); max-height: calc(100vh - 24px - var(--demo-h)); }
.drawer { top: var(--demo-h); }
.gate { min-height: calc(100vh - var(--demo-h)); }

.demo-banner { position: fixed; top: 0; left: 0; right: 0; height: var(--demo-h); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--demo-brand); color: #fff; font: 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
.demo-banner .demo-tag { font-weight: 700; letter-spacing: .02em; background: rgba(255,255,255,.18); padding: 3px 8px; border-radius: 99px; }
.demo-banner .demo-msg { opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-banner .demo-sp { flex: 1; }
.demo-banner a, .demo-banner button { color: #fff; font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }
.demo-banner a:hover { text-decoration: underline; }
.demo-banner .demo-try { background: transparent; border: 1px solid rgba(255,255,255,.55); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.demo-banner .demo-try.on, .demo-banner .demo-try:hover { background: rgba(255,255,255,.18); }
.demo-banner a:focus-visible, .demo-banner button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.narrow-only { display: none; }

.demo-card { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 300px; max-height: calc(100vh - var(--demo-h) - 36px); overflow-y: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-top: 3px solid var(--demo-brand); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.14); padding: 12px 14px 10px; font-size: 13.5px; }
.demo-card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.demo-card-h b { font-size: 14px; color: var(--demo-brand); }
.demo-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.demo-x:hover { background: var(--surface-2); }
.demo-card ol { margin: 0; padding-left: 18px; }
.demo-card li { margin: 8px 0; }
.demo-chips { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.demo-chips button, .demo-go { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 12.5px; color: var(--text); }
.demo-chips button:hover, .demo-go:hover { border-color: var(--demo-brand); }
.demo-go { display: inline-block; margin-top: 4px; color: var(--demo-brand); font-weight: 600; }
.demo-fine { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.demo-prefill { cursor: pointer; text-decoration: underline dotted; }

@media (max-width: 760px) {
  .wide-only { display: none; } .narrow-only { display: inline; }
  .demo-banner { gap: 8px; padding: 0 10px; font-size: 12.5px; }
  .demo-card { left: 10px; right: 10px; width: auto; bottom: calc(62px + env(safe-area-inset-bottom)); max-height: 60vh; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo-card { box-shadow: 0 8px 30px rgba(0,0,0,.5); } }
