:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --text: #1d1d1d;
  --muted: #7b7f93;
  --line: #e4e5e7;
  --line-strong: #e4e4e7;
  --accent: #ffc300;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 12px;
}

.top-brand {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0 10px;
}

.top-brand svg {
  width: min(180px, 100%);
  height: auto;
  display: block;
}

.status {
  margin: 12px 0;
}

.inline-message {
  position: relative;
  width: 100%;
  padding: 12px 16px;
  background: #e8f6fe;
  border-bottom: 2px solid #1aa9f5;
  overflow: hidden;
}

.inline-message.info {
  background: #e8f6fe;
  border-bottom-color: #1aa9f5;
}

.inline-message.loading {
  background: #e8f6fe;
  border-bottom-color: #1aa9f5;
}

.inline-message.error {
  background: #ffe6e6;
  border-bottom-color: #fb0a0a;
}

.inline-message-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 21px;
}

.inline-message-headline {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF UI Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  color: #000000;
}

.inline-message-subheadline {
  margin: 6px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF UI Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: #000000;
}

.inline-message-bg-icon {
  position: absolute;
  right: -15px;
  bottom: -15px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #1aa9f5;
  opacity: 0.2;
  pointer-events: none;
}

.inline-message.error .inline-message-bg-icon {
  background: rgba(251, 10, 10, 0.2);
  width: 57px;
  height: 57px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inline-message-bg-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.logo-spinner {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  animation: spin 1.1s linear infinite;
  background: transparent;
}

.logo-spinner img {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  object-fit: contain;
}

.logo-spinner.photo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  width: min(100%, 320px);
}

.gallery.size-320 .card {
  width: min(100%, 320px);
}

.gallery.size-640 .card {
  width: min(100%, 640px);
}

.photo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  background: #d1d5db;
  margin: 0 auto;
}

.photo-shell {
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.photo-spinner {
  position: absolute;
  z-index: 1;
  background: transparent;
}

.photo.is-hidden {
  visibility: hidden;
}

.photo-missing {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 10px;
  text-align: center;
  color: #7e7e7e;
}

.photo-missing svg {
  width: 121px;
  height: 121px;
  display: block;
}

.photo-missing-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #7e7e7e;
}

.meta {
  padding: 10px;
  border-top: 1px solid var(--line);
}

.row {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
}

.row + .row {
  margin-top: 4px;
}

.label {
  color: var(--muted);
}

@media (min-width: 700px) {
  .app {
    padding: 16px;
  }

  h1 {
    font-size: 1.4rem;
  }
}
