:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f3ed;
  color: #26312f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 243, 237, 0.55)),
    url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1800&q=80") center/cover fixed;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  min-height: 42vh;
  display: flex;
  align-items: end;
  padding: 34px 0;
}

.hero-copy {
  max-width: 720px;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #886243;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  color: #182321;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.65rem;
  letter-spacing: 0;
}

.lead {
  max-width: 610px;
  margin-bottom: 0;
  color: #3e4a47;
  font-size: 1.15rem;
  line-height: 1.7;
}

.upload-band {
  border: 1px solid rgba(53, 62, 58, 0.15);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 55px rgba(31, 41, 55, 0.12);
  backdrop-filter: blur(18px);
}

.upload-band {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 26px;
  padding: 24px;
  border-radius: 8px;
}

.upload-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #394541;
  font-size: 0.92rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccd6cf;
  border-radius: 6px;
  padding: 0 13px;
  background: #fff;
  color: #1f2937;
}

.file-drop {
  grid-column: 1 / -1;
  min-height: 116px;
  align-content: center;
  justify-items: center;
  border: 1px dashed #8ea197;
  border-radius: 8px;
  padding: 22px;
  background: rgba(239, 248, 244, 0.72);
  text-align: center;
  cursor: pointer;
}

.file-drop input {
  display: none;
}

.file-drop span {
  font-size: 1rem;
}

.file-drop.has-files {
  border-color: #2f6f62;
  background: rgba(228, 246, 239, 0.92);
}

.file-drop small {
  color: #65736d;
  font-weight: 600;
}

.selected-files,
.progress-wrap {
  grid-column: 1 / -1;
}

.selected-files {
  min-height: 42px;
  border: 1px solid rgba(53, 62, 58, 0.12);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #3e4a47;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.selected-files strong {
  display: block;
  color: #213c36;
}

.selected-files span {
  display: block;
  overflow: hidden;
  color: #65736d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-wrap {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dfe8e2;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2f6f62;
  transition: width 180ms ease;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: #213c36;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  background: #2c5249;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status {
  align-self: center;
  margin: 0;
  color: #3e4a47;
  font-weight: 700;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 16px;
}

.toolbar h2 {
  margin-bottom: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  min-height: 278px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(22, 34, 30, 0.14);
}

.photo-card img {
  display: block;
  width: 100%;
  height: 232px;
  object-fit: cover;
  cursor: zoom-in;
}

.photo-meta {
  display: grid;
  gap: 2px;
  padding: 12px;
}

.photo-meta strong,
.photo-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-meta span {
  color: #5a6762;
  font-size: 0.9rem;
}

.delete-button {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: rgba(23, 31, 29, 0.82);
}

.empty {
  grid-column: 1 / -1;
  padding: 46px 24px;
  border: 1px dashed rgba(53, 62, 58, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #53625d;
  text-align: center;
  font-weight: 750;
}

dialog {
  width: min(920px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #101816;
  color: #fff;
}

dialog::backdrop {
  background: rgba(14, 19, 18, 0.72);
}

dialog img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.8rem;
}

.preview-meta {
  display: grid;
  gap: 4px;
  padding: 14px 16px 18px;
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .shell {
    width: min(100% - 18px, 1180px);
    padding-top: 12px;
  }

  .hero,
  .upload-band,
  .upload-form {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  h1 {
    font-size: 2.55rem;
    line-height: 1;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.6;
  }

  .upload-band {
    padding: 20px;
  }

  h2 {
    font-size: 1.42rem;
  }

  .toolbar {
    align-items: start;
    flex-direction: column;
  }
}
