:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --card: #fff;
  --text: #16181d;
  --muted: #68707d;
  --line: #e8e9ed;
  --coral: #f15d51;
  --orange: #f27a24;
  --blue: #3b82f6;
  --green: #10b981;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: calc(36px + env(safe-area-inset-top)) 12px 20px;
  background:
    radial-gradient(circle at 10% 4%, rgba(255,255,255,.95), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.countdown {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: calc(36px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  box-shadow: 0 2px 8px rgba(99, 32, 14, .25);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.countdown.expired { background: linear-gradient(90deg, #9ca3af, #6b7280); }
.countdown svg { width: 17px; fill: currentColor; animation: pulse 1s ease-in-out infinite; }
.countdown strong {
  min-width: 50px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,.22);
  text-align: center;
  font: 700 14px/20px ui-monospace, SFMono-Regular, Menlo, monospace;
}

main { width: min(100%, 1000px); margin: 16px auto 0; }

.card {
  margin: 0 0 16px;
  padding: 13px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 5px solid #999;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(16, 24, 40, .035);
}

.hero-card { text-align: center; }
.hero-card p {
  margin: 0;
  color: #ffd600;
  font-size: clamp(25px, 4vw, 29px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.35;
  -webkit-text-stroke: 1.5px #111;
  paint-order: stroke fill;
  text-shadow: 1px 1px 0 #111;
}
.hero-card p + p { margin-top: 2px; }
.hero-card small { display: block; margin-top: 7px; color: #e54d42; font-size: 17px; font-weight: 800; }

.step-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.step-heading h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.step-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
}

.media-panel {
  padding: 15px 10px;
  border-radius: 12px;
  background: #fff8f0;
  text-align: center;
}
.image-panel img {
  display: block;
  width: min(100%, 260px);
  aspect-ratio: 652 / 870;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
  transition: opacity .16s ease, transform .16s ease;
}
.image-panel img.switching { opacity: .35; transform: scale(.985); }
.video-panel video {
  display: block;
  width: min(100%, 400px);
  margin: 0 auto;
  border-radius: 10px;
  background: #101114;
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
}
.video-panel p { margin: 10px 0 0; color: #e74c3c; font-size: 14px; }

.pill-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.pill-button:hover { filter: brightness(.96); }
.pill-button:active { transform: scale(.97); }
.pill-button.coral { margin-top: 12px; padding: 10px 22px; background: #ff6b6b; }
.pill-button.blue { margin-top: 16px; padding: 10px 24px; background: var(--blue); }

.step-copy { margin: 0 0 12px; font-size: 14px; }
.upload-zone {
  margin: 16px 0 12px;
  padding: 29px 20px;
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.upload-zone:hover, .upload-zone:focus-visible, .upload-zone.dragging {
  border-color: #7da5df;
  background: #f1f6fd;
}
.upload-zone.dragging { transform: scale(.995); }
.cloud svg { width: 52px; fill: #1f2a37; }
.upload-zone p { margin: 4px 0 0; color: #334155; font-size: 15px; font-weight: 600; }
.file-count { margin: 8px 0 12px; color: #475569; font-size: 14px; text-align: right; }
.file-count strong { color: #1e293b; font-size: 19px; }
.progress { height: 8px; overflow: hidden; border-radius: 99px; background: #e2e8f0; }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .3s ease; }
.submit-button {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.submit-button:active:not(:disabled) { transform: scale(.99); }
.submit-button:disabled { opacity: .55; cursor: not-allowed; }
.submission-message { min-height: 18px; margin: 9px 0 0; color: #e5484d; font-size: 12px; text-align: center; }

.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preview { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 10px; background: #e9edf2; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(16,24,40,.72);
  color: #fff;
  cursor: pointer;
}

.banner-wrap {
  overflow: hidden;
  border-radius: 16px;
  background: #111;
  box-shadow: 0 5px 16px rgba(0,0,0,.12);
}
.banner-wrap img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
footer { margin-top: 16px; padding-top: 13px; border-top: 1px solid #e6e6e6; color: #333; font-size: 12px; text-align: center; }

.activity {
  position: fixed;
  right: 16px;
  bottom: 100px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(15,17,22,.83);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 16px rgba(0,0,0,.22);
  color: #fff;
  font-size: 11px;
  transform: translateX(calc(100% + 24px));
  transition: transform .4s cubic-bezier(.22,.8,.3,1);
}
.activity.show { transform: translateX(0); }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #f5d76e, #f56f74); color: #fff; font-weight: 900; }
.activity b { color: #fbbf24; }
.activity i { opacity: .82; font-style: normal; }

@keyframes pulse { 50% { opacity: .45; transform: scale(.9); } }

@media (max-width: 640px) {
  body { padding-right: 8px; padding-left: 8px; }
  main { margin-top: 12px; }
  .card { margin-bottom: 12px; padding: 11px 14px; }
  .step-heading h2 { font-size: 16px; }
  .step-number { width: 24px; height: 24px; flex-basis: 24px; font-size: 14px; }
  .hero-card small { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
