.image-page .media-grid {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}
.image-page .media-section-head h2 {
  overflow-wrap: anywhere;
}
.image-presets,
.image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.image-presets {
  margin: 0 0 24px;
}
.image-result-art {
  display: block;
  background: #121212;
  text-align: center;
}
.image-result-art img {
  width: 100%;
  height: auto;
  max-height: 660px;
  object-fit: contain;
  display: block;
}
.image-page #image-result {
  min-height: 360px;
}
.image-empty {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 24px;
}
.image-empty p {
  max-width: 420px;
  line-height: 1.8;
  margin: 0;
}
.image-empty-art {
  width: 160px;
  height: 110px;
  position: relative;
  margin: 0 0 24px;
}
.image-empty-art span {
  position: absolute;
  inset: 10px 0;
  border: 1px solid #6d6450;
}
.image-empty-art span:nth-child(2) {
  transform: rotate(-12deg);
  opacity: 0.5;
}
.image-empty-art span:nth-child(3) {
  transform: rotate(12deg);
  opacity: 0.3;
}
.image-history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.image-history-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0 0 12px;
  background: #111;
  border: 1px solid #2d2d2d;
  border-radius: 4px;
  overflow: hidden;
  gap: 9px;
}
.image-history-item[aria-pressed="true"] {
  border-color: #d9bb75;
}
.image-history-item img,
.image-history-placeholder {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #1c1c1c;
}
.image-history-placeholder {
  display: grid;
  place-items: center;
  color: #b9ac8c;
}
.image-history-item strong,
.image-history-item span {
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-progress {
  height: 2px;
  background: linear-gradient(90deg, #373229, #c9af74, #373229);
  background-size: 200% 100%;
  animation: image-processing 2s linear infinite;
  margin: 30px 0;
}
@keyframes image-processing {
  to {
    background-position: 200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .image-progress {
    animation: none;
  }
}
@media (max-width: 1050px) {
  .image-page .media-grid {
    grid-template-columns: 1fr;
  }
  .image-history-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .image-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .image-empty {
    padding: 16px;
  }
  .image-actions > * {
    flex: 1 1 42%;
  }
  .image-page #image-result {
    min-height: 260px;
  }
}

@media (max-width: 540px) {
  .image-page .app-context {
    display: none;
  }
  .image-page .app-back {
    white-space: nowrap;
  }
}
