* {
  box-sizing: border-box;
}

:root {
  --bg: #c3dbce;
  --card: rgba(255, 255, 255, 0.92);
  --text: #1f2f27;
  --muted: #52685a;
  --accent: #4f7f62;
  --accent-dark: #315840;
  --soft: #e2efe7;
  --line: rgba(49, 88, 64, 0.2);
  --shadow: 0 24px 70px rgba(31, 47, 39, 0.16);
  --success: #2f7d4f;
  --error: #b03535;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent-dark);
  font-weight: 700;
}

.page {
  min-height: 100vh;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 560px;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(14px);
}

.card.small {
  max-width: 430px;
}

.badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 36px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-dark);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.08;
}

.couple {
  margin: 10px 0 0;
  font-size: 18px;
  color: var(--muted);
}

.intro {
  margin: 18px auto 24px;
  max-width: 440px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.table-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #edf6f1;
  color: var(--muted);
}

.table-pill strong {
  color: var(--text);
  font-size: 20px;
}

.upload-form,
.login-form {
  display: grid;
  gap: 16px;
}

.dropzone {
  min-height: 180px;
  padding: 24px;
  border: 2px dashed #87ad96;
  border-radius: 26px;
  background: #f8fcfa;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  cursor: pointer;
  transition: 0.18s ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: #edf7f2;
  transform: translateY(-1px);
}

.plus {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 38px;
  line-height: 1;
}

.dropzone small {
  color: var(--muted);
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-item {
  padding: 10px 12px;
  border-radius: 16px;
  background: #f1faf5;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
}

.file-item strong {
  color: var(--text);
  word-break: break-word;
}

.text-field {
  display: grid;
  gap: 7px;
  text-align: left;
}

.text-field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 15px;
  background: #fbfffd;
  color: var(--text);
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 127, 98, 0.16);
}

.privacy {
  display: flex;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.privacy input {
  margin-top: 3px;
}

.progress-wrap {
  display: grid;
  gap: 7px;
}

.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #d4e7dc;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease;
}

#progressText {
  font-size: 13px;
  color: var(--muted);
}

button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 16px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.18s ease;
}

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

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

.status {
  min-height: 22px;
  margin: 18px 0 0;
  font-weight: 700;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

.hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.gallery-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 16px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.gallery-header h1 {
  font-size: clamp(30px, 5vw, 52px);
}

.gallery-header p {
  color: var(--muted);
  margin: 8px 0 0;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-actions a {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
}

.gallery-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px 48px;
}

.empty {
  padding: 40px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.masonry {
  columns: 4 250px;
  column-gap: 16px;
}

.media-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(31, 47, 39, 0.12);
}

.media-card img,
.media-card video {
  width: 100%;
  display: block;
  background: #000;
}

.media-meta {
  padding: 13px 14px 15px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
}

.media-meta strong {
  color: var(--text);
}

.media-meta p {
  margin: 4px 0;
}

.media-meta a {
  margin-top: 4px;
}

@media (max-width: 700px) {
  .page {
    padding: 14px;
  }

  .card {
    padding: 28px 18px;
    border-radius: 24px;
  }

  .gallery-header {
    display: grid;
  }

  .gallery-actions {
    width: 100%;
  }

  .gallery-actions a {
    flex: 1;
    text-align: center;
  }

  .file-item {
    display: grid;
  }
}
