:root {
  --action-bar-height: 120px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242424;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 20px; scroll-padding-bottom: calc(var(--action-bar-height) + 20px); }
body { max-width: 720px; margin: 0 auto; padding: 0 28px calc(var(--action-bar-height) + 16px); }
.site-header { padding: 20px 0 14px; border-bottom: 1px solid #e6e6e6; }
.site-header img { display: block; width: 220px; max-width: 100%; height: auto; }
main { padding-top: 28px; }
h1 { font-size: 24px; line-height: 1.3; font-weight: 600; margin: 0 0 12px; }
h2, legend { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.intro { color: #555; margin-bottom: 28px; }
section { margin-bottom: 28px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible, #upload-status:focus-visible {
  outline: 2px solid #555;
  outline-offset: 4px;
}
.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 16px;
  border: 1px dashed #b8b8b8;
  border-radius: 4px;
  background: #fafafa;
}
.drop-zone > span { color: #666; font-size: 13px; }
.drop-zone.drag-over { background: #efefef; border-color: #333; }
#browse-button {
  padding: 8px 14px;
  background: #fff;
  color: #242424;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-weight: 500;
}
#browse-button:hover:not(:disabled) { background: #f0f0f0; }
.help { font-size: 12px; color: #626262; }
#file-help { margin: 10px 0 0; }
.file-tutorial { margin-top: 18px; border: 1px solid #e6e6e6; border-radius: 4px; }
.file-tutorial summary { padding: 12px 14px; cursor: pointer; font-size: 13px; font-weight: 500; }
.file-tutorial summary:hover { background: #fafafa; }
.file-tutorial[open] summary { border-bottom: 1px solid #e6e6e6; }
.tutorial-content { padding: 14px; }
.tutorial-content ol { margin: 0 0 16px; padding-left: 20px; font-size: 13px; }
.tutorial-content li + li { margin-top: 6px; }
.tutorial-content figure { margin: 0; }
.tutorial-content figure a { display: block; border: 1px solid #e6e6e6; border-radius: 3px; overflow: hidden; cursor: zoom-in; }
.tutorial-content img { display: block; width: 100%; height: auto; }
.tutorial-content figcaption { margin-top: 8px; color: #626262; font-size: 12px; }
.data-info { padding: 22px 0; border-top: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6; }
.data-info ul { padding-left: 19px; margin: 0 0 14px; }
.data-info li { margin-bottom: 7px; }
.data-info p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; }
.consent-help { margin-bottom: 16px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.checkbox-row:last-child { margin-bottom: 0; }
.checkbox-row input { flex: 0 0 16px; width: 16px; height: 16px; margin: 4px 0 0; accent-color: #333; cursor: pointer; }
.submit-button { padding: 10px 18px; background: #292929; border: 1px solid #292929; border-radius: 4px; color: #fff; font-weight: 500; }
.submit-button:hover:not(:disabled) { background: #444; }
.submit-button:disabled { background: #ededed; color: #717171; border-color: #dedede; }
.action-bar { position: fixed; z-index: 10; inset: auto 0 0; background: #fff; border-top: 1px solid #dedede; padding-bottom: env(safe-area-inset-bottom, 0px); }
.action-bar-inner { max-width: 720px; margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; gap: 24px; }
.action-summary { flex: 1; min-width: 0; font-size: 13px; }
.action-summary p { margin: 0; }
.action-summary a { display: inline-block; margin-top: 5px; font-size: 12px; }
.action-summary a[hidden] { display: none; }
.action-bar .submit-button { flex-shrink: 0; }
#consents, #upload-status { scroll-margin-top: 20px; }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; }
.file-list:empty { display: none; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eee; font-size: 13px; }
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: #666; white-space: nowrap; }
.file-list button { border: 0; background: transparent; color: #555; font-size: 20px; min-width: 32px; min-height: 32px; padding: 0; }
.file-list .done { color: #276647; white-space: nowrap; }
.file-error { color: #a12626; font-size: 13px; margin-top: 10px; overflow-wrap: anywhere; }
.file-error:empty { display: none; }
#upload-status:not(:empty) { padding: 12px 14px; margin-top: 18px; border: 1px solid #c5dbcf; border-radius: 4px; background: #f5faf7; color: #235e3c; font-size: 13px; overflow-wrap: anywhere; }
#upload-status.error { background: #fff8f8; border-color: #e8caca; color: #942323; }
footer { margin-top: 30px; padding: 20px 0 32px; border-top: 1px solid #e6e6e6; color: #626262; font-size: 12px; }
footer p { margin: 0; }
a { color: #333; text-underline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.busy .drop-zone { opacity: .6; pointer-events: none; }
@media (max-width: 480px) {
  :root { --action-bar-height: 180px; }
  body { padding: 0 20px calc(var(--action-bar-height) + 16px); }
  .action-bar-inner { padding: 12px 20px; flex-direction: column; align-items: stretch; gap: 10px; }
  .site-header { padding-top: 12px; }
  .site-header img { width: 190px; }
  main { padding-top: 24px; }
  h1 { font-size: 22px; }
  .drop-zone { flex-direction: column; gap: 8px; }
  .submit-button { width: 100%; }
}
