:root {
  --bg: #f7f1e8;
  --text: #0b1530;
  --muted: #5b6478;
  --line: #e6dccb;
  --primary: #d10f2c;
  --primary-strong: #a80a23;
  --navy: #0b1530;
  --navy-strong: #060c1f;
  --accent: #ffe066;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(11, 21, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 18% 18%, rgba(209, 15, 44, 0.10), transparent 70%),
    radial-gradient(900px 600px at 82% 0%, rgba(11, 21, 48, 0.10), transparent 70%),
    var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
}

.site-title {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-title-name {
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.site-title-sep {
  color: var(--primary);
  font-weight: 700;
}

.site-title-tag {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 720px) {
  .site-title {
    display: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 3rem;
  line-height: 1;
  text-decoration: none;
  filter: drop-shadow(0 10px 22px rgba(209, 15, 44, 0.4));
  transition: transform 200ms ease;
}

.brand:hover {
  transform: scale(1.08) rotate(-6deg);
}

.brand-mark {
  display: inline-block;
  transform-origin: 50% 85%;
  animation: cherrySway 2.6s ease-in-out infinite;
}

.brand:hover .brand-mark {
  animation-duration: 0.9s;
}

@keyframes cherrySway {
  0%, 100% {
    transform: rotate(-8deg) translateY(0);
  }
  25% {
    transform: rotate(6deg) translateY(-1px);
  }
  50% {
    transform: rotate(-4deg) translateY(-3px);
  }
  75% {
    transform: rotate(8deg) translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark {
    animation: none;
  }
}

.site-nav {
  display: flex;
  gap: 36px;
  color: #1f2937;
  font-weight: 500;
  font-size: 0.98rem;
}

.site-nav a:hover {
  color: var(--primary);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  min-height: 70vh;
  padding-top: 40px;
  text-align: center;
}

.hero-copy {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.hero-accent {
  background: linear-gradient(90deg, var(--primary), #ff5470);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 560px;
}

.hero-highlight {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(209, 15, 44, 0.28);
}

.hero-action {
  width: 100%;
  max-width: 520px;
}

.upload-card {
  width: 100%;
  background: var(--card);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.upload-empty {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 18px 0;
  text-align: center;
}

.upload-button,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(209, 15, 44, 0.28);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.upload-button:hover,
.primary-action:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.primary-action:disabled {
  background: #e9a8b1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.upload-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-progress {
  display: grid;
  gap: 12px;
}

.upload-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--text);
}

.upload-filename {
  font-weight: 600;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 10px;
  background: #f1e6d3;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff5470);
  border-radius: inherit;
  transition: width 160ms linear;
}

.upload-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-done {
  display: grid;
  gap: 14px;
}

.upload-done-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 700;
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
}

.upload-done-text {
  margin: 0;
  color: var(--muted);
}

.download-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.upload-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.upload-footnote {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10;
}

.captcha-modal,
.error-modal {
  width: min(560px, 100%);
  position: relative;
  background: #ffffff;
  color: #1f2937;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(8, 17, 31, 0.35);
  padding: 22px 22px 18px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.32);
}

.modal-close.error-close {
  background: rgba(15, 23, 42, 0.06);
  color: #1f2937;
}

.modal-close.error-close:hover {
  background: rgba(15, 23, 42, 0.12);
}

.captcha-headline {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-strong) 100%);
  border-radius: 16px;
  padding: 18px 22px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(11, 21, 48, 0.32);
}

.captcha-headline h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.captcha-body {
  padding: 18px 6px 4px;
}

.captcha-lead {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.5;
}

.captcha-steps {
  margin: 4px 0 18px;
  padding: 0 0 0 26px;
  list-style: decimal;
  display: grid;
  gap: 10px;
  color: #1f2937;
}

.captcha-steps li::marker {
  font-weight: 700;
  color: #1f2937;
}

.captcha-steps li {
  padding-left: 6px;
  line-height: 1.55;
}

.captcha-steps kbd {
  display: inline-block;
  font-family: inherit;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 6px;
  background: #f1f4fb;
  border: 1px solid #d8deeb;
  box-shadow: 0 1px 0 #c8cee0;
  color: #1f2937;
  margin: 0 2px;
}

.completion-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px;
  color: #1f2937;
  font-size: 0.95rem;
  cursor: pointer;
}

.completion-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin: 0;
}

.captcha-message {
  margin: 4px 0 14px;
  color: #6b7280;
  font-size: 0.92rem;
}

.captcha-actions {
  display: flex;
  justify-content: flex-end;
}

.captcha-actions .primary-action {
  border-radius: 12px;
  min-height: 44px;
  font-size: 0.95rem;
}

.captcha-footer-id {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.captcha-footer-id strong {
  color: #1f2937;
  font-weight: 700;
}

.error-modal {
  text-align: center;
  padding: 28px 24px 24px;
}

.error-modal h2 {
  margin: 12px 0 6px;
  font-size: 1.4rem;
}

.error-modal p {
  margin: 0;
  color: var(--muted);
}

.error-modal .error-sub {
  margin-top: 8px;
  font-size: 0.95rem;
}

.error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: #fdecef;
  color: #d92d4f;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.error-actions {
  margin-top: 18px;
}

.error-actions .primary-action {
  background: var(--navy);
  box-shadow: 0 12px 26px rgba(11, 21, 48, 0.28);
}

.error-actions .primary-action:hover {
  background: var(--navy-strong);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
  }

  .hero-side {
    justify-items: stretch;
  }

  .hero-title,
  .hero-subtitle {
    text-align: left;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header,
  .page-shell {
    width: calc(100% - 24px);
  }

  .hero-copy h1 {
    font-size: 2.2rem;
  }
}
