.demo-bar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 24px; background: #efe6ed; border-bottom: 1px solid var(--line); }
.demo-context { display: flex; flex-direction: column; gap: 4px; max-width: 720px; line-height: 1.45; }
.demo-context strong { font-size: 16px; }
.demo-context span { font-size: 14px; color: var(--muted); }
.demo-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.demo-clock { font-variant-numeric: tabular-nums; font-size: 16px; min-width: 3em; }
.demo-bar .btn { background: white; }
.shell { min-height: calc(100dvh - var(--demo-bar-height, 100px)); }
.sidebar { top: var(--demo-bar-height, 100px); height: calc(100dvh - var(--demo-bar-height, 100px)); }
.demo-ended { min-height: calc(100dvh - var(--demo-bar-height, 100px)); max-width: 650px; margin: auto; padding: 60px 24px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px; }
.demo-ended h1 { font-size: clamp(30px, 5vw, 44px); }
.demo-ended p { font-size: 17px; color: var(--muted); }
.demo-ended .actions { gap: 16px; }
#demo-preview-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; max-height: 55dvh; overflow: auto; background: var(--canvas); padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.demo-noscript { padding: 30px; }
@media (max-width: 700px) {
 .demo-bar { padding: 12px 16px; gap: 10px; }
 .demo-context span { font-size: 13px; }
 .demo-controls { gap: 12px; width: 100%; }
 .demo-controls a { margin-left: auto; }
 .sidebar { height: auto; top: var(--demo-bar-height, 100px); }
 .nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
 .nav a { min-width: 0; padding: 9px 3px; font-size: 12px; text-align: center; }
 .nav a span { overflow-wrap: anywhere; }
 .demo-ended { padding: 36px 20px; }
}
