:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #182033;
  --muted: #667085;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #d9e0ec;
  --danger: #c2410c;
  --success: #047857;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(135deg, #eef4ff, var(--bg)); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.page { width: min(100%, 980px); margin: 0 auto; padding: 24px 16px 56px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 24px; box-shadow: 0 20px 60px rgba(15, 23, 42, .08); }
.center-card { max-width: 560px; margin: 10vh auto 0; text-align: center; }
.wide-card { max-width: 940px; margin: 0 auto; }
h1 { margin: 0 0 12px; font-size: clamp(28px, 7vw, 42px); line-height: 1.15; }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.muted, .help { color: var(--muted); }
.form-stack { display: grid; gap: 18px; }
.field, .question-card { display: grid; gap: 8px; text-align: left; }
.question-card { border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: #fbfdff; }
.question-label, .field span { font-weight: 700; }
.required, .error { color: var(--danger); }
input, textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font: inherit; background: white; }
.text-monitor { position: relative; }
.text-monitor textarea { padding-bottom: 42px; }
.text-monitor-messages { position: absolute; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 20px); pointer-events: none; }
.text-counter, .text-invalid { border-radius: 999px; padding: 3px 8px; font-size: 12px; line-height: 1.4; }
.text-counter { color: var(--muted); background: rgba(102, 112, 133, .12); }
.text-counter.over-limit, .text-invalid { color: var(--danger); background: #fee2e2; font-weight: 700; }
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: 8px; }
input[type="range"] { padding-inline: 0; }
.control.slider-with-value { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; align-items: center; gap: 12px; }
.slider-with-value input[type="range"] { min-width: 0; }
.slider-with-value .slider-value-input { width: 100%; border-radius: 999px; padding: 6px 10px; color: var(--primary); font-weight: 700; text-align: center; }
ul { padding-left: 0; list-style: none; }
li { margin: 8px 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 0; border-radius: 999px; padding: 0 22px; background: var(--primary); color: white; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary { background: #eef2ff; color: var(--primary); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.center-actions { justify-content: center; }
.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.message { padding: 12px 14px; border-radius: 12px; background: #eff6ff; border: 1px solid var(--border); }
.message.success { color: var(--success); }
.message.warning, .message.error { color: var(--danger); }
.terms-box { background: #f8fafc; border-radius: 16px; padding: 16px; line-height: 1.75; }
.terms-line.highlight a { animation: pulse 1s ease-in-out 2; }
.photo-preview { border: 1px dashed var(--border); border-radius: 14px; min-height: 96px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: #f8fafc; }
.photo-preview img { max-width: 100%; max-height: 240px; display: block; }
.dashboard-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); text-align: left; padding: 12px; white-space: nowrap; }
th { color: var(--muted); font-weight: 700; }
@keyframes pulse { 50% { background: #fef3c7; box-shadow: 0 0 0 8px #fef3c7; } }
@media (max-width: 640px) { .card { border-radius: 18px; padding: 18px; } .dashboard-head { align-items: flex-start; flex-direction: column; } }
