.upload-shell {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  overflow-x: clip;
  box-sizing: border-box;
}

.upload-panel,
.upload-form {
  max-width: 100%;
  box-sizing: border-box;
}

.upload-panel {
  background: var(--panel, #fff);
  border: 1px solid var(--line, #ddd8c9);
  border-radius: var(--radius-lg, 16px);
  padding: 28px;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(30, 33, 27, 0.06));
}

.upload-panel h1 {
  margin: 0 0 8px;
  max-width: none;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.upload-panel h2 {
  max-width: none;
}

.upload-panel .lede,
.upload-panel .privacy-note,
.upload-panel .form-footnote {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.upload-panel .lede {
  color: var(--muted, #687061);
  margin: 0 0 20px;
}

.upload-form label:not(.checkbox) {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.upload-form input[type="file"],
.upload-form input[type="text"],
.upload-form input[type="password"],
.upload-form select {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line, #ddd8c9);
  border-radius: var(--radius-sm, 8px);
  font: inherit;
}

/* Consent row — override global landing `input { width:100%; min-height:50px }` on styles.css */
.upload-form label.checkbox {
  display: grid;
  grid-template-columns: 1.125rem minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 16px 0 20px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted, #687061);
  max-width: 100%;
  box-sizing: border-box;
}

.upload-form label.checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  max-width: 1.125rem;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  accent-color: var(--accent, #2d6a4f);
}

.upload-form label.checkbox span {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 640px) {
  .upload-panel {
    padding: 20px 16px;
  }

  .upload-shell {
    width: min(720px, calc(100% - 24px));
  }

  .upload-form label.checkbox {
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: 8px;
    font-size: 0.8125rem;
  }

  .upload-form label.checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    max-width: 1rem;
  }
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.notice-banner {
  padding: 12px 14px;
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  line-height: 1.45;
}

.notice-banner.error {
  background: #fde7e2;
  color: #8a1f1f;
}

.notice-banner.info {
  background: #e8f4ea;
  color: #1e4d2b;
}

.upload-processing {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid #c8dccf;
  background: #eef7f0;
}

.upload-processing-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.upload-processing-body {
  margin: 0;
  color: var(--muted, #687061);
}

.scan-summary {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.scan-summary div {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 8px 16px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line, #ddd8c9);
}

.scan-summary dt {
  color: var(--muted, #687061);
  min-width: 0;
}

.scan-summary dd {
  margin: 0;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  text-align: right;
}

.scan-summary dd.scan-summary-id {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .scan-summary div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .scan-summary dd {
    text-align: left;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line, #ddd8c9);
  vertical-align: top;
}

.admin-review-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 24px;
  margin-top: 20px;
}

.admin-receipt-image {
  width: 100%;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--line, #ddd8c9);
}

@media (max-width: 820px) {
  .admin-review-grid {
    grid-template-columns: 1fr;
  }
}
