* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f3ece3;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: rgba(255, 255, 255, 0.92);
}

button,
input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(100%, 540px);
  min-height: 100vh;
  margin: 0 auto;
  background: #a90017;
  overflow: hidden;
  position: relative;
}

.marquee {
  height: 32px;
  overflow: hidden;
  background: #992f47;
  color: #ffd9e2;
  font-size: 13px;
  line-height: 32px;
  white-space: nowrap;
}

.marquee p {
  display: inline-block;
  margin: 0;
  padding-left: 100%;
  animation: marquee 30s linear infinite;
}

.page-content {
  min-height: 100vh;
  padding-bottom: 34px;
}

.hero {
  display: block;
  width: 100%;
  height: auto;
}

.calc-form {
  width: 92%;
  margin: 0 auto;
  padding-top: 8px;
}

.field-list {
  border: 2px solid #b39569;
  border-radius: 10px;
  background: #f9f5ef;
  overflow: hidden;
}

.field-row {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 14px;
  border-bottom: 1px solid #e5e0d9;
  color: #333;
  cursor: pointer;
}

.field-row.no-border {
  position: relative;
  border-bottom: 0;
}

.field-label {
  flex: 0 0 auto;
  margin-right: 10px;
  color: #a90017;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.text-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #333;
  font-size: 17px;
}

.text-input::placeholder {
  color: #888;
}

.gender-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gender-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #999;
  font-size: 19px;
  cursor: pointer;
}

.gender-btn i {
  width: 16px;
  height: 16px;
  border: 2px solid #333;
  border-radius: 50%;
  background: #fff;
}

.gender-btn.active {
  color: #333;
}

.gender-btn.active i {
  background: radial-gradient(circle at center, #333 0 42%, #fff 47% 100%);
}

.date-input {
  position: absolute;
  right: 14px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.date-row {
  min-height: 72px;
  height: auto;
  padding-top: 9px;
  padding-bottom: 9px;
}

.date-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
  color: #8b6a45;
}

.date-part {
  min-width: 0;
  flex: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: 5px 6px;
  border: 1px solid #dbc09b;
  border-radius: 6px;
  background: #fff8ed;
  text-align: center;
}

.year-part {
  flex: 1.2;
  border-color: #c33a2a;
  background: #fff0d9;
  box-shadow: 0 0 0 1px rgba(195, 58, 42, 0.08);
}

.date-hint {
  margin-bottom: 3px;
  color: #a90017;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.date-part strong {
  color: #8a6c49;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}

.year-part strong {
  color: #a90017;
  font-size: 17px;
}

.date-select.filled .date-part strong {
  color: #333;
}

.date-select.filled .year-part strong {
  color: #a90017;
}

.date-arrow {
  align-self: center;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #a90017;
}

.submit-btn {
  display: block;
  width: 90%;
  margin: 16px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  animation: pulse 2s linear infinite;
  cursor: pointer;
}

.submit-btn img {
  display: block;
  width: 100%;
}

.agreement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 12px;
  color: #fff0d3;
  font-size: 14px;
}

.agreement input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.agreement a {
  color: #fff0d3;
}

.check-box {
  width: 20px;
  height: 20px;
  border: 1px solid #ffd0bd;
  border-radius: 50%;
  background: #fff;
}

.check-box.checked {
  border-color: #ff6c8c;
  background: #ff6c8c;
  position: relative;
}

.check-box.checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.order-link {
  display: block;
  width: fit-content;
  margin: 0 auto 14px;
  color: #fff0d3;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
}

.tested {
  margin: 16px 0 0;
  text-align: center;
  color: #fff0d3;
  font-size: 16px;
}

.message-box {
  width: 87%;
  max-height: 154px;
  margin: 18px auto 0;
  padding: 12px;
  border: 1px solid #fcaf93;
  overflow: hidden;
}

.message-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
  animation: ticker 12s linear infinite;
}

.message-box li {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1.4fr 1.9fr;
  gap: 6px;
  margin-bottom: 13px;
  color: #fff7ea;
  font-size: 13px;
  text-align: left;
}

.footer-title {
  margin: 22px 0 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.footer-text {
  margin: 7px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
}

.float-submit {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 5;
  display: none;
  width: min(90%, 486px);
  padding: 10px 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
}

.float-submit.show {
  display: block;
}

.float-submit img {
  display: block;
  width: 100%;
  animation: pulse 2s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  top: 44%;
  z-index: 30;
  max-width: min(80%, 420px);
  padding: 11px 16px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 15px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s ease;
}

.toast.show {
  opacity: 1;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.36);
}

.loading.show {
  display: flex;
}

.loading div {
  padding: 13px 20px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  font-size: 15px;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes ticker {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1.04);
  }
  50% {
    transform: scale(0.98);
  }
}

@media (max-width: 360px) {
  .field-label,
  .text-input,
  .date-select {
    font-size: 15px;
  }

  .date-row {
    padding-left: 10px;
    padding-right: 10px;
  }

  .date-part {
    padding-left: 4px;
    padding-right: 4px;
  }

  .date-hint {
    font-size: 10px;
  }

  .date-part strong {
    font-size: 13px;
  }

  .year-part strong {
    font-size: 15px;
  }

  .gender-btn {
    font-size: 17px;
  }

  .message-box li {
    font-size: 12px;
  }
}
