:root {
  color-scheme: dark;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #171411;
  color: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #4a372d 0%, #171411 55%);
}

button,
.file-button {
  font: inherit;
}

.page {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding:
    max(2rem, env(safe-area-inset-top))
    1rem
    max(3rem, env(safe-area-inset-bottom));
}

header {
  padding: 1rem 0 1.5rem;
  text-align: center;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

h1 {
  margin: 0.35rem 0;
  font-size: clamp(2.5rem, 11vw, 4.5rem);
  line-height: 1;
}

.intro {
  margin: 1rem auto 0;
  max-width: 30rem;
  font-size: 1.1rem;
  line-height: 1.5;
  opacity: 0.9;
}

.card,
.notice {
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 1.2rem;
  background: rgb(255 255 255 / 8%);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 20%);
  backdrop-filter: blur(12px);
}

.card {
  padding: 1.25rem;
}

#photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-button,
#upload-button {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 1rem;
  border: 0;
  border-radius: 0.9rem;
  text-align: center;
  font-weight: 750;
  cursor: pointer;
}

.file-button {
  background: #fff;
  color: #171411;
}

#upload-button {
  margin-top: 1rem;
  background: #d8a86d;
  color: #171411;
}

#upload-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.selection-summary,
#progress-text {
  margin: 1rem 0;
  text-align: center;
  line-height: 1.4;
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.6rem;
  background: rgb(0 0 0 / 25%);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview span {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  background: rgb(0 0 0 / 70%);
  font-size: 0.7rem;
}

.progress-wrapper {
  margin-top: 1rem;
}

.progress-track {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 15%);
}

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

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.8rem;
  line-height: 1.45;
}

.message.success {
  background: rgb(75 175 110 / 25%);
}

.message.error {
  background: rgb(210 75 75 / 25%);
}

.notice {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

.notice h2 {
  margin-top: 0;
  font-size: 1rem;
}

footer {
  padding: 1.5rem 0;
  text-align: center;
}

footer a {
  color: #fff;
}

.hidden {
  display: none;
}
