:root {
  --page-bg: #eef3fb;
  --page-card: #ffffff;
  --hero-blue: #2e52f6;
  --hero-blue-deep: #2444db;
  --hero-text: #ffffff;
  --primary: #3155f5;
  --primary-deep: #2748d8;
  --text-main: #18253f;
  --text-sub: #64708a;
  --text-light: #98a3b8;
  --danger: #e94f4f;
  --success: #29b867;
  --border: rgba(49, 85, 245, 0.24);
  --shell-shadow: 0 32px 72px rgba(17, 35, 78, 0.12);
  --card-shadow: 0 20px 44px rgba(17, 35, 78, 0.08);
  --card-radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
}

body {
  background:
    radial-gradient(circle at top left, rgba(73, 108, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, var(--page-bg) 100%);
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page-card);
  display: flex;
  flex-direction: column;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 14px;
  background: #ffffff;
}

.page-topbar__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.page-topbar__subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

.hero-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: 24px 18px 22px;
  background:
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.14), transparent 18%),
    radial-gradient(circle at 34% 70%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(140deg, var(--hero-blue) 0%, var(--hero-blue-deep) 100%);
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 100%);
  background-size: 8px 8px;
  opacity: 0.1;
  transform: translate(18%, -8%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1), transparent 72%);
}

.hero-banner__glow {
  position: absolute;
  left: -16%;
  bottom: -8%;
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.hero-banner__copy {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 58%;
  max-width: 360px;
  color: var(--hero-text);
}

.hero-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.1;
}

.hero-banner__eyebrow-icon {
  position: relative;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-banner__eyebrow-icon::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-right: 3px solid rgba(255, 255, 255, 0.88);
  border-bottom: 3px solid rgba(255, 255, 255, 0.88);
  transform: rotate(-45deg);
}

.hero-banner h1,
.hero-banner h2 {
  margin: 0;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.hero-banner h1 {
  margin-top: 18px;
  font-size: clamp(26px, 8vw, 40px);
}

.hero-banner h2 {
  margin-top: 12px;
  font-size: clamp(24px, 7.4vw, 38px);
}

.hero-banner__illustration {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 38%;
  max-width: 200px;
  max-height: 88%;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
}

.content-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 34px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.query-card,
.result-card {
  width: 100%;
  background: var(--page-card);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.query-card {
  padding: 16px;
}

.query-form {
  display: grid;
  gap: 14px;
}

.query-input-wrap {
  position: relative;
}

.query-input-wrap input {
  width: 100%;
  padding: 0 52px 0 18px;
  height: 54px;
  border-radius: 16px;
  border: 2px solid var(--border);
  font-size: 16px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.query-input-wrap input::placeholder {
  color: #a7b2c7;
}

.query-input-wrap input:focus {
  border-color: rgba(49, 85, 245, 0.55);
  box-shadow: 0 0 0 4px rgba(49, 85, 245, 0.08);
}

.clear-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #e5e7eb;
  color: #8f97a9;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: none;
}

.clear-btn.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submit-btn {
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 16px 24px rgba(49, 85, 245, 0.22);
}

.submit-btn:hover {
  transform: translateY(-1px);
}

.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.query-hint {
  margin: 14px 2px 0;
  font-size: 14px;
  color: var(--text-sub);
}

.query-error {
  margin: 12px 2px 0;
  font-size: 14px;
  color: var(--danger);
}

.page-footer {
  width: 100%;
  margin: auto auto 0;
  padding-top: 18px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.page-footer a {
  color: var(--text-light);
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--primary);
}

.result-card {
  margin-top: 16px;
  padding: 18px 16px 8px;
}

.result-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.result-card__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.16em;
}

.result-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  word-break: break-word;
}

.status-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(64, 158, 255, 0.14);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.result-grid {
  margin: 18px 0 0;
}

.result-row {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(24, 37, 63, 0.08);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row dt {
  margin: 0;
  font-size: 15px;
  color: var(--text-main);
  letter-spacing: 0.08em;
}

.result-row dd {
  margin: 0;
  font-size: 15px;
  color: var(--primary);
  line-height: 1.6;
  text-align: left;
  word-break: break-word;
}

.result-row--reason dd,
.result-row--remark dd {
  color: var(--danger);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 大屏手机 / 小平板：在跳到桌面布局前补一档过渡 */
@media (min-width: 480px) {
  .hero-banner {
    min-height: 248px;
    padding: 28px 24px 26px;
  }

  .hero-banner__copy {
    width: 60%;
    max-width: 420px;
  }

  .hero-banner h1 {
    font-size: clamp(34px, 6.4vw, 46px);
  }

  .hero-banner h2 {
    font-size: clamp(30px, 6vw, 42px);
  }

  .hero-banner__illustration {
    width: 34%;
    max-width: 240px;
  }

  .content-wrap {
    padding: 20px 24px 38px;
  }

  .query-card {
    padding: 22px 24px;
  }

  .result-card {
    padding: 22px 24px 10px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 30px 24px 42px;
  }

  .page-shell {
    width: min(calc(100% - 32px), 1180px);
    min-height: calc(100vh - 72px);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shell-shadow);
  }

  .page-topbar {
    padding: calc(env(safe-area-inset-top, 0px) + 30px) 32px 20px;
  }

  .page-topbar__title {
    font-size: 24px;
  }

  .page-topbar__subtitle {
    font-size: 15px;
  }

  .hero-banner {
    align-items: center;
    min-height: 360px;
    padding: 40px 40px 64px;
  }

  .hero-banner__glow {
    left: -10%;
    width: 42%;
  }

  .hero-banner__copy {
    width: min(54%, 520px);
    max-width: none;
    padding-top: 8px;
  }

  .hero-banner__eyebrow {
    gap: 12px;
    font-size: clamp(20px, 2.2vw, 30px);
  }

  .hero-banner__eyebrow-icon {
    width: 38px;
    height: 38px;
    border-width: 4px;
  }

  .hero-banner__eyebrow-icon::before {
    right: 6px;
    bottom: 7px;
    width: 9px;
    height: 9px;
    border-width: 4px;
  }

  .hero-banner h1 {
    margin-top: 24px;
    font-size: clamp(48px, 5.4vw, 76px);
  }

  .hero-banner h2 {
    margin-top: 18px;
    font-size: clamp(42px, 4.8vw, 66px);
  }

  .hero-banner__illustration {
    right: 40px;
    width: min(32%, 360px);
    max-width: none;
    max-height: 100%;
  }

  .content-wrap {
    position: relative;
    z-index: 2;
    padding: 0 40px 50px;
    margin-top: -40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fbfcff 48px, #fbfcff 100%);
  }

  .query-card,
  .result-card {
    max-width: 980px;
    margin-inline: auto;
    border-radius: 26px;
  }

  .query-card {
    padding: 28px 32px 26px;
  }

  .query-form {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: center;
  }

  .query-input-wrap input {
    height: 64px;
    padding: 0 60px 0 24px;
    border-radius: 18px;
    font-size: 20px;
  }

  .clear-btn {
    right: 18px;
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

  .submit-btn {
    height: 64px;
    border-radius: 18px;
    font-size: 20px;
    letter-spacing: 0.1em;
  }

  .query-hint,
  .query-error {
    margin-left: 4px;
    font-size: 15px;
  }

  .page-footer {
    max-width: 980px;
    padding-top: 24px;
    font-size: 13px;
  }

  .result-card {
    margin-top: 22px;
    padding: 28px 32px 16px;
  }

  .result-card__header {
    align-items: center;
  }

  .result-card__title {
    font-size: 30px;
  }

  .status-pill {
    min-width: 104px;
    padding: 10px 20px;
    font-size: 15px;
  }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    margin-top: 22px;
  }

  .result-row {
    grid-template-columns: 138px 1fr;
    gap: 16px;
    padding: 16px 0;
  }

  .result-row--reason,
  .result-row--remark {
    grid-column: 1 / -1;
  }

  .result-row dt {
    font-size: 17px;
    letter-spacing: 0.1em;
  }

  .result-row dd {
    font-size: 18px;
  }
}

@media (min-width: 1080px) {
  .hero-banner {
    min-height: 400px;
    padding-left: 56px;
    padding-right: 56px;
  }

  .hero-banner__copy {
    width: min(52%, 560px);
  }

  .hero-banner h1 {
    font-size: clamp(64px, 6vw, 88px);
  }

  .hero-banner h2 {
    font-size: clamp(56px, 5vw, 78px);
  }

  .hero-banner__illustration {
    right: 56px;
    width: min(30%, 390px);
  }

  .content-wrap {
    padding-left: 56px;
    padding-right: 56px;
  }
}

/* 超窄屏（小屏手机）兜底：进一步收紧，确保文字与插画不重叠 */
@media (max-width: 360px) {
  .hero-banner {
    min-height: 200px;
    padding: 20px 14px 18px;
  }

  .hero-banner__copy {
    width: 60%;
  }

  .hero-banner h1 {
    font-size: clamp(24px, 8.4vw, 34px);
  }

  .hero-banner h2 {
    font-size: clamp(22px, 7.8vw, 32px);
  }

  .hero-banner__illustration {
    width: 36%;
    max-width: 150px;
  }

  .result-row {
    grid-template-columns: 116px 1fr;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .query-input-wrap input,
  .submit-btn {
    transition: none;
  }
}
