:root {
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --card: #ffffff;
  --bg-top: #f8fafc;
  --bg-mid: #eef2f7;
  --primary: #1e4a7c;
  --primary-bright: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --shadow-card: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 20px 50px -12px rgba(15, 23, 42, 0.12);
  --radius-lg: 18px;
  --radius-md: 11px;
  --warn: #d97706;
  --ok: #059669;
}

* {
  box-sizing: border-box;
}

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

body.fw-page {
  margin: 0;
  font-family: ui-sans-serif, "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(100% 60% at 50% 0%, #dce7f4 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 50%, #e4e9f0 100%);
  -webkit-font-smoothing: antialiased;
}

.fw-header {
  padding: 1.1rem 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.32);
}

.fw-header-inner {
  max-width: 560px;
  margin: 0 auto;
}

.fw-brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.fw-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(150deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.28);
}

.fw-logo__mark {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.fw-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.fw-brand-en {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.fw-brand-cn {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.08em;
}

.fw-main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.25rem 2.75rem;
  width: 100%;
}

.fw-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.85rem 1.85rem;
  box-shadow: var(--shadow-card);
}

@media (max-width: 480px) {
  .fw-card {
    padding: 1.5rem 1.2rem 1.4rem;
  }
}

.fw-card__intro {
  margin-bottom: 1.7rem;
}

.fw-title {
  font-size: clamp(1.28rem, 4.2vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.55rem;
  letter-spacing: 0.06em;
}

.fw-sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.fw-form .fw-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.45rem;
  letter-spacing: 0.03em;
}

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

.fw-input,
.fw-form input[type="text"] {
  width: 100%;
  padding: 0.88rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  background: #f8fafc;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.fw-input::placeholder,
.fw-form input[type="text"]::placeholder {
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.fw-input:hover,
.fw-form input[type="text"]:hover {
  border-color: #94a3b8;
  background: #fff;
}

.fw-input:focus,
.fw-form input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-bright);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.fw-split {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.fw-split summary {
  cursor: pointer;
  user-select: none;
}

.fw-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.fw-split-row label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.fw-btn {
  margin-top: 1.1rem;
  width: 100%;
  padding: 0.82rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.fw-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.4);
}

.fw-btn:active {
  transform: translateY(1px);
}

.fw-btn:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 3px;
}

.fw-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.fw-result {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.fw-query-panel[hidden] + .fw-result {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.fw-again-wrap {
  margin: 1.75rem 0 0;
  text-align: center;
}

.fw-again-btn {
  display: inline-block;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid #94a3b8;
  background: #fff;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fw-again-btn:hover {
  background: #f8fafc;
  border-color: #64748b;
  color: #1e293b;
}

.fw-again-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.fw-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.55rem;
}

/* 主区块小标题（与「验证结果」同款：字号、蓝色 #415480） */
.fw-section-title--result {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #415480;
  text-align: left;
  margin: 0 0 1rem;
  padding: 0.15rem 0 0;
  line-height: 1.35;
}

/* 防伪码四格展示：浅灰底 + 45° 细纹 + 圆角描边（与印刷稿风格一致） */
.fw-code-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 1rem;
  width: 100%;
}

.fw-code-box {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0.82rem 0.38rem;
  border-radius: 6px;
  border: 1px solid #c4c9d1;
  font-weight: 700;
  font-size: clamp(0.95rem, 3.2vw, 1.22rem);
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: #1c1f24;
  font-family: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: #e8eaed;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(150, 162, 180, 0.28) 3px,
    rgba(150, 162, 180, 0.28) 4px
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@media (max-width: 340px) {
  .fw-code-row {
    flex-wrap: wrap;
  }

  .fw-code-box {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: calc(50% - 0.25rem);
  }
}

.fw-ident-one {
  margin: 0.55rem 0 0;
  padding-bottom: 0.35rem;
  text-align: center;
  border-bottom: 1px dashed var(--line-strong);
}

.fw-ident-one .fw-ident-num {
  letter-spacing: 0.1em;
  font-size: 1.05rem;
}

.fw-ident-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin: 0.65rem 0 0;
  padding-bottom: 0.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px dashed var(--line-strong);
}

.fw-ident-left,
.fw-ident-right {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
  flex: 0 0 auto;
}

.fw-ident-labgap {
  display: inline-block;
  width: 0.55rem;
}

.fw-ident-numgap {
  display: inline-block;
  width: 0.5rem;
}

.fw-ident-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.fw-ident-num {
  font-family: ui-monospace, "Cascadia Code", "Courier New", Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.98rem;
}

.fw-status {
  text-align: center;
  padding: 1.15rem 0.5rem 1.35rem;
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.fw-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
}

.fw-icon.warn {
  background: linear-gradient(180deg, #fde68a 0%, #fcd34d 100%);
  color: #78350f;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.fw-icon.ok {
  background: linear-gradient(180deg, #a7f3d0 0%, #6ee7b7 100%);
  color: #064e3b;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.fw-msg {
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.fw-detail {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

.fw-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
  margin-left: 0.55rem;
}

.fw-timeline li {
  position: relative;
  padding: 0 0 0.9rem 1.15rem;
  font-size: 0.86rem;
}

.fw-timeline li::before {
  content: "";
  position: absolute;
  left: -0.52rem;
  top: 0.18rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid var(--card);
}

.fw-timeline li.is-first::before {
  background: var(--ok);
}

.fw-tl-time {
  font-weight: 600;
  color: var(--text);
}

.fw-tl-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.fw-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.9rem;
  line-height: 1.5;
}

.fw-alert.err {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.fw-footer {
  margin-top: auto;
  text-align: center;
  padding: 1.25rem 1rem 1.75rem;
  font-size: 0.8rem;
}

.fw-footer__link,
.fw-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.fw-footer__link:hover,
.fw-footer a:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.65);
}
