/* Stardust: the particle background (js/stardust/main.js) and its panel. The canvas is made by
   the script, so without JavaScript or WebGL2 none of this shows and the page keeps its plain
   background. */

/* Behind the page. The body's own colour would paint over a z-index -1 canvas, so it goes
   transparent while the canvas shows; html keeps the hull colour underneath, and the body keeps
   its scanlines, which now lie over the dust. */
.stardust { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }
.stardust[hidden] { display: none; }
.has-stardust body { background-color: transparent; }

/* "Hide the page": everything but the background and the panel. */
.stardust-solo .skip, .stardust-solo .preview-bar, .stardust-solo .console,
.stardust-solo main, .stardust-solo .colophon { visibility: hidden; }

.stardust-panel { position: fixed; right: 12px; bottom: 12px; z-index: 50;
  max-height: calc(100vh - 24px); overflow: auto; background: rgba(7, 11, 21, .92);
  border: 1px solid var(--line-hi); font: 12px/1.4 var(--ff-mono); color: var(--text); }
.stardust-panel__toggle { display: block; width: 100%; padding: .4rem .8rem; text-align: left;
  background: var(--panel); color: var(--ice); border: 0; font: inherit; letter-spacing: .06em;
  cursor: pointer; }
.stardust-panel__toggle:hover { color: var(--white); }
.stardust-panel__body { width: min(300px, calc(100vw - 26px)); padding: .2rem .8rem .8rem; }
.stardust-panel__body[hidden] { display: none; }
.stardust-panel h3 { margin: .8rem 0 .3rem; font: 600 11px/1 var(--ff-mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--amber); }
.stardust-panel__row { display: grid; grid-template-columns: 7.5rem 1fr 3rem; gap: .5rem;
  align-items: center; margin: .2rem 0; }
.stardust-panel__row output { text-align: right; color: var(--ice); }
.stardust-panel__row input[type=range] { width: 100%; accent-color: var(--ice); }
.stardust-panel select { grid-column: span 2; background: var(--well); color: var(--text);
  border: 1px solid var(--line-hi); font: inherit; }
.stardust-panel__buttons { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .9rem; }
.stardust-panel__buttons button { padding: .3rem .55rem; background: var(--well); color: var(--ice);
  border: 1px solid var(--line-hi); font: inherit; cursor: pointer; }
.stardust-panel__buttons button:hover:not(:disabled) { border-color: var(--ice); }
.stardust-panel__buttons button[aria-pressed="true"] { border-color: var(--ice); color: var(--white); }
.stardust-panel__buttons button:disabled { color: var(--dim); cursor: default; }

@media print {
  .stardust, .stardust-panel { display: none; }
  .has-stardust body { background-color: var(--hull); }
}
