html {
  background-color: #000000 !important;
  color: inherit;
}

.thumb-img {
  border-color: #000000 !important;
}

#loupeContainer div.background {
  background-color: #000000 !important;
  color: inherit;
}

header div.background {
  background-color: #000000 !important;
  color: inherit;
}

.custom-colorable {
  fill: #A0A0A0 !important;
}

body {
  background-color: #000000 !important;
  color: #828282 !important;
}

header,
header div.background {
  min-height: 148px;
}

header div.meta-left {
  width: 34%;
}

header div.meta-right {
  width: 66%;
  padding: 16px 20px 0 10px;
}

.has-header #thumbnailContainer {
  padding-top: 156px;
}

.gallery-tools {
  position: relative;
  z-index: 1;
  font-size: 13px;
  line-height: 1.25;
  color: #d8d8d8;
}

.tool-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #555555;
  border-radius: 6px;
  background: #161616;
  color: #f2f2f2;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.tool-button:hover,
.tool-button:focus {
  border-color: #9a9a9a;
  background: #242424;
  outline: none;
}

.tool-button:disabled {
  opacity: .45;
  cursor: default;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.face-preview {
  position: absolute;
  top: 42px;
  right: 0;
  width: 64px;
  height: 64px;
  border: 1px solid #555555;
  border-radius: 6px;
  overflow: hidden;
  background: #111111;
}

.face-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face-status {
  clear: both;
  min-height: 18px;
  margin: 10px 74px 0 0;
  color: #cfcfcf;
  text-align: right;
}

.face-status.is-error {
  color: #ffb7b7;
}

div.thumbnail.face-filter-hidden {
  display: none !important;
}

.download-photo {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .72);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  opacity: .96;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  transition: opacity .12s ease-out, background .12s ease-out;
}

div.thumbnail:hover .download-photo,
.download-photo:focus {
  opacity: 1;
}

.download-photo:hover,
.download-photo:focus {
  background: rgba(255, 255, 255, .92);
  color: #000000;
  outline: none;
}

.loupe-download-button {
  position: absolute;
  top: 0;
  right: 45px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  color: #a0a0a0;
  font-size: 27px;
  line-height: 1;
  text-decoration: none;
}

.loupe-download-button:hover,
.loupe-download-button:focus {
  color: #ffffff;
  outline: none;
}

.camera-panel {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .86);
  box-sizing: border-box;
}

.camera-panel.is-open {
  display: flex;
}

.camera-dialog {
  width: min(680px, 100%);
}

.camera-dialog video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #111111;
  border: 1px solid #555555;
  border-radius: 6px;
  object-fit: contain;
}

.camera-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

@media screen and (max-width: 960px) {
  header,
  header div.background {
    min-height: 186px;
  }

  header div.meta-left,
  header div.meta-right {
    width: 100%;
    float: none;
    padding-right: 20px;
  }

  header div.meta-right {
    padding-top: 12px;
  }

  .tool-row {
    justify-content: flex-start;
  }

  .face-preview {
    top: auto;
    right: 20px;
    bottom: 14px;
  }

  .face-status {
    margin-right: 86px;
    text-align: left;
  }

  .has-header #thumbnailContainer {
    padding-top: 194px;
  }
}

@media screen and (max-width: 568px) {
  header,
  header div.background {
    min-height: 244px;
  }

  header div.meta-right {
    padding-left: 10px;
    padding-right: 10px;
  }

  .gallery-tools {
    width: calc(100vw - 20px);
  }

  .has-header #thumbnailContainer {
    padding-top: 252px;
  }

  .tool-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .tool-button {
    width: 100%;
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #buttonDownloadAll {
    grid-column: 1 / -1;
  }

  .face-preview {
    width: 54px;
    height: 54px;
  }

  .download-photo {
    opacity: 1;
  }
}
