/*
 * Demo demo20 "Background study": the live DEPO header and footer with two empty screens between
 * them, so nothing covers the animated background. The background itself is written by
 * js/background.js from its CONFIG; this file only lays out the page and the ?tune panel.
 */
.app-shell { position: relative; z-index: 1; }
.d20 { display: block; }
.d20__screen { min-height: 100vh; min-height: 100svh; }
.d20__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ?tune — live background controls */
.bg-tuner {
    position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(320px, calc(100vw - 32px));
    max-height: calc(100vh - 32px); overflow: auto; padding: 12px 14px;
    background: rgb(24 23 26 / 0.92); border: 1px solid rgb(255 255 255 / 0.16); border-radius: 12px;
    color: #fff; font: 400 13px/1.4 "Lato", system-ui, sans-serif; backdrop-filter: blur(8px);
}
.bg-tuner__title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.bg-tuner.is-folded .bg-tuner__body { display: none; }
.bg-tuner.is-folded .bg-tuner__title { margin: 0; }
.bg-tuner__row { display: grid; grid-template-columns: 1fr 1.3fr auto; align-items: center; gap: 8px; margin: 6px 0; }
.bg-tuner__row input[type="range"] { width: 100%; accent-color: #469a58; }
.bg-tuner__row input[type="color"] { grid-column: 2 / span 2; width: 100%; height: 28px; padding: 0; border: 0; background: none; }
.bg-tuner__row select { grid-column: 2 / span 2; padding: 4px 6px; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 6px; background: #27262b; color: #fff; font: inherit; }
.bg-tuner__row input[type="checkbox"] { justify-self: start; accent-color: #469a58; }
.bg-tuner__row output { min-width: 3ch; text-align: right; color: #ffb500; font-variant-numeric: tabular-nums; }
.bg-tuner button { padding: 6px 12px; border: 0; border-radius: 999px; background: #469a58; color: #fff; font: 700 12px/1 "Lato", system-ui, sans-serif; cursor: pointer; }
.bg-tuner__fold { padding: 2px 9px !important; background: rgb(255 255 255 / 0.12) !important; }
.bg-tuner__actions { display: flex; gap: 8px; margin: 10px 0 8px; }
.bg-tuner__out { width: 100%; padding: 8px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 8px; background: #111; color: #cfe9d6; font: 12px/1.4 ui-monospace, Menlo, monospace; resize: vertical; }
.bg-tuner__sub { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / 0.12); color: #a1a1aa; font-size: 12px; }
.bg-tuner__row select optgroup { color: #a1a1aa; }
.bg-tuner__save { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / 0.12); }
.bg-tuner__save input { flex: 1 1 140px; min-width: 0; padding: 6px 8px; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 6px; background: #27262b; color: #fff; font: inherit; }
.bg-tuner__save button[data-act="delete"] { background: #5a2a30; }
.bg-tuner__msg { min-height: 1.4em; margin: 4px 0; color: #ffb500; }

/* "All demos": the shared default (/bg) and which demos follow it */
.bg-tuner__all { margin: 4px 0 8px; }
.bg-tuner__all .bg-tuner__sub { margin-top: 8px; color: #fff; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.bg-tuner__note { margin: 4px 0; color: #a1a1aa; font-size: 12px; }
.bg-tuner__note b { color: #ffb500; font-weight: 700; }
.bg-tuner__quiet { background: rgb(255 255 255 / 0.12) !important; }
.bg-tuner__demos { display: grid; gap: 2px; max-height: 190px; overflow: auto; margin: 6px 0; padding: 6px 8px; list-style: none; border: 1px solid rgb(255 255 255 / 0.12); border-radius: 8px; }
.bg-tuner__demos label { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.bg-tuner__demos input { accent-color: #469a58; }
.bg-tuner__demos a { color: #fff; font-variant-numeric: tabular-nums; text-decoration: none; }
.bg-tuner__demos a:hover { color: #53f57e; }
.bg-tuner__demos span { overflow: hidden; color: #a1a1aa; white-space: nowrap; text-overflow: ellipsis; }

/* the preset's permanent link and the preset demo20 opens with for everyone */
.bg-tuner__link, .bg-tuner__start { margin: 6px 0 8px; }
.bg-tuner__link input { width: 100%; padding: 6px 8px; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 6px; background: #111; color: #cfe9d6; font: 12px/1.4 ui-monospace, Menlo, monospace; }
.bg-tuner__link .bg-tuner__actions, .bg-tuner__start .bg-tuner__actions { flex-wrap: wrap; align-items: center; margin: 6px 0 4px; }
.bg-tuner__link a { color: #53f57e; font-size: 12px; font-weight: 700; }
.bg-tuner__start .bg-tuner__actions:empty { display: none; }
