:root {
  color-scheme: light;
  --bg: #edf1f5;
  --panel: #ffffff;
  --text: #19212a;
  --muted: #66717f;
  --line: #d8e0e8;
  --focus: #1d7afc;
  --accent: #0f7b6c;
  --accent-dark: #075e52;
  --warn: #c25a34;
  --soft: #f5f8fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(237, 241, 245, 0.92), rgba(237, 241, 245, 1)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-attachment: fixed;
  color: var(--text);
}

.survey-shell {
  width: 100%;
  min-height: 100vh;
  padding: 32px 16px;
}

.survey-panel {
  width: min(860px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid rgba(20, 31, 43, 0.08);
  box-shadow: 0 18px 48px rgba(25, 33, 42, 0.12);
}

.survey-header {
  padding: 40px 44px 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: 0;
}

.intro {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.survey-form {
  padding: 30px 44px 44px;
}

.field-grid {
  display: grid;
  gap: 18px;
}

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

.field,
.choice-group {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.field span,
.choice-group legend {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

b {
  color: var(--warn);
  margin-left: 4px;
}

input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(29, 122, 252, 0.12);
}

.choice-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--soft);
}

.choice-group legend {
  padding: 0 6px;
}

.choice-group label,
.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #26313d;
  line-height: 1.5;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.with-input {
  align-items: center;
  flex-wrap: wrap;
}

.with-input input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 9px 12px;
}

.upload-field {
  padding: 18px;
  border: 1px dashed #b8c5d1;
  border-radius: 8px;
  background: #fbfcfd;
}

input[type="file"] {
  font: inherit;
}

small {
  color: var(--muted);
  line-height: 1.5;
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: -8px 0 22px;
}

.preview-list figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.preview-list img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.preview-list figcaption {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agreement {
  margin: 10px 0 24px;
  color: var(--muted);
}

.form-actions {
  display: flex;
  justify-content: center;
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 46px;
  padding: 0 28px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.form-message {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--warn);
  text-align: center;
  line-height: 1.5;
}

.success-view {
  padding: 54px 44px 64px;
  text-align: center;
}

.success-view h2 {
  margin: 0 0 12px;
  font-size: 32px;
}

.success-view p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 720px) {
  .survey-shell {
    padding: 0;
  }

  .survey-panel {
    border: 0;
    box-shadow: none;
  }

  .survey-header,
  .survey-form,
  .success-view {
    padding-left: 20px;
    padding-right: 20px;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }
}
