/* 卡密兑换中心 */
:root {
  --sun-bg: #f6efe3;
  --sun-bg-soft: #efe1cf;
  --sun-card: #fff9f0;
  --sun-popover: #fffdf8;
  --sun-text: #3b2b24;
  --sun-text-muted: #756357;
  --sun-border: #dcc8af;
  --sun-primary: #d66f3c;
  --sun-primary-hover: #bd592d;
  --sun-gold: #e3a83b;
  --sun-olive: #718255;
  --sun-olive-soft: #e7ecd9;
  --sun-success: #4f7b57;
  --sun-warning: #b67a28;
  --sun-danger: #ad4e42;
  --sun-link: #975334;
  --sun-shadow: rgba(91, 61, 38, 0.12);
  --sun-footer: #ead9c3;

  --page: var(--sun-bg);
  --surface: var(--sun-card);
  --surface-hover: var(--sun-bg-soft);
  --border: var(--sun-border);
  --input-border: var(--sun-border);
  --text: var(--sun-text);
  --text-secondary: var(--sun-text-muted);
  --primary: var(--sun-primary);
  --primary-hover: var(--sun-primary-hover);
  --secondary: var(--sun-olive);
  --highlight: var(--sun-gold);
  --on-accent: #fff;
  --danger: var(--sun-danger);
  --radius-control: 12px;
  --radius-card: 18px;
  --radius-hero: 22px;
  --max-width: 680px;
  --gutter: 16px;
  --motion: 180ms ease;
  --font: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  --font-title: Georgia, "Noto Serif SC", "Songti SC", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--page);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 4%, rgba(227, 168, 59, 0.18), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(214, 111, 60, 0.1), transparent 30%),
    linear-gradient(180deg, #fff9f0 0%, #f6efe3 72%);
}

a {
  color: var(--sun-link);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.glow {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.glow-a {
  width: 360px;
  height: 360px;
  top: -100px;
  right: -60px;
  background: radial-gradient(circle, rgba(227, 168, 59, 0.35) 0%, transparent 70%);
}

.glow-b {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: -50px;
  background: radial-gradient(circle, rgba(214, 111, 60, 0.2) 0%, transparent 70%);
  opacity: 0.35;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 249, 240, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px var(--sun-shadow);
}

.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hero-with-logo {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 4px;
  display: block;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--sun-footer);
}

.site-footer-inner {
  width: min(100% - var(--gutter) * 2, 1120px);
  margin: 0 auto;
  padding: 32px 0 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 28px 24px;
}

.site-footer-inner--compact {
  grid-template-columns: 1fr;
  padding: 28px 0 16px;
}

.site-footer-inner--compact .site-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-footer-inner--compact .site-footer-logo {
  margin-left: auto;
  margin-right: auto;
}

.site-footer-brand {
  min-width: 0;
}

.site-footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}

.site-footer-tagline {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer-domain {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.site-footer-col h3 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.site-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer-col li + li {
  margin-top: 8px;
}

.site-footer-col a {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
}

.site-footer-col a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.site-footer-bottom {
  width: min(100% - var(--gutter) * 2, 1120px);
  margin: 0 auto;
  padding: 14px 0 28px;
  border-top: 1px solid rgba(59, 43, 36, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.site-footer-bottom--compact {
  justify-content: center;
  padding-bottom: 24px;
}

.site-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer-links a {
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

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

.nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.topbar-spacer {
  justify-self: end;
}

.nav button,
.nav a.btn-ghost {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--motion), color var(--motion), border-color var(--motion);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav button:hover,
.nav a.btn-ghost:hover {
  background: var(--sun-bg-soft);
  color: var(--text);
  text-decoration: none;
}

.nav button.active {
  color: var(--primary-hover);
  border-color: rgba(214, 111, 60, 0.35);
  background: rgba(214, 111, 60, 0.12);
}

.main {
  width: min(100% - var(--gutter) * 2, var(--max-width));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--highlight);
}

.hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.2;
  font-weight: 700;
}

.hero .subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 32px rgba(91, 61, 38, 0.1);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.card .hint {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.field label span {
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 6px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-row .btn {
  flex: 1;
  min-width: 140px;
}

.session-helper {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-control);
  border: 1px solid rgba(113, 130, 85, 0.35);
  background: var(--sun-olive-soft);
  font-size: 14px;
  color: var(--text-secondary);
}

.session-helper p {
  margin: 0 0 8px;
  color: var(--text);
}

.session-helper ol {
  margin: 0;
  padding-left: 20px;
}

.session-helper li {
  margin-bottom: 6px;
}

.session-helper kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-wrap {
  flex: 1;
  position: relative;
}

input[type="text"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--input-border);
  background: #fff;
  color: var(--text);
  transition: border-color var(--motion), box-shadow var(--motion);
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(214, 111, 60, 0.15);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 48px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion), transform var(--motion), opacity var(--motion), box-shadow var(--motion);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #e17c46 0%, #d66f3c 58%, #c45d31 100%);
  color: var(--on-accent);
  box-shadow: 0 8px 20px rgba(214, 111, 60, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e88955 0%, #e17c46 58%, #d66f3c 100%);
  box-shadow: 0 10px 24px rgba(214, 111, 60, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--sun-olive-soft);
}

.btn-block {
  width: 100%;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--sun-popover);
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 0;
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: var(--sun-bg-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.step b {
  display: block;
  font-weight: 650;
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  word-break: keep-all;
}

.step.active {
  border-color: rgba(214, 111, 60, 0.45);
  color: var(--text);
  background: rgba(214, 111, 60, 0.08);
}

.step.active span {
  background: var(--primary);
  color: var(--on-accent);
}

.step.done span {
  background: rgba(79, 123, 87, 0.2);
  color: var(--sun-success);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-control);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(173, 78, 66, 0.1);
  border: 1px solid rgba(173, 78, 66, 0.35);
  color: var(--danger);
}

.alert-info {
  background: var(--sun-olive-soft);
  border: 1px solid rgba(113, 130, 85, 0.35);
  color: var(--text);
}

.alert-warn {
  background: rgba(227, 168, 59, 0.15);
  border: 1px solid rgba(227, 168, 59, 0.35);
  color: #7a5a18;
}

.summary-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

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

.summary-row .k {
  color: var(--text-secondary);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(227, 168, 59, 0.2);
  color: #9a6a12;
}

.tag-purple {
  background: var(--sun-olive-soft);
  color: var(--secondary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.status-pill.processing {
  color: var(--primary-hover);
  border-color: rgba(214, 111, 60, 0.4);
  background: rgba(214, 111, 60, 0.08);
}

.status-pill.success {
  color: var(--sun-success);
  background: rgba(79, 123, 87, 0.12);
  border-color: rgba(79, 123, 87, 0.35);
}

.status-pill.fail {
  color: var(--danger);
  border-color: rgba(173, 78, 66, 0.35);
  background: rgba(173, 78, 66, 0.08);
}

.status-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.service-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 920px;
  margin: 0 auto 28px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.service-tabs button {
  min-height: 58px;
  padding: 12px 18px;
  border: 0;
  border-radius: 13px;
  color: var(--text-secondary);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.service-tabs button:hover {
  color: var(--primary);
  background: rgba(214, 111, 60, 0.08);
}

.service-tabs button.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(214, 111, 60, 0.24);
}

.query-mode {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
}

.query-mode button {
  min-width: 118px;
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.query-mode button.active { color: #fff; background: var(--primary); }

.batch-query-result {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.batch-query-head,
.batch-query-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.batch-query-head { background: rgba(214, 111, 60, 0.08); }
.batch-query-row { display: block; border-top: 1px solid var(--border); }
.query-result-body { padding: 16px; }
.query-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.query-result-heading > strong { min-width: 0; overflow-wrap: anywhere; }
.query-result-heading .status-pill { flex-shrink: 0; }
.batch-query-code { min-width: 0; font-weight: 700; word-break: break-all; }
.batch-query-message { margin-top: 4px; color: var(--text-secondary); font-size: 12px; }

.query-usage-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.query-usage-details[hidden] {
  display: none;
}

.query-usage-details > div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.query-usage-details span,
.query-usage-details strong { display: block; }
.query-usage-details span { margin-bottom: 7px; color: var(--text-secondary); font-size: 13px; }
.query-usage-details strong { color: var(--text); word-break: break-all; }

.status-guide > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.status-guide small {
  color: var(--text-secondary);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .query-usage-details { grid-template-columns: 1fr; }
  .status-guide { grid-template-columns: 1fr; }
  .service-tabs { gap: 4px; padding: 6px; }
  .service-tabs button { min-height: 48px; padding: 8px 6px; font-size: 13px; }
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.timeline li strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.redeem-progress {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.result-account-box {
  margin-top: 22px;
  padding: 18px 20px;
  text-align: center;
  border: 1px solid rgba(45, 127, 240, 0.3);
  border-radius: 16px;
  background: rgba(45, 127, 240, 0.05);
}

#result-title.is-success {
  margin: 8px 0 10px;
  text-align: center;
  color: var(--primary);
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 850;
  line-height: 1.15;
}

#result-title.is-success + .hint {
  text-align: center;
}

.result-account-box span,
.result-account-box strong {
  display: block;
}

.result-account-box span {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.result-account-box strong {
  color: var(--text);
  font-size: 20px;
  word-break: break-all;
}

.redeem-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text);
}

.redeem-progress-head span {
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

.redeem-progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf8;
}

.redeem-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d7ff0, #19b7a5);
  transition: width 0.45s ease;
}

.privacy {
  display: none;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(59, 43, 36, 0.35);
  backdrop-filter: blur(6px);
}

.modal-mask[hidden] {
  display: none !important;
}

.modal-card {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 24px 22px;
  border-radius: var(--radius-hero);
  border: 1px solid var(--border);
  background: var(--sun-popover);
  box-shadow: 0 24px 64px rgba(91, 61, 38, 0.18);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--sun-bg-soft);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.modal-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-right: 28px;
}

.modal-brand h2 {
  margin: 0 0 4px;
  font-family: var(--font-title);
  font-size: 20px;
}

.modal-sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.modal-steps li {
  margin-bottom: 10px;
}

.modal-steps code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(214, 111, 60, 0.08);
  border: 1px solid rgba(214, 111, 60, 0.18);
  color: var(--primary-hover);
  word-break: break-all;
}

.modal-steps kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-check input {
  accent-color: var(--primary);
}

.help-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.help-list li {
  margin-bottom: 10px;
}

.help-list a {
  font-weight: 600;
}

.panel-step {
  display: none;
}

.panel-step.active {
  display: block;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.check-row input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.check-progress {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(214, 111, 60, 0.3);
  background: rgba(214, 111, 60, 0.06);
}

.check-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
}

.check-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.check-progress-steps li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--motion);
}

.check-progress-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-sizing: border-box;
}

.check-progress-steps li.active {
  color: var(--text);
}

.check-progress-steps li.active::before {
  border-color: var(--primary);
  background: rgba(214, 111, 60, 0.25);
  animation: progress-pulse 1.2s ease infinite;
}

.check-progress-steps li.done {
  color: var(--sun-success);
}

.check-progress-steps li.done::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  top: 0.2em;
  left: -1px;
  border: none;
  background: rgba(79, 123, 87, 0.18);
  color: var(--sun-success);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

@keyframes progress-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(214, 111, 60, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(214, 111, 60, 0);
  }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(214, 111, 60, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 6px;
}

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

@media (max-width: 640px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter);
  }

  .topbar-spacer {
    display: none;
  }

  .brand-title {
    font-size: 15px;
  }

  .hero-with-logo {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-logo {
    width: 64px;
    height: 64px;
    margin-top: 0;
  }

  .eyebrow {
    justify-content: center;
  }

  .nav {
    justify-content: center;
  }

  .input-row {
    flex-direction: column;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .step {
    padding: 12px 10px;
    gap: 6px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .main {
    padding-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026 blue self-service redesign, inspired by modern recharge portals. */
:root {
  --page: #eef4ff;
  --surface: #ffffff;
  --surface-hover: #f5f8fd;
  --border: #d6e2f3;
  --input-border: #c6d5ea;
  --text: #10203d;
  --text-secondary: #687b99;
  --primary: #2f75e8;
  --primary-hover: #1f66d7;
  --secondary: #52698f;
  --highlight: #2f75e8;
  --danger: #cf4355;
  --on-accent: #fff;
  --radius-control: 10px;
  --radius-card: 16px;
  --radius-hero: 18px;
  --max-width: 1120px;
  --gutter: 24px;
  --font-title: "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
}

body {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 55%, #eef4ff 100%);
  color: var(--text);
}

body::before {
  background:
    radial-gradient(720px 320px at 50% -80px, rgba(47, 117, 232, 0.16), transparent 72%),
    linear-gradient(180deg, #edf4ff 0%, #f8fbff 56%, #edf4ff 100%);
}

.glow { display: none; }

.topbar {
  position: relative;
  width: min(calc(100% - 48px), 1120px);
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(198, 213, 234, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(47, 93, 160, 0.08);
}

.brand-logo { width: 36px; height: 36px; }
.brand-title { font-family: var(--font-title); color: #10203d; }
.brand small { color: #7183a1; }

.nav {
  padding: 4px;
  gap: 4px;
  border: 1px solid #d9e5f5;
  border-radius: 10px;
  background: #f3f7fc;
}

.nav button {
  border-radius: 8px;
  color: #52698f;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
}

.nav button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(47, 117, 232, 0.23);
}

.main {
  width: min(calc(100% - 48px), 1120px);
  padding: 34px 0 0;
}

.hero-with-logo {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  margin-bottom: 28px;
}

.hero-logo {
  width: 74px;
  height: 74px;
  margin: 0;
  filter: drop-shadow(0 10px 18px rgba(47, 117, 232, 0.16));
}

.hero-copy { flex: 0 1 auto; }
.hero .eyebrow { color: #2f75e8; letter-spacing: 0.12em; font-weight: 800; }
.hero h1 {
  margin: 3px 0 5px;
  color: #216bea;
  font-family: var(--font-title);
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.hero .subtitle { margin: 0; color: #52698f; font-size: 14px; }

.feature-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.feature-pills span {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid #bcd3fa;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f5fab;
  font-size: 12px;
  font-weight: 650;
}

.steps {
  position: relative;
  gap: 8px;
  margin: 0 0 0;
  padding: 10px;
  border: 1px solid #d3e0f1;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: #f5f8fd;
}

.step {
  min-height: 68px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #8191aa;
}
.step span {
  background: #e3ebf6;
  color: #7e8fa9;
  box-shadow: none;
}
.step.active,
.step.done {
  border-color: transparent;
  background: #fff;
  color: #1765d8;
  box-shadow: 0 6px 18px rgba(47, 93, 160, 0.08);
}
.step.active span,
.step.done span { background: #2f75e8; color: #fff; }

.card {
  margin: 0 0 22px;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid #d3e0f1;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(47, 93, 160, 0.12);
}

#view-query .card,
#view-help .card {
  border-radius: 16px;
}

.card h2 { color: #0b1e3c; font-size: 22px; }
.hint { color: #7183a1; }
label { color: #385276; font-weight: 750; }
label span { color: #8292aa; font-weight: 500; }

input,
textarea {
  border-color: #c7d6ea;
  border-radius: 10px;
  background: #f8faff;
  color: #10203d;
  padding: 13px 14px;
}
input:focus,
textarea:focus {
  border-color: #2f75e8;
  box-shadow: 0 0 0 3px rgba(47, 117, 232, 0.11);
}

.btn {
  border-radius: 10px;
  font-weight: 750;
}
.btn-primary {
  background: #2f75e8;
  box-shadow: 0 8px 18px rgba(47, 117, 232, 0.2);
}
.btn-primary:hover { background: #1f66d7; }
.btn-secondary { background: #fff; color: #385276; border-color: #c7d6ea; }

.alert-info { background: #f3f7ff; border-color: #b9d1ff; color: #1765d8; }
.alert-error { background: #fff1f2; border-color: #f0b8c0; color: #ba3f4f; }
.summary-grid, .session-helper { background: #f8faff; border-color: #d5e1f1; }
.status-pill.processing { background: #eaf2ff; color: #1765d8; }

.site-footer {
  margin-top: 46px;
  border-color: #d6e2f3;
  background: transparent;
}

@media (max-width: 700px) {
  .topbar, .main { width: min(calc(100% - 20px), 1120px); }
  .topbar { grid-template-columns: 1fr; gap: 10px; }
  .brand { justify-self: center; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .topbar-spacer { display: none; }
  .main { padding-top: 24px; }
  .hero-with-logo { flex-direction: column; gap: 8px; }
  .hero-logo { width: 58px; height: 58px; }
  .hero h1 { font-size: 36px; }
  .feature-pills span:nth-child(n + 4) { display: none; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 7px; }
  .step { min-height: 70px; padding: 8px 3px; font-size: 11px; }
  .step span { width: 28px; height: 28px; }
  .card { padding: 24px 18px; }
  .input-row { grid-template-columns: 1fr; }
  .input-row .btn { width: 100%; }
}


.batch-query-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}
.batch-query-summary > div { padding: 12px; border-radius: 10px; background: #f4f7fb; }
.batch-query-summary span, .batch-query-summary strong { display: block; }
.batch-query-summary span { color: var(--text-secondary); font-size: 12px; }
.batch-query-summary strong { margin-top: 4px; font-size: 22px; }
.batch-query-summary .summary-used strong { color: #1769d2; }
.batch-query-summary .summary-unused strong { color: #16834a; }
.batch-query-summary .summary-frozen strong { color: #6b7280; }
.batch-query-summary .summary-invalid strong { color: #c2414f; }
.batch-query-progress { height: 4px; overflow: hidden; background: #e7edf7; }
.batch-query-progress > div { height: 100%; width: 0; background: var(--primary); transition: width .2s ease; }
@media (max-width: 720px) {
  .batch-query-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-query-summary > div:first-child { grid-column: 1 / -1; }
}
