* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

main {
  width: min(420px, 100vw);
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}

h1 {
  margin: 0 0 32px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #7a7a7a;
}

section { display: grid; gap: 12px; }
section[hidden] { display: none; }

.btn {
  display: block;
  padding: 15px;
  border: 1px solid #262626;
  border-radius: 14px;
  background: #0d0d0d;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #161616; border-color: #3a3a3a; }
.btn.primary { background: #fff; border-color: #fff; color: #000; }
.btn.primary:hover { background: #e6e6e6; border-color: #e6e6e6; }
.btn.ghost { border-color: transparent; background: none; color: #7a7a7a; }

.glow {
  position: relative;
  display: grid;
  place-items: center;
  /* The orb fills the box; the padding is the dust ring around the content. */
  padding: 15%;
  margin: 8px 0 20px;
  aspect-ratio: 1;
}

/* The code canvas draws its own dust ring, so it takes the whole box. */
#code .glow { padding: 0; }

.orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#canvas, #video {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

p { margin: 0; color: #8a8a8a; font-size: 14px; }

.bar { height: 3px; border-radius: 3px; background: #1f1f1f; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .12s linear; }
