/* Demo controls beside the wall (the Try it page and the shareable demo) */
.demo { position: fixed; right: 12px; top: 12px; width: 320px; max-height: calc(100% - 24px); overflow: auto; z-index: 20; display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(22, 14, 44, 0.96); border: 1px solid var(--line); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.demo[hidden] { display: none; }
.demo.closed { width: auto; }
.demo.closed .demo-body { display: none; }
.demo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.demo-head strong { color: var(--gold); font-size: 15px; }
.demo-body { display: grid; gap: 8px; }
.demo-line { margin: 0; font-weight: 700; min-height: 2.6em; }
.demo-row { display: flex; gap: 6px; }
.demo-row .grow { flex: 1; }
.demo-row input[type="text"] { flex: 1; min-width: 0; }
.demo .btn { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.demo .btn.small { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.demo-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--ink-dim); }
.demo-feed li { padding: 3px 8px; border-radius: 6px; background: var(--row); }
.demo-settings summary { cursor: pointer; font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.demo-settings { display: grid; gap: 8px; }
.demo-field { display: grid; gap: 4px; }
.demo-label { font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.demo .seg { display: flex; gap: 4px; }
.demo .seg input { position: absolute; opacity: 0; pointer-events: none; }
.demo .seg label { flex: 1; text-align: center; padding: 6px 4px; border-radius: 7px; border: 1px solid var(--line); background: var(--raised); font-weight: 700; font-size: 13px; cursor: pointer; }
.demo .seg input:checked + label { background: var(--gold); border-color: var(--gold); color: var(--stage); }
.demo .check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.demo input[type="text"] { background: var(--stage); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; min-height: 38px; }
.demo-status { margin: 0; font-size: 12px; color: var(--aqua); min-height: 1.2em; }
.demo-foot { margin: 0; font-size: 12px; color: var(--ink-dim); line-height: 1.4; }
.demo-foot a { color: var(--gold); }
/* Phones: the wall sits at the top at full width and the controls follow in the flow; the page scrolls. */
html.stacked, html.stacked body { overflow: auto; height: auto; min-height: 100%; }
html.stacked .stage { top: 0; }
html.stacked .demo { position: static; margin: 10px 8px 24px; width: auto; max-height: none; box-shadow: none; }
html.stacked .demo .btn { min-height: 46px; font-size: 15px; }
html.stacked .demo .seg label { padding: 9px 4px; font-size: 14px; }
html.stacked .demo-line { min-height: 0; }
html.stacked .notice { left: 8px; right: 8px; max-width: none; }
