:root {
  --contact-bg: #eef2f5;
  --contact-surface: #ffffff;
  --contact-ink: #111827;
  --contact-muted: #5f6b7a;
  --contact-line: #d8dee6;
  --contact-soft: #f7f9fb;
  --contact-accent: #0f172a;
  --contact-focus: #0e7490;
  /* 加载/提示条默认中性灰，公开页会按 theme.colors.notice 覆盖。 */
  --contact-notice: #9ca3af;
  --contact-danger: #b42318;
  --contact-success: #0f8a5f;
  /* 选中态必须自成一个色相：品牌主色是近黑色，只换边框和未选中几乎一样，
     客户在手机上看不出自己选没选。 */
  --contact-selected-border: #0e7490;
  --contact-selected-bg: #d3eaf1;
  --contact-selected-ink: #0b4d5c;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  background:
    linear-gradient(180deg, #fbfcfd 0, #eef2f5 360px, #e9eef3 100%),
    var(--contact-bg);
  color: var(--contact-ink);
  font-family: "Segoe UI", "Noto Sans JP", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

.contact-public-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px max(22px, calc((100% - min(100%, 1120px)) / 2));
  border-bottom: 1px solid rgba(216, 222, 230, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.contact-public-brand {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--contact-ink);
  text-decoration: none;
}

.contact-public-brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--contact-accent);
  color: #fff;
  font-weight: 860;
}

.contact-public-brand strong {
  font-size: 0.95rem;
  letter-spacing: 0;
}

.contact-public-brand img {
  display: block;
  max-height: 34px;
  max-width: min(240px, 42vw);
  width: auto;
  object-fit: contain;
}

.contact-public-badges {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.contact-public-badges span,
.contact-hero-actions span,
.contact-form-status span,
.contact-form-status button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(216, 222, 230, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #3f4a5a;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 760;
}

.contact-page-shell {
  width: min(100%, 1120px);
  max-width: 100%;
  margin: 0 auto;
  padding: 26px 22px 64px;
}

.contact-page-render-root {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.contact-hero {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 8px;
  /* 中文注释：背景铺满整宽卡片，避免仅 copy 区域 700px 留白造成右侧断层。 */
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.contact-hero-media {
  position: relative;
}

.contact-hero-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.contact-hero-copy {
  width: 100%;
  padding: 24px 28px;
  color: var(--contact-ink);
  background: transparent;
}

.contact-kicker,
.contact-section-label {
  margin: 0 0 8px;
  color: #0e7490;
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-hero-copy .contact-kicker {
  color: var(--contact-focus);
}

/* 标题/标语：日文断行，避免末字孤行 */
.contact-hero h1,
.contact-intro-band h2,
.contact-public-badges span {
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
  text-wrap: balance;
}

.contact-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.3rem, 6vw, 4.3rem);
  font-weight: 850;
  letter-spacing: 0;
}

.contact-hero p {
  margin: 0;
  max-width: 610px;
  color: var(--contact-muted);
  line-height: 1.8;
}

.contact-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.contact-hero-actions span {
  border-color: var(--contact-line);
  background: var(--contact-soft);
  color: var(--contact-ink);
}

.contact-intro-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: stretch;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 28px 30px;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.contact-intro-band > div {
  width: 100%;
}

.contact-intro-band h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 850;
}

.contact-intro-band p:last-child {
  margin: 0;
  width: 100%;
  color: var(--contact-muted);
  line-height: 1.8;
  text-align: left;
}

.contact-notice,
.contact-faq,
.contact-rich-text {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.contact-notice {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  /* 提示条与加载条默认中性灰，可按发布页配置 theme.colors.notice 覆盖。 */
  border-left: 4px solid var(--contact-notice, #9ca3af);
}

.contact-notice-warning {
  border-left-color: #b75f00;
}

.contact-notice-success {
  border-left-color: var(--contact-success);
}

.contact-notice-danger {
  border-left-color: var(--contact-danger);
}

.contact-notice strong {
  font-weight: 840;
}

.contact-notice p,
.contact-rich-text p {
  margin: 0;
  color: var(--contact-muted);
  line-height: 1.8;
}

.contact-faq,
.contact-rich-text {
  padding: 24px;
}

.contact-rich-text h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 830;
}

.contact-faq .contact-section-head {
  margin-bottom: 14px;
}

.contact-faq-list {
  display: grid;
  gap: 10px;
}

.contact-faq-item {
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: var(--contact-soft);
}

.contact-faq-item summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 780;
}

.contact-faq-item p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--contact-muted);
  line-height: 1.75;
}

.contact-form {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 18px;
}

.contact-form-render-root {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 18px;
}

.contact-form-status {
  position: sticky;
  top: 74px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.contact-form-status span.is-active,
.contact-form-status button.is-active {
  border-color: var(--contact-accent);
  background: var(--contact-accent);
  color: #fff;
}

.contact-section {
  min-width: 0;
  max-width: 100%;
  padding: 30px;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055);
}

.contact-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--contact-line);
}

.contact-section h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 830;
}

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

.contact-stack {
  display: grid;
  gap: 18px;
}

/* 用 flex 纵向排列而不是 grid：grid 的行会被拉伸，同一行里只要有一个字段带说明文字，
   相邻字段的输入框就会跟着变高。flex 下多余高度留在底部，输入框尺寸和顶边始终一致。 */
.contact-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

.contact-field > * {
  flex: 0 0 auto;
}

.contact-field-wide {
  grid-column: 1 / -1;
}

.contact-field span,
.contact-check span,
.contact-upload span {
  color: var(--contact-ink);
  font-size: 0.94rem;
  font-weight: 760;
}

.contact-field strong {
  color: var(--contact-danger);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--contact-line);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--contact-ink);
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* 原生下拉的三角形贴着右边框，和输入框 15px 的内边距对不齐；改成自绘 chevron 才能控制右侧间距。 */
.contact-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 13px 9px;
}

.contact-field input[type="radio"],
.contact-field input[type="checkbox"] {
  width: auto;
  min-height: auto;
  padding: 0;
}

.contact-field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--contact-focus);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.14);
}

.contact-field small,
.contact-policy-section small {
  min-height: 18px;
  color: var(--contact-danger);
  font-size: 0.82rem;
}

.contact-field-hint {
  color: var(--contact-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.contact-field.is-invalid input,
.contact-field.is-invalid select,
.contact-field.is-invalid textarea {
  border-color: var(--contact-danger);
}

.contact-upload {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #b9c4d0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, var(--contact-soft));
}

.contact-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.contact-upload strong {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--contact-line);
  border-radius: 6px;
  background: #fff;
  padding: 0 14px;
  font-size: 0.9rem;
}

.contact-file-upload {
  display: grid;
  gap: 10px;
}

.contact-file-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  cursor: pointer;
}

.contact-file-trigger input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.contact-file-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--contact-line);
  border-radius: 6px;
  background: #fff;
  color: var(--contact-ink);
  font-size: 0.9rem;
  font-weight: 700;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.contact-file-trigger:hover .contact-file-button,
.contact-file-trigger:focus-within .contact-file-button {
  border-color: var(--contact-focus);
  background: var(--contact-soft);
}

.contact-file-label,
.contact-file-hint {
  color: var(--contact-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  word-break: break-word;
}

.contact-file-hint {
  margin: 0;
}

.contact-file-list {
  display: grid;
  gap: 8px;
}

.contact-file-list:empty {
  display: none;
}

.contact-file-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--contact-line);
  border-radius: 6px;
  background: #fff;
}

.contact-file-card.is-error {
  border-color: var(--contact-danger);
}

.contact-file-card-head,
.contact-file-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-file-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-file-card-size,
.contact-file-card-status {
  color: var(--contact-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.contact-file-card.is-error .contact-file-card-status {
  color: var(--contact-danger);
  white-space: normal;
}

.contact-file-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--contact-soft);
  overflow: hidden;
}

.contact-file-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--contact-accent);
  transition: width 0.2s ease;
}

.contact-file-card-actions {
  display: inline-flex;
  gap: 8px;
}

.contact-file-card-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--contact-line);
  border-radius: 6px;
  background: #fff;
  color: var(--contact-ink);
  font-size: 0.8rem;
  cursor: pointer;
}

.contact-file-card-actions button:hover {
  border-color: var(--contact-focus);
  background: var(--contact-soft);
}

.contact-field.is-invalid .contact-file-button {
  border-color: var(--contact-danger);
}

.contact-policy-section {
  padding: 20px 26px;
}

.contact-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.contact-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--contact-accent);
}

.contact-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-choice-group:not(.is-inline) {
  flex-direction: column;
  align-items: stretch;
}

.contact-choice {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0 12px;
  color: var(--contact-ink);
  font-weight: 720;
}

.contact-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--contact-selected-border);
}

.contact-choice:has(input:checked) {
  border-color: var(--contact-selected-border);
  background: var(--contact-selected-bg);
  color: var(--contact-selected-ink);
  /* 用内阴影加粗边框，避免改 border-width 让选项在选中瞬间跳动。 */
  box-shadow: inset 0 0 0 1px var(--contact-selected-border);
}

/* :has() 回退：不支持的浏览器里至少让选中项文案变色。 */
.contact-choice input:checked + span {
  color: var(--contact-selected-ink);
}

.contact-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-rating label {
  display: grid;
}

.contact-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.contact-rating span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--contact-ink);
  font-weight: 820;
}

.contact-rating input:checked + span {
  border-color: var(--contact-accent);
  background: var(--contact-accent);
  color: #fff;
}

.contact-matrix {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.contact-matrix-summary {
  margin: 12px;
  padding: 10px 12px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #fff5f5;
  color: #c81e1e;
  font-size: 0.88rem;
  font-weight: 700;
}

.contact-matrix-row {
  scroll-margin-block: 120px;
}

.contact-matrix-row.is-invalid th,
.contact-matrix-row.is-invalid td {
  background: #fff5f5;
}

.contact-matrix-row-error {
  display: block;
  margin-top: 5px;
  color: #c81e1e;
  font-size: 0.76rem;
  font-weight: 700;
}

.contact-matrix table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.contact-matrix th,
.contact-matrix td {
  border-bottom: 1px solid var(--contact-line);
  padding: 12px;
  text-align: center;
}

.contact-matrix tbody tr:last-child th,
.contact-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.contact-matrix th:first-child {
  text-align: left;
  color: var(--contact-ink);
  font-weight: 780;
}

.contact-matrix thead th {
  background: var(--contact-soft);
  color: var(--contact-muted);
  font-size: 0.84rem;
}

.contact-matrix input {
  width: 18px;
  height: 18px;
  accent-color: var(--contact-selected-border);
}

/* 桌面端矩阵只有一个原生小圆点，整格染色才能一眼看出这一行选到哪一列。 */
.contact-matrix td:has(input:checked) {
  background: var(--contact-selected-bg);
}

.contact-matrix-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 桌面端视觉上隐藏列文案，但保留在无障碍树中，使每个选项 label 对读屏有可读名称。 */
.contact-matrix-option-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-slider {
  display: grid;
  gap: 8px;
}

.contact-slider input[type="range"] {
  padding: 0;
  accent-color: var(--contact-accent);
}

.contact-slider-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--contact-muted);
  font-size: 0.84rem;
}

.contact-slider-meta output {
  min-width: 44px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--contact-soft);
  color: var(--contact-ink);
  font-weight: 820;
  text-align: center;
}

.contact-slider-meta span:last-child {
  text-align: right;
}

.contact-ranking {
  display: grid;
  gap: 10px;
}

.contact-ranking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: #fbfcfd;
}

.contact-ranking-row span {
  min-width: 0;
}

.contact-ranking-row select {
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  background-position: right 10px center;
}

.contact-submit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 10px 0 0;
}

.contact-page-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.contact-secondary-button {
  min-height: 44px;
  border: 1px solid var(--contact-line);
  border-radius: 8px;
  background: #fff;
  color: var(--contact-ink);
  padding: 0 18px;
  font-weight: 820;
}

.contact-secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.contact-submit-button {
  min-height: 48px;
  border: 1px solid var(--contact-accent);
  border-radius: 8px;
  background: var(--contact-accent);
  color: #fff;
  padding: 0 24px;
  font-weight: 820;
  transition: transform 0.18s ease, background 0.18s ease;
}

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

.contact-submit-button:hover {
  background: #020617;
  transform: translateY(-1px);
}

.contact-submit-row p {
  margin: 0;
  color: var(--contact-muted);
  font-size: 0.9rem;
}

.contact-submit-error {
  border: 1px solid #f0b4ae;
  border-radius: 8px;
  background: #fff4f2;
  color: var(--contact-danger);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 720;
}

.contact-success {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.44);
  z-index: 20;
}

.contact-success.is-open {
  display: grid;
}

.contact-success-panel {
  width: min(100%, 460px);
  padding: 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.22);
}

.contact-success-panel h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 840;
}

.contact-success-panel p {
  margin: 0 0 22px;
  color: var(--contact-muted);
  line-height: 1.8;
}

@media (min-width: 761px) {
  .contact-public-badges span {
    white-space: nowrap;
  }
}

@media (max-width: 960px) {
  .contact-intro-band {
    padding: 22px 18px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: clip;
  }

  body {
    /* 固定顶栏占位，避免内容被遮挡 */
    padding-top: calc(66px + env(safe-area-inset-top, 0px));
  }

  .contact-public-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: calc(54px + env(safe-area-inset-top, 0px));
    margin: 0;
    padding:
      calc(12px + env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      12px
      max(12px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid rgba(216, 222, 230, 0.82);
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 rgba(216, 222, 230, 0.82);
  }

  .contact-public-brand {
    grid-column: auto;
    justify-self: auto;
  }

  .contact-public-badges {
    display: none;
  }

  .contact-page-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow-x: clip;
    padding:
      14px 12px
      calc(90px + env(safe-area-inset-bottom, 0px));
  }

  .contact-page-render-root {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .contact-page-render-root > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    justify-self: stretch;
  }

  .contact-form-status {
    position: static;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contact-hero h1,
  .contact-intro-band h2,
  .contact-section h2,
  .contact-rich-text h3,
  .contact-notice strong {
    max-width: 100%;
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: auto;
    text-wrap: wrap;
  }

  .contact-intro-band {
    overflow: hidden;
    padding: 18px 14px;
  }

  .contact-intro-band h2 {
    font-size: clamp(1.05rem, 4.8vw, 1.3rem);
    line-height: 1.55;
  }

  .contact-rich-text p {
    overflow-wrap: anywhere;
  }

  .contact-hero-copy {
    padding: 20px 16px;
  }

  .contact-section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .contact-section {
    padding: 20px 16px;
  }

  .contact-matrix {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .contact-matrix-summary {
    margin: 0 0 12px;
  }

  .contact-matrix table,
  .contact-matrix tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .contact-matrix thead {
    display: none;
  }

  .contact-matrix tbody {
    display: grid;
    gap: 14px;
  }

  .contact-matrix tbody tr {
    display: grid;
    /* 自适应列数，任意评分档数（偶/奇）都均匀铺满，不会出现末项被强制拉宽。 */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--contact-line);
    border-radius: 10px;
    background: #fff;
  }

  .contact-matrix tbody tr.is-invalid {
    border-color: #ef4444;
    background: #fff5f5;
    box-shadow: 0 0 0 2px rgb(239 68 68 / 10%);
  }

  .contact-matrix-row.is-invalid th,
  .contact-matrix-row.is-invalid td {
    background: transparent;
  }

  .contact-matrix tbody th,
  .contact-matrix tbody td {
    display: block;
    padding: 0;
    border: 0;
  }

  /* 卡片布局下选中色由 label 自己画；单元格再染一层会从圆角处透出来。 */
  .contact-matrix tbody td:has(input:checked) {
    background: transparent;
  }

  .contact-matrix tbody th:first-child {
    grid-column: 1 / -1;
    padding-bottom: 4px;
    font-size: 0.96rem;
  }

  .contact-matrix-option {
    width: 100%;
    min-height: 48px;
    gap: 8px;
    box-sizing: border-box;
    padding: 10px 8px;
    border: 1px solid var(--contact-line);
    border-radius: 8px;
    background: var(--contact-soft);
    color: var(--contact-ink);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
  }

  .contact-matrix-option:has(input:checked) {
    border-color: var(--contact-selected-border);
    background: var(--contact-selected-bg);
    color: var(--contact-selected-ink);
    box-shadow: inset 0 0 0 1px var(--contact-selected-border);
  }

  /* :has() 回退：不支持 :has() 的浏览器里，靠选中项文案高亮提示状态，避免只能依赖原生小控件判断。 */
  .contact-matrix-option input:checked + .contact-matrix-option-text {
    color: var(--contact-selected-ink);
    text-decoration: underline;
  }

  .contact-matrix-option-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    display: inline;
    overflow-wrap: anywhere;
  }

  .contact-form,
  .contact-form-render-root {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .contact-form:has(.contact-submit-row) {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .contact-grid,
  .contact-submit-row {
    grid-template-columns: 1fr;
  }

  .contact-submit-row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    margin: 0;
    padding:
      12px max(12px, env(safe-area-inset-right, 0px))
      calc(12px + env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
    border-top: 1px solid rgba(216, 222, 230, 0.92);
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
  }

  .contact-submit-button {
    width: 100%;
  }

  .contact-submit-row p {
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
  }

  .contact-upload {
    grid-template-columns: 1fr;
  }
}
