:root {
  --bg: #0c1017;
  --card: #151b26;
  --border: #263246;
  --text: #e7edf5;
  --muted: #8b9bb8;
  --accent: #07c160;
  --accent-dim: #069652;
  --danger: #e55353;
  --warn: #f0b429;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, #121a28 0%, var(--bg) 45%);
  color: var(--text);
}

.screen {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: min(440px, 100%);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  margin-bottom: 1rem;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.hint {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1rem;
}

.hint.small {
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.field span {
  font-size: 0.82rem;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d121a;
  color: var(--text);
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  color: #fff;
}

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

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn.sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.msg {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--danger);
}

.msg.ok {
  color: var(--accent);
}

/* App layout */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.topbar-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
  flex: 1;
  min-width: min(100%, 280px);
}

@media (min-width: 720px) {
  .topbar {
    align-items: center;
    flex-wrap: nowrap;
  }

  .topbar-cluster {
    flex-direction: row;
    align-items: center;
    gap: 1.35rem;
  }
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.app-nav-btn {
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(13, 18, 26, 0.65);
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
}

.app-nav-btn:hover {
  color: var(--text);
  border-color: #3d4f6a;
}

.app-nav-btn.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(7, 193, 96, 0.12);
  box-shadow: 0 0 0 1px rgba(7, 193, 96, 0.2);
}

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

.app-view {
  display: block;
}

/* 第 3 步：避免全局 input{width:100%} 把复选框拉满整行 */
.field.wz-relax-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(38, 50, 70, 0.95);
  background: rgba(0, 0, 0, 0.2);
}

.field.wz-relax-field > .wz-relax-field-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.field.wz-relax-field .wz-relax-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.field.wz-relax-field input[type='checkbox'] {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  margin: 0.12rem 0 0;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.field.wz-relax-field .wz-relax-label {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text);
}

.field.wz-relax-field .wz-relax-label code {
  font-size: 0.78rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  color: var(--muted);
}

.meta-features-title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.meta-features-card .notice-fold {
  margin-bottom: 0.85rem;
}

.meta-features-card .adv-details {
  margin-bottom: 0;
}

.wizard-nav--meta {
  flex-wrap: wrap;
  gap: 0.65rem;
}

.wizard-nav--meta .btn-upload-lg {
  flex: 1 1 220px;
}

.brand strong {
  font-size: 1.1rem;
}

.brand span:not(.brand-sub) {
  margin-left: 0.5rem;
  font-size: 0.88rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  font-size: 0.92rem;
}

.tab.active {
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-color: var(--card);
  margin-bottom: -1px;
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}

.tab-panel.hidden {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.proj-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.proj-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(7, 193, 96, 0.25);
}

.proj-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.proj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.form-card {
  margin-top: 1.25rem;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 880px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.qr-wrap {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0e14;
  border-radius: 8px;
  padding: 1rem;
}

.qr-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.log-card {
  margin-top: 1rem;
}

.log {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 0.75rem;
  background: #080b10;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: #b8c9e0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

th {
  background: #111722;
  color: var(--muted);
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.tag.ok {
  background: rgba(7, 193, 96, 0.15);
  color: var(--accent);
}

.tag.fail {
  background: rgba(229, 83, 83, 0.15);
  color: var(--danger);
}

.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
}

.main-simple {
  max-width: 720px;
}

.notice-banner {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(7, 193, 96, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.btn-wide {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.btn-upload-main {
  margin-top: 0.5rem;
}

.pem-key {
  min-height: 160px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.adv-details {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.adv-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.adv-details .inner-head {
  margin-top: 1rem;
}

.foot-hint {
  margin-top: 1rem;
}

.foot-hint code {
  font-size: 0.8em;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.hero-upload h2 {
  margin-top: 0;
}

/* 源码卡片 */
.source-library-card h2 {
  margin-top: 0;
}

.source-selection-hint {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  min-height: 1.35rem;
}

.source-selection-hint strong {
  color: var(--accent);
  font-weight: 600;
}

.source-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.source-cards-grid.is-empty {
  min-height: 72px;
  align-items: center;
  justify-items: start;
}

.source-card {
  position: relative;
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #182031 0%, #121824 100%);
  cursor: pointer;
  color: var(--text);
  font: inherit;
  overflow: hidden;
  transform: translateY(0) scale(1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.35, 0.64, 1),
    border-color 0.22s ease,
    box-shadow 0.28s ease;
  animation: source-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.source-card:nth-child(1) {
  animation-delay: 0.02s;
}
.source-card:nth-child(2) {
  animation-delay: 0.06s;
}
.source-card:nth-child(3) {
  animation-delay: 0.1s;
}
.source-card:nth-child(4) {
  animation-delay: 0.14s;
}
.source-card:nth-child(5) {
  animation-delay: 0.18s;
}
.source-card:nth-child(6) {
  animation-delay: 0.22s;
}
.source-card:nth-child(n + 7) {
  animation-delay: 0.26s;
}

@keyframes source-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.source-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 120% 80% at 50% -20%,
    rgba(7, 193, 96, 0.18),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.source-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(7, 193, 96, 0.45);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(7, 193, 96, 0.12);
}

.source-card:hover::before {
  opacity: 1;
}

.source-card:active {
  transform: translateY(-1px) scale(0.99);
  transition-duration: 0.08s;
}

.source-card.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px rgba(7, 193, 96, 0.35),
    0 10px 26px rgba(7, 193, 96, 0.12);
  animation: source-card-pulse 2.4s ease-in-out infinite;
}

.source-card.selected::before {
  opacity: 1;
}

@keyframes source-card-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(7, 193, 96, 0.35),
      0 10px 26px rgba(7, 193, 96, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(7, 193, 96, 0.5),
      0 12px 32px rgba(7, 193, 96, 0.18);
  }
}

.source-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0;
}

.source-card-label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.source-card-tag {
  flex-shrink: 0;
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 6px;
  background: rgba(240, 180, 41, 0.18);
  color: var(--warn);
  border: 1px solid rgba(240, 180, 41, 0.35);
}

.source-card-tag--data {
  background: rgba(139, 155, 184, 0.12);
  color: var(--muted);
  border-color: var(--border);
}

.source-card--preset {
  background: linear-gradient(145deg, #161d2e 0%, #131a28 100%);
}

.source-placeholder {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.5rem 0;
}

.source-empty-block {
  grid-column: 1 / -1;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed rgba(139, 155, 184, 0.35);
  background: rgba(0, 0, 0, 0.2);
}

.source-empty-block .source-placeholder {
  margin-top: 0;
  color: var(--text);
}

.source-diag {
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 0.5rem 0 0;
  color: var(--text);
}

.source-diag code {
  font-size: 0.82em;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.08em 0.35em;
  border-radius: 4px;
}

.source-diag-warn {
  color: #f0c674;
}

.source-diag.muted {
  color: var(--muted);
}

.source-placeholder code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* —— 向导主流程 —— */
.main-app {
  max-width: 720px;
}

.brand-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.notice-fold {
  margin-bottom: 1.25rem;
  padding: 0.65rem 1rem;
  background: rgba(7, 193, 96, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.86rem;
}

.notice-fold summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.notice-fold .fold-body {
  margin: 0.65rem 0 0;
}

.wizard-shell {
  margin-bottom: 1.5rem;
}

.wizard-progress-host {
  margin-bottom: 1.25rem;
}

.wizard-progress-host .wizard-progress-wrap {
  margin-bottom: 0;
}

.wizard-progress-wrap {
  margin-bottom: 1.25rem;
}

.wizard-progress-track {
  height: 4px;
  border-radius: 4px;
  background: #0d121a;
  overflow: hidden;
  margin-bottom: 1rem;
}

.wizard-progress-fill {
  height: 100%;
  width: 22%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.wizard-progress-fill.is-uploading {
  width: 85% !important;
  animation: wizard-upload-pulse 1.1s ease-in-out infinite;
}

@keyframes wizard-upload-pulse {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.85;
    filter: brightness(1.15);
  }
}

.wizard-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .wizard-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
}

.wizard-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.wz-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  border: 2px solid var(--border);
  background: #0d121a;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.wz-label {
  line-height: 1.25;
  max-width: 5.5rem;
}

.wizard-steps li.done .wz-dot {
  border-color: rgba(7, 193, 96, 0.55);
  background: rgba(7, 193, 96, 0.18);
  color: var(--accent);
}

.wizard-steps li.active .wz-dot {
  border-color: var(--accent);
  background: rgba(7, 193, 96, 0.28);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}

.wizard-steps li.pending .wz-dot {
  opacity: 0.65;
}

.wizard-steps li.active .wz-label {
  color: var(--text);
  font-weight: 600;
}

.wizard-panel {
  margin-bottom: 0;
}

.wizard-panel-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.wizard-panel-head--tight h2 {
  margin-bottom: 0.2rem;
}

.wizard-panel-head--tight .meta-upload-lead {
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.wizard-panel--step2 {
  padding-top: 1.1rem;
}

.wz-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.field--compact {
  margin-bottom: 0.6rem;
}

.field--compact span {
  font-size: 0.78rem;
}

.wizard-nav--step2 {
  margin-top: 0.85rem;
}

.wizard-panel-desc {
  margin-bottom: 1rem !important;
}

.input-file {
  padding: 0.45rem !important;
  font-size: 0.88rem !important;
  cursor: pointer;
}

.wz-appid-detected {
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 0.85rem;
}

.wz-appid-detected--ok {
  color: var(--accent);
}

.wz-appid-detected code {
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.08em 0.35em;
  border-radius: 4px;
}

.input-file::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #151d2b;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.wz-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0 1rem;
}

.wz-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.25rem;
}

.wizard-nav .btn-upload-lg {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

/* 上传步骤 · 实时日志 */
.wizard-live-log-block {
  margin-top: 0.35rem;
  margin-bottom: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.wizard-live-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #111722;
}

.wizard-live-log-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.wizard-upload-progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: min(52vw, 260px);
}

.meta-upload-progress-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.65rem;
  margin: 0.35rem 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.meta-upload-progress-label {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
}

.wizard-upload-progress--meta {
  flex: 1;
  min-width: 140px;
  max-width: none;
}

.meta-upload-progress-row .wizard-log-status {
  flex-basis: 100%;
  margin-left: 0;
  padding-left: 0;
}

@media (min-width: 520px) {
  .meta-upload-progress-row .wizard-log-status {
    flex-basis: auto;
    margin-left: auto;
    padding-left: 0.5rem;
  }
}

.wizard-upload-progress-track {
  flex: 1;
  min-width: 72px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.wizard-upload-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.35s ease-out, background 0.25s ease;
}

.wizard-upload-progress--failed .wizard-upload-progress-fill {
  background: linear-gradient(90deg, #9f2727, var(--danger));
}

.wizard-upload-progress--failed .wizard-upload-progress-pct {
  color: var(--danger);
}

.wizard-upload-progress-pct {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.35rem;
  text-align: right;
}

.wizard-log-status {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.result-log-section {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.result-log-head {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #111722;
}

.result-log-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.log-scroll-box {
  display: block;
  margin: 0;
  /* 固定高度：仅用 max-height 时框会先随内容长高到上限；指定 height 后区域大小不变，仅靠内部滚动 */
  height: min(38vh, 300px);
  max-height: min(38vh, 300px);
  min-height: min(38vh, 300px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.65rem 0.75rem;
  font-size: 0.76rem;
  line-height: 1.42;
  border: none;
  border-radius: 0;
}

.result-panel--fail .result-check--fail {
  background: rgba(229, 83, 83, 0.18);
  color: var(--danger);
}

.result-panel--fail .qr-wrap--hero {
  border-color: rgba(229, 83, 83, 0.28);
}

.result-hero {
  text-align: center;
  margin-bottom: 1rem;
}

.result-check {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.65rem;
  border-radius: 50%;
  background: rgba(7, 193, 96, 0.2);
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.result-hero h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.result-lead {
  margin: 0;
  font-size: 0.9rem;
}

.qr-wrap--hero {
  min-height: 220px;
  margin-bottom: 1rem;
  border: 1px solid rgba(7, 193, 96, 0.2);
}

.qr-wrap--hero.qr-wrap--compact {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrap--hero.qr-wrap--compact img {
  width: 50%;
  max-width: 200px;
  height: auto;
  display: block;
}

.wizard-step4-done {
  padding-top: 0.15rem;
}

.result-log-section--step3 {
  margin-bottom: 0.85rem;
}

.log-fold {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  background: #0a0e14;
}

.log-fold summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
}

.log-fold .log {
  margin-top: 0.65rem;
  max-height: 280px;
}
