:root {
  color-scheme: light;
  --bg: #fff8f8;
  --card: #ffffff;
  --text: #2e2430;
  --muted: #6f6270;
  --accent: #b85c7a;
  --accent-dark: #96455f;
  --border: #f0dce3;
  --success-bg: #ecfff3;
  --success-text: #226b3f;
  --error-bg: #fff1f1;
  --error-text: #9c2f2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fff7fb 0%, #fffdfa 100%);
  color: var(--text);
}

.container {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(184, 92, 122, 0.08);
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.subtext,
p {
  color: var(--muted);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

input[type="password"],
input[type="file"] {
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  background: #fff;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: #f4e8ed;
  color: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.upload-progress {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffafb;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4e8ed;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #df8aa5);
  transition: width 0.2s ease;
}

.progress-detail {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.gallery-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.gallery-heading h2 {
  margin-bottom: 0.25rem;
}

.gallery-heading p {
  margin-top: 0;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(184, 92, 122, 0.08);
}

.photo-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f4e8ed;
}

.photo-meta {
  padding: 0.7rem;
}

.photo-name {
  overflow: hidden;
  margin: 0 0 0.25rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-size {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-gallery {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.space-between {
  justify-content: space-between;
}

.message.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #c8efd5;
}

.message.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #ffd4d4;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .row.space-between {
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    width: min(100% - 1rem, 720px);
    padding-top: 1rem;
  }
}
