#resultImage {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(70vh, 680px);
  object-fit: contain;
  box-shadow: 0 16px 36px rgba(28, 33, 30, .14);
}

#resultImage:not([src]) {
  visibility: hidden;
}

.result-layout aside button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.history-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.history-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.history-section em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.history-section h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.history-section > header small {
  color: var(--muted);
  font-size: 10px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.history-item {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.history-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.history-item span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
}

.history-item b,
.history-item small {
  font-size: 10px;
}

.history-item small {
  color: var(--muted);
}

@media (max-width: 850px) {
  #resultImage {
    width: 100%;
    height: auto;
  }

  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
