/* ============================================================
   联系我们 / 体验登记（V1.7 双页版）
   ============================================================ */

:root {
  --brand: #0e8fa8;
  --brand-dark: #0a7287;
  --brand-soft: #e4f4f8;
  --ink: #1e3b46;
  --ink-title: #192b49;
  --ink-soft: #455d67;
  --muted: #687f88;
  --line: #d7e7eb;
  --line-strong: #cedfe5;
  --field-bg: #f6fafb;
  --danger: #dc5764;
  --radius-card: 18px;
  --radius-field: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #fff;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ── 顶栏 ───────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1184px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink-title);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.logo em { font-style: normal; color: var(--brand); }
.back { color: var(--brand); text-decoration: none; font-size: 14px; }
.back:hover { text-decoration: underline; }

/* ── 双栏骨架 ───────────────────────────────────── */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 840px) 320px;
  align-items: start;
  gap: 20px;
  width: calc(100% - 96px);
  max-width: 1184px;
  margin: 0 auto;
  padding: 24px 0 56px;
}

.form-page { min-width: 0; }

.page-title {
  /* 原 DTV·AI 体验登记（.kicker）已移除，保留其 38px 顶部留白 */
  margin: 38px 0 0;
  color: var(--ink-title);
  font-size: 44px;
  font-weight: 700;
  line-height: 60px;
  letter-spacing: -1.5px;
}
.page-title span { color: var(--ink-title); }
.page-title span:last-child { color: var(--brand); }

/* ── 表单 ───────────────────────────────────────── */
.form-stack {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.card {
  width: 100%;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 4px 9px rgba(29, 100, 117, 0.04);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.card-num {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}
.card-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  line-height: 28px;
}

/* 输入网格 */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.field { min-width: 0; }
.field--wide { grid-column: 1 / -1; }

.field label,
.group legend {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}
.req { margin-right: 2px; color: var(--danger); }
.opt { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }

.input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
  outline: none;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 18px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { border-color: #b9d3db; }
.input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea.input {
  height: 98px;
  padding: 14px 16px;
  line-height: 24px;
  resize: vertical;
}

/* 单选 / 多选 */
.group { min-width: 0; margin: 0; padding: 0; border: 0; }
.group + .group { margin-top: 30px; }
.group legend { margin-bottom: 14px; }

.choices { display: grid; gap: 10px; }
.choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
  background: #fff;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.choice:hover { border-color: var(--brand); }
.choice:has(input:checked) {
  border-color: var(--brand);
  background: #edf8fa;
}
.choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
  accent-color: var(--brand);
}

.other-input { margin-top: 12px; }

/* 错误提示 */
.error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

/* 底部协议 + 提交 */
.card-actions {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 32px;
  box-shadow: none;
}
.agreements { display: grid; gap: 6px; }
.agreement {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 17px;
}
.agreement input {
  width: 16px;
  height: 16px;
  margin: 0 3px 0 0;
  accent-color: var(--brand);
}
.agreement-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  line-height: 17px;
}
.agreement-link:hover { text-decoration: underline; }

.submit {
  width: 320px;
  height: 54px;
  flex: none;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  box-shadow: 0 4px 12px rgba(14, 143, 168, 0.16);
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.submit:hover { background: var(--brand-dark); box-shadow: 0 8px 20px rgba(14, 143, 168, 0.24); }
.submit:active { transform: translateY(1px); }
.submit[disabled] { opacity: 0.65; cursor: not-allowed; box-shadow: none; }

/* ── 右侧联系卡片 ───────────────────────────────── */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 320px;
  margin-top: 130px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 4px 9px rgba(29, 100, 117, 0.04);
}
.contact-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  line-height: 28px;
}
.contact-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.qr-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field-bg);
}
.qr-card h3,
.contact-info h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}
.qr-card h3 { font-size: 14px; line-height: 22px; }
.qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
  background: #fff;
  overflow: hidden;
}
.qr-frame img {
  display: block;
  width: 174px;
  height: 174px;
  object-fit: contain;
}

.contact-info { display: flex; flex-direction: column; gap: 12px; }
.contact-info h3 { margin-bottom: 4px; font-size: 13px; line-height: 18px; }
.contact-info a,
.contact-info p {
  display: block;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 22px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-info a:hover { color: var(--brand); text-decoration: underline; }

/* ── 提交成功 ───────────────────────────────────── */
.result-page {
  padding: 40px 24px 72px;
}
.result-card {
  width: min(840px, 100%);
  margin: 0 auto;
  padding: 64px 40px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 4px 18px rgba(29, 100, 117, 0.04);
  text-align: center;
}
.result-icon { display: block; width: 88px; height: 88px; }
.result-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.result-copy h1 {
  margin: 0;
  color: #17343f;
  font-size: 36px;
  font-weight: 700;
  line-height: 50px;
}
.result-copy h2 {
  margin: 0;
  color: var(--brand);
  font-size: 24px;
  font-weight: 500;
  line-height: 36px;
}
.result-copy p {
  margin: 0;
  color: #647c85;
  font-size: 16px;
  line-height: 26px;
}
.result-actions { padding-top: 12px; }
.return-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 52px;
  border-radius: var(--radius-field);
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(14, 143, 168, 0.16);
}
.return-button:hover { background: var(--brand-dark); }

/* ── 协议弹窗 ───────────────────────────────────── */
.legal-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--ink);
  font-family: inherit;
}
.legal-dialog::backdrop { background: rgba(10, 38, 48, 0.48); }
.legal-dialog h2 { margin: 0 0 12px; font-size: 22px; color: var(--ink-title); }
.legal-dialog p { margin: 0 0 14px; color: #647c85; font-size: 14px; line-height: 1.8; }
.legal-dialog p:last-of-type { margin-bottom: 24px; }
.legal-dialog a { color: var(--brand); }
.legal-dialog button {
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
}
.legal-dialog button:hover { background: var(--brand-dark); }

:focus-visible { outline: 3px solid #7fd0e0; outline-offset: 2px; }

/* ── 响应式 ─────────────────────────────────────── */
@media (max-width: 1000px) {
  .form-layout { width: min(840px, calc(100% - 48px)); grid-template-columns: minmax(0, 1fr); }
  .contact-card { width: 100%; margin-top: 0; }
}

@media (max-width: 760px) {
  .topbar-inner { padding: 12px 16px; }
  .form-layout { width: calc(100% - 32px); padding: 20px 0 48px; }
  .page-title { font-size: 31px; line-height: 44px; letter-spacing: -0.5px; }
  .form-stack { margin-top: 26px; }
  .card { padding: 28px 20px; }
  .field-grid,
  .choices--2 { grid-template-columns: 1fr; }
  .choices--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--wide { grid-column: auto; }
  .card-actions { flex-direction: column; align-items: stretch; gap: 22px; }
  .submit { width: 100%; }
  .contact-card { padding: 24px 20px; }
  .result-page { padding: 28px 16px 48px; }
  .result-card { padding: 48px 24px; }
  .result-copy h1 { font-size: 30px; line-height: 42px; }
  .result-copy h2 { font-size: 21px; line-height: 32px; }
}
