:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --soft-orange: #fff7ed;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.1), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.3;
}

h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-description {
  margin-bottom: 0;
  color: var(--muted);
}

.counter-card {
  display: flex;
  min-width: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
}

.counter-card strong {
  color: var(--primary-dark);
  font-size: 30px;
  line-height: 1;
}

.counter-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.top-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: start;
}

.panel {
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.step-badge {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--soft-orange);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.step-badge-danger {
  background: #fef2f2;
  color: var(--danger);
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  overflow: hidden;
  border: 1.5px dashed #fdba74;
  border-radius: 18px;
  background: #fffaf5;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--primary);
  background: #fff7ed;
  transform: translateY(-1px);
}

.dropzone input,
.proof-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.upload-placeholder strong {
  color: var(--text);
  font-size: 16px;
}

.upload-placeholder span:last-child {
  font-size: 13px;
}

.upload-plus {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  place-items: center;
  border-radius: 50%;
  background: #ffedd5;
  color: var(--primary-dark);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

#uploadPreview {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
}

#uploadPreview[hidden] {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.button-primary,
.button-danger {
  width: 100%;
  margin-top: 16px;
  color: #fff;
}

.button-primary {
  background: var(--primary);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button-danger {
  background: var(--danger);
}

.button-danger:hover:not(:disabled) {
  background: var(--danger-dark);
}

.button-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background: #f9fafb;
}

.privacy-note,
.delete-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.field-label,
.proof-field span {
  display: block;
  margin-bottom: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.text-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.08em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.proof-field {
  display: grid;
  min-height: 92px;
  align-content: center;
  padding: 14px;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  background: #f9fafb;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.proof-field:hover,
.proof-field:focus-within {
  border-color: var(--danger);
  background: #fff7f7;
}

.proof-field span {
  color: var(--danger);
}

.gallery-section {
  margin-top: 42px;
}

.gallery-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.image-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.image-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef0f4;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.image-card:hover .image-wrap img {
  transform: scale(1.025);
}

.image-info {
  padding: 16px;
}

.id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.id-label {
  color: var(--muted);
  font-size: 12px;
}

.id-value {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.copy-button {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.copy-button:hover {
  border-color: #fdba74;
  color: var(--primary-dark);
}

.meta-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

.meta-row dt {
  flex: 0 0 auto;
  color: var(--muted);
}

.meta-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #374151;
  text-align: right;
}

.empty-state {
  padding: 64px 24px;
  border: 1px dashed #d1d5db;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.empty-icon {
  margin-bottom: 10px;
  color: #fb923c;
  font-size: 38px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 48px));
  padding: 13px 18px;
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast[hidden] {
  display: block;
  visibility: hidden;
}

@media (max-width: 900px) {
  .top-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 28px;
  }

  .hero {
    align-items: flex-start;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    font-size: 22px;
  }

  .hero-description {
    font-size: 13px;
  }

  .counter-card {
    min-width: 86px;
    padding: 12px;
  }

  .counter-card strong {
    font-size: 24px;
  }

  .panel {
    padding: 20px;
    border-radius: 18px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .proof-grid {
    grid-template-columns: 1fr;
  }

  .gallery-header {
    align-items: center;
  }

  .footer {
    flex-direction: column;
    gap: 4px;
  }
}
