body {
  font-family: sans-serif;
  max-width: 800px;
  margin: 0 auto;
  background: #ccc;
}

header, main, footer, h1 {
  margin: 10px;
}

header, main, dialog {
  padding: 10px;
  background: white;
  border: 1px solid #999;
  border-radius: 2px;
}

dialog::backdrop {
  background: rgba(255, 255, 255, 0.5);
}

main {
  display: grid;
  grid-gap: 10px;
}

section {
  border: 1px solid #ccc;
}

header, section {
  padding: 0 10px;
}

header form, section > * {
  margin: 10px 0;
}

section p {
  text-align: center;
  font-style: italic;
}

@media (min-width: 200px) {
  main { grid-template-columns: repeat(2, 1fr); }
  #db, .progress { grid-column: span 2; }
  #rom, #sav { grid-column: span 2; }
}

@media (min-width: 400px) {
  main { grid-template-columns: repeat(4, 1fr); }
  #db, .progress { grid-column: span 4; }
  #rom, #sav { grid-column: span 2; }
}

@media (min-width: 600px) {
  main { grid-template-columns: repeat(6, 1fr); }
  #db, .progress { grid-column: span 6; }
  #rom, #sav { grid-column: span 3; }
}

h1, h2, h3 {
  text-align: center;
}

h2, h3 {
  font-size: 100%;
}

footer {
  font-size: 90%;
  text-align: center;
}

ul {
  padding: 0;
  list-style: none;
}

li {
  text-indent: -20px;
  margin-left: 20px;
}

img {
  image-rendering: pixelated;
}

progress {
  height: 30px;
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 10px auto;
}

form {
  display: flex;
  flex-wrap: wrap;
  grid-gap: 10px;
}

.valid::after {
  content: " ✅"
}

.invalid::after {
  content: " ⛔️"
}

.plug-item {
    font-size: 90%;
}

.plug-item img {
    display: block;
    margin: 10px auto;
    width: 64px;
}

@media (prefers-color-scheme: dark) {
  body { background: black; color: white; }
  header, main, dialog { background: #333; color: white; border: 1px solid #666; }
  section { border: 1px solid #666; }
  a:link { color: #7bf; }
  a:visited { color: #b7f; }
  a:active { color: #f77; }
  dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
  #rom img { filter: invert(1); }
}
