:root {
  --bg-top: #efe4cf;
  --bg-bottom: #c9dceb;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(18, 54, 78, 0.12);
  --text: #17324d;
  --muted: #4f6678;
  --accent: #1f6e71;
  --accent-strong: #0f4f58;
  --shadow: 0 24px 60px rgba(23, 50, 77, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  padding: 24px 0 32px;
}

.upload-panel {
  display: grid;
  gap: 18px;
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.upload-kicker {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.upload-title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.upload-form {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.file-picker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px dashed rgba(23, 50, 77, 0.25);
  border-radius: 16px;
  background: rgba(239, 245, 248, 0.9);
  color: var(--text);
  font-weight: 700;
}

.file-picker input {
  max-width: 280px;
}

.password-field {
  display: grid;
  gap: 8px;
  min-width: min(260px, 100%);
  color: var(--text);
  font-weight: 700;
}

.password-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(23, 50, 77, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
}

.upload-button {
  border: 0;
  padding: 13px 18px;
  border-radius: 999px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #8f3d18, #c16b2f);
}

.replace-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(23, 50, 77, 0.08);
  color: var(--text);
  font-weight: 700;
}

.replace-toggle input {
  width: 16px;
  height: 16px;
}

.upload-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1 {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
}

.lede {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.status {
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform: translateY(12px);
  opacity: 0;
  animation: rise 480ms ease forwards;
}

.preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: linear-gradient(135deg, #eaf2f5, #d7e4ea);
}

.card-body {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 18px 18px 22px;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
}

.card-file {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 79, 88, 0.26);
}

.download-button-disabled {
  cursor: not-allowed;
  background: linear-gradient(135deg, #7f8d96, #a5b0b7);
  box-shadow: none;
  pointer-events: none;
}

.empty {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--panel-border);
  color: var(--muted);
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 28px;
  }

  .upload-form {
    align-items: stretch;
  }

  .file-picker {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-button {
    width: 100%;
  }

  .card-body {
    flex-direction: column;
    align-items: stretch;
  }

  .download-button {
    width: 100%;
  }
}