html {
  scrollbar-gutter: stable;
}

.md-copyright {
  text-align: center;
}

.md-copyright__highlight {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.md-copyright a {
  white-space: nowrap;
}

.md-copyright a[href*="beian.mps.gov.cn"] {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.beian-link__icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.contact-page {
  margin: 0.35rem 0 1.1rem;
}

.contact-grid {
  width: 100%;
  max-width: none;
  margin: 0;
}

.contact-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 0.95rem 0.95rem 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

[data-md-color-scheme="slate"] .contact-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.78));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: none;
}

.contact-card-desc {
  margin: 0;
  max-width: 34rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
}

.contact-form {
  margin-top: 0.8rem;
}

.contact-status {
  margin: 0.8rem 0 0;
  padding: 0.72rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.contact-status.is-loading::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: contact-status-spin 0.75s linear infinite;
}

.contact-status.is-loading {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}

.contact-status.is-success {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.18);
  color: #15803d;
}

.contact-status.is-error {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

[data-md-color-scheme="slate"] .contact-status.is-loading {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.24);
  color: #bfdbfe;
}

[data-md-color-scheme="slate"] .contact-status.is-success {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(74, 222, 128, 0.22);
  color: #bbf7d0;
}

[data-md-color-scheme="slate"] .contact-status.is-error {
  background: rgba(220, 38, 38, 0.14);
  border-color: rgba(248, 113, 113, 0.22);
  color: #fecaca;
}

@keyframes contact-status-spin {
  to {
    transform: rotate(360deg);
  }
}

.contact-field {
  margin-bottom: 0.7rem;
}

.contact-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--md-default-fg-color);
  font: inherit;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-field textarea {
  resize: vertical;
  min-height: 8.5rem;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: rgba(100, 116, 139, 0.9);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--md-primary-fg-color);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

[data-md-color-scheme="slate"] .contact-field input,
[data-md-color-scheme="slate"] .contact-field textarea {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.22);
}

[data-md-color-scheme="slate"] .contact-field input::placeholder,
[data-md-color-scheme="slate"] .contact-field textarea::placeholder {
  color: rgba(203, 213, 225, 0.68);
}

.contact-field--hidden {
  display: none;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.contact-submit {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.74rem 1.15rem;
  background: linear-gradient(135deg, var(--md-primary-fg-color), #3b82f6);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.18);
}

.contact-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(59, 130, 246, 0.22);
}

.contact-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

@media screen and (max-width: 900px) {
  .contact-grid {
    max-width: none;
  }

  .contact-card {
    padding: 0.9rem;
  }
}
