:root {
  --page: #f1f4f7;
  --surface: #ffffff;
  --ink: #0a1424;
  --muted: #6f7c8b;
  --line: #dce3e8;
  --green: #147a47;
  --green-dark: #0d683b;
  --red: #d83b2d;
  --shadow: 0 12px 34px rgba(10, 20, 36, 0.08), 0 2px 8px rgba(10, 20, 36, 0.05);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--page);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #f7f9fb;
}

.app-header {
  height: 88px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.app-main {
  min-height: calc(100dvh - 88px);
  padding: 28px 24px 24px;
}

.content-panel {
  min-height: calc(100dvh - 140px);
  padding: 34px 30px 28px;
  background: var(--surface);
  border: 1px solid #e0e6ea;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.query-panel,
.status-panel,
.success-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.query-panel {
  text-align: center;
  padding-top: 46px;
}

.state-icon {
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.state-icon svg,
.success-heading svg,
.privacy-note svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.state-icon--query {
  width: 106px;
  height: 106px;
  color: var(--green);
}

.state-icon--query svg {
  width: 100%;
  height: 100%;
  stroke-width: 3;
}

h1 {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: clamp(27px, 8vw, 33px);
  line-height: 1.22;
  letter-spacing: 0.03em;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.query-form {
  margin-top: 40px;
  text-align: left;
}

.query-form label,
.readonly-field > span {
  display: block;
  margin: 0 0 10px 3px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.query-form input,
.readonly-field > div {
  width: 100%;
  min-height: 62px;
  padding: 0 17px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--green);
  border-radius: 11px;
  outline: 0;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.query-form input::placeholder {
  color: #929ba6;
}

.query-form input:focus-visible {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 4px rgba(20, 122, 71, 0.14);
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.primary-button {
  margin-top: 30px;
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--green-dark);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(20, 122, 71, 0.25);
  outline-offset: 3px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: auto 0 0;
  padding-top: 28px;
  color: #7b8794;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.privacy-note svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.status-panel {
  padding-top: 58px;
  text-align: center;
}

.state-icon--error {
  width: 86px;
  height: 86px;
  color: var(--red);
}

.state-icon--error svg {
  width: 100%;
  height: 100%;
  stroke-width: 3;
}

.error-title {
  margin-top: 18px;
  color: var(--red);
}

.readonly-field {
  margin-top: 34px;
  text-align: left;
}

.readonly-field > div {
  display: flex;
  align-items: center;
  color: #8c97a3;
  border-color: var(--red);
  letter-spacing: 0.06em;
}

.primary-button--danger {
  margin-top: 28px;
  background: var(--red);
  border-color: var(--red);
}

.primary-button--danger:hover,
.primary-button--danger:focus-visible {
  background: #b92e24;
}

.success-panel {
  padding-top: 30px;
  text-align: center;
}

.success-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--green);
}

.success-heading svg {
  width: 55px;
  height: 55px;
  stroke-width: 3;
}

.success-heading h1 {
  margin: 0;
  color: var(--green);
  font-size: 30px;
}

.result-list {
  margin: 20px 0 0;
  text-align: left;
}

.result-list > div {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) 1.2fr;
  gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}

.result-list dt,
.result-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
}

.result-list dt {
  font-weight: 700;
}

.result-list dd {
  overflow-wrap: anywhere;
}

.secondary-button {
  margin-top: 22px;
  color: var(--green);
  background: #fff;
  border: 2px solid var(--green);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #f1faf5;
}

@media (min-width: 560px) {
  body {
    padding: 22px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 44px);
    border-radius: 26px;
    box-shadow: 0 18px 46px rgba(10, 20, 36, 0.14);
  }

  .app-main {
    min-height: calc(100dvh - 132px);
  }

  .content-panel {
    min-height: calc(100dvh - 184px);
  }
}

@media (max-width: 380px) {
  .app-header {
    height: 80px;
    padding: 0 20px;
  }

  .brand {
    font-size: 19px;
  }

  .app-main {
    min-height: calc(100dvh - 80px);
    padding: 18px 16px;
  }

  .content-panel {
    min-height: calc(100dvh - 116px);
    padding-right: 22px;
    padding-left: 22px;
    border-radius: 21px;
  }

  .query-panel {
    padding-top: 38px;
  }

  .query-form {
    margin-top: 34px;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .primary-button,
  .secondary-button {
    transition: background-color 150ms ease, box-shadow 150ms ease;
  }
}
