:root {
  --bg-body: #edf2f1;
  --bg-card: rgba(255, 255, 255, 0.72);
  --primary: #f7c045;
  --primary-hover: #d4af37;
  --primary-light: rgba(255, 235, 153, 0.34);
  --brand-shadow: #8b5a2b;
  --brand-shadow-dark: #5e3a1a;
  --text-main: #172033;
  --text-sub: #64748b;
  --text-muted: #94a3b8;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.15);
  --success: #11815e;
  --success-bg: #e8f7ef;
  --success-text: #0f6b50;
  --warning: #a15c00;
  --warning-bg: #fff7df;
  --danger: #bd302b;
  --danger-bg: #fff1f1;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-panel: 0 16px 42px -32px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color-scheme: light;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Noto Sans SC",
    "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(247, 192, 69, 0.18), transparent 35%),
    linear-gradient(215deg, rgba(56, 189, 248, 0.16), transparent 38%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg-body) 100%);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  min-width: 0;
  font: inherit;
}

button,
summary {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button,
input,
select,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(247, 192, 69, 0.38);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: var(--radius-sm);
  background: var(--text-main);
  color: #fff;
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.header {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 36px -34px rgba(15, 23, 42, 0.65);
  padding: 14px 32px;
  backdrop-filter: blur(22px);
}

.header-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.header-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 235, 153, 0.88), var(--primary));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  color: var(--brand-shadow-dark);
  fill: currentColor;
  padding: 6px;
}

.header-title-container {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.header-title {
  color: var(--text-main);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.5;
  margin-bottom: 2px;
}

.header-subtitle {
  color: var(--text-sub);
  font-size: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 13px;
  white-space: nowrap;
}

.data-chip,
.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  white-space: nowrap;
}

.container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  flex: 1;
  gap: 24px;
  margin: 0 auto;
  padding: 32px;
}

.sidebar {
  display: flex;
  width: 320px;
  flex: 0 0 320px;
  flex-direction: column;
  gap: 24px;
}

.main-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 24px;
}

.card,
.info-card {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(22px);
}

.card {
  padding: 24px;
}

.info-card {
  overflow: hidden;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.section-title::before {
  display: inline-block;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--primary);
  content: "";
}

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label,
.field > span {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
}

textarea,
input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-main);
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.65;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

textarea[aria-invalid="true"],
input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: rgba(189, 48, 43, 0.46);
  box-shadow: 0 0 0 3px rgba(189, 48, 43, 0.1);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-sub);
  font-size: 12px;
}

.field-error {
  border-left: 3px solid rgba(189, 48, 43, 0.72);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  padding-left: 9px;
}

.field-error[hidden] {
  display: none;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.model-box {
  border: 1px dashed rgba(15, 23, 42, 0.13);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.22);
  padding: 10px 12px;
}

.model-box summary {
  min-height: 24px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
}

.model-box[open] {
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.38);
}

.model-box .note {
  font-size: 12px;
}

.note,
.source-note,
.source-line {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary,
.secondary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, filter 0.2s, transform 0.16s, border-color 0.2s;
}

.primary {
  border: 1px solid rgba(94, 58, 26, 0.12);
  background: var(--primary);
  box-shadow: 0 10px 22px -18px rgba(94, 58, 26, 0.8);
  color: var(--brand-shadow-dark);
}

.primary:hover:not(:disabled) {
  background: var(--primary-hover);
  filter: brightness(1.04);
}

.secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
}

.primary:active,
.secondary:active {
  transform: scale(0.98);
}

.flow-card {
  display: grid;
  gap: 14px;
}

.stepper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow: hidden;
}

.step {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  white-space: nowrap;
}

.step span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.84);
  color: var(--text-sub);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.step.active {
  border-color: rgba(247, 192, 69, 0.42);
  background: var(--primary-light);
  color: var(--text-main);
}

.step.active span {
  background: var(--primary);
  color: var(--brand-shadow-dark);
}

.wechat-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wechat-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wechat-qr {
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.7);
  object-fit: cover;
}

.wechat-text {
  min-width: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.wechat-text strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
  font-size: 14px;
}

.wechat-text p {
  margin: 0;
}

.result-panel {
  min-height: 540px;
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.34);
  padding: 20px 24px;
}

.result-head p {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.6;
}

.result-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.status.idle {
  background: rgba(248, 250, 252, 0.74);
  color: var(--text-sub);
}

.status.loading {
  border-color: rgba(247, 192, 69, 0.32);
  background: var(--primary-light);
  color: var(--brand-shadow-dark);
}

.status.success {
  border-color: rgba(17, 129, 94, 0.24);
  background: var(--success-bg);
  color: var(--success-text);
}

.status.error {
  border-color: rgba(189, 48, 43, 0.18);
  background: var(--danger-bg);
  color: var(--danger);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-width: 0;
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  padding: 14px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-sub);
  font-size: 13px;
}

.metric strong {
  color: var(--text-main);
  font-size: 19px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.warning-list {
  border: 1px solid rgba(247, 192, 69, 0.26);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: var(--warning);
  line-height: 1.6;
  padding: 10px 12px;
}

.center-results {
  display: grid;
  gap: 8px;
  list-style: none;
}

.empty,
.path-box,
.priority-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  padding: 14px;
}

.path-box,
.priority-box {
  display: grid;
  gap: 10px;
}

.center-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
  padding: 10px 12px;
}

.center-row.matched {
  border-color: rgba(17, 129, 94, 0.24);
  box-shadow: inset 4px 0 0 rgba(17, 129, 94, 0.42);
}

.center-name {
  min-width: 0;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.center-status {
  flex: 0 0 auto;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.matched .center-status {
  color: var(--success-text);
}

.ipc-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--text-main);
}

.ipc-line strong {
  overflow-wrap: anywhere;
}

.path-box h3,
.priority-box h3 {
  margin: 0 0 4px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
}

.path-box p,
.priority-box p {
  color: var(--text-sub);
  line-height: 1.6;
}

.center-list-title,
.path-subtitle {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.center-results.compact {
  gap: 8px;
}

.priority-source-list,
.priority-source-files {
  display: grid;
  gap: 8px;
  list-style: none;
}

.priority-source-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
}

.priority-source-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.priority-source-head strong {
  color: var(--text-main);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.priority-source-head span {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.priority-source-files li {
  display: grid;
  gap: 3px;
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.74);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 10px;
}

.priority-file-title,
.priority-file-meta {
  overflow-wrap: anywhere;
}

.priority-file-title {
  color: var(--text-main);
  font-weight: 600;
}

.priority-file-meta {
  color: var(--text-sub);
  font-size: 12px;
}

.priority-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.priority-tags span {
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--brand-shadow-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 9px;
}

.footer {
  margin-top: auto;
  padding: 48px 0 24px;
}

.features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 36px;
  padding: 0 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.42);
  padding: 10px 12px;
  backdrop-filter: blur(16px);
}

.feature-title {
  margin-bottom: 2px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.feature-desc {
  color: var(--text-sub);
  font-size: 12px;
}

.copyright {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1024px) {
  .container {
    gap: 20px;
    padding: 24px;
  }

  .sidebar {
    width: 320px;
    flex-basis: 320px;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 16px;
  }

  .sidebar {
    width: 100%;
    flex-basis: auto;
  }

  .stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step {
    justify-content: center;
    gap: 8px;
    font-size: 13px;
  }

  .features {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 16px;
  }

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

  .header-note {
    display: none;
  }

  .data-chip {
    display: none;
  }

  .container {
    gap: 16px;
    padding: 12px;
  }

  .card {
    padding: 16px;
  }

  .info-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .result-body {
    padding: 16px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .stepper {
    gap: 6px;
  }

  .step {
    gap: 6px;
    padding: 7px 6px;
  }

  .step span {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .field-meta,
  .center-row,
  .priority-source-head,
  .ipc-line {
    flex-direction: column;
  }

  .center-status,
  .priority-source-head span {
    text-align: left;
  }

  .wechat-card {
    padding: 12px;
  }

  .wechat-content {
    gap: 12px;
  }

  .wechat-qr {
    width: 84px;
    height: 84px;
  }

  .wechat-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .wechat-text strong {
    font-size: 13px;
  }

  .footer {
    padding-top: 32px;
  }

  .features {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 24px;
    padding: 0 12px;
  }
}

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