.header-qr-button {
  display: none;
}

.qr-reader {
  width: min(540px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 20px;
  border: 1px solid #65bd73;
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  overflow-y: auto;
}

.qr-reader::backdrop {
  background: rgba(32, 39, 48, 0.55);
}

.qr-reader-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qr-reader h2 {
  margin: 0;
  font-size: 1.1em;
}

.qr-reader-heading button {
  flex-shrink: 0;
}

.qr-reader-video {
  display: block;
  width: 100%;
  max-height: 50dvh;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #18251e;
}

.qr-reader button:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 840px) {
  .qr-reader {
    font-size: calc(16px * var(--ui-scale) / 0.74);
  }

  .top-header {
    grid-template-columns: 40px minmax(0, 1fr) 44px 44px minmax(64px, 100px);
    gap: 12px;
    padding-inline: 10px;
  }

  .mobile-menu-toggle {
    width: 40px;
  }

  .header-qr-button {
    display: grid;
    grid-column: 3;
    align-self: end;
  }

  .header-actions .icon-control {
    grid-column: 4;
    transform: none;
  }

  .top-header .icon-control {
    width: 44px;
    height: 38px;
    min-width: 0;
    min-height: 0;
    grid-template: 38px / 44px;
  }

  .top-header .icon-control img {
    width: 38px;
    height: 38px;
    max-width: 44px;
    max-height: 38px;
  }

  .top-header [data-refresh] img {
    width: calc(38px * 120 / 105);
  }

  .user-control {
    grid-column: 5;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
