:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9dee8;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --warning-bg: #fff5e6;
  --warning-line: #ffb84d;
  --warning-text: #7a3f00;
  --danger: #d92d20;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  background: var(--bg);
}

button,
input,
.remove-file {
  font: inherit;
}

.upload-status {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  max-width: calc(100% - 112px);
  min-height: 34px;
  padding: 6px 10px;
  color: #fff;
  font-size: 13px;
  text-align: left;
  background: rgba(6, 118, 71, 0.86);
  border-radius: 6px;
}

.upload-status:empty {
  display: none;
}

.page {
  width: min(100%, 640px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

.hero {
  padding: 8px 2px 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.notice {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 14px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-line);
  border-radius: 8px;
}

.notice strong {
  font-size: 16px;
}

.notice p {
  font-size: 15px;
  font-weight: 700;
}

.form {
  display: grid;
  gap: 14px;
}

.section {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid #edf0f5;
  border-radius: 8px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  font-size: 18px;
}

.section-head span {
  flex: none;
  color: var(--muted);
  font-size: 13px;
}

.upload-grid {
  display: grid;
  gap: 12px;
}

.upload-card {
  position: relative;
  display: grid;
  min-height: 156px;
  place-items: center;
  gap: 4px;
  padding: 16px;
  overflow: hidden;
  text-align: center;
  background: #fafbfc;
  border: 1px dashed #aeb7c7;
  border-radius: 8px;
}

.upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--primary);
  font-size: 32px;
  line-height: 1;
  border: 1px solid #b8d7ff;
  border-radius: 50%;
}

.upload-title {
  font-weight: 700;
}

.upload-desc {
  color: var(--muted);
  font-size: 13px;
}

.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
  background: #fff;
}

.upload-card.has-file {
  border-style: solid;
}

.upload-card.has-file .preview {
  display: block;
}

.upload-card.has-file .upload-icon,
.upload-card.has-file .upload-title,
.upload-card.has-file .upload-desc {
  display: none;
}

.remove-file {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  min-height: 34px;
  padding: 6px 12px;
  color: #fff;
  font-size: 14px;
  background: rgba(23, 32, 51, 0.78);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-size: 15px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.helper {
  color: var(--muted);
  font-size: 13px;
}

.message {
  min-height: 22px;
  font-size: 14px;
  font-weight: 700;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.submit {
  width: 100%;
  min-height: 50px;
  color: #fff;
  font-weight: 700;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
}

.submit:active {
  background: var(--primary-dark);
}

.submit:disabled {
  background: #98a2b3;
}

.success-page {
  display: grid;
  place-items: center;
}

.success-panel {
  display: grid;
  width: 100%;
  gap: 14px;
  justify-items: center;
  padding: 36px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid #edf0f5;
  border-radius: 8px;
}

.success-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  background: var(--success);
  border-radius: 50%;
}

.success-panel h1 {
  font-size: 24px;
}

.success-panel p {
  color: var(--muted);
  font-size: 15px;
}

@media (min-width: 560px) {
  .upload-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .upload-card {
    min-height: 176px;
  }
}
