:root {
  color-scheme: light;
  --ink: #03081d;
  --text: #1c2b44;
  --muted: #41516b;
  --line: #dbe4ef;
  --line-strong: #c9d7e8;
  --panel: rgba(255, 255, 255, 0.88);
  --accent: #f28c18;
  --teal: #00a97a;
  --danger: #b42318;
  --soft: #f7f9fc;
  --success-bg: #e8f8ef;
  --success-text: #078453;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 17% 10%, rgba(255, 199, 92, 0.5), transparent 31%),
    radial-gradient(circle at 88% 15%, rgba(123, 225, 207, 0.4), transparent 35%),
    linear-gradient(180deg, #f8fbfb 0%, #f5faf7 100%);
  color: var(--text);
}

.page-shell {
  width: min(768px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(28, 43, 68, 0.1);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 24px 24px 22px;
  border-color: rgba(242, 140, 24, 0.45);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 12px;
  border: 1px solid rgba(242, 140, 24, 0.42);
  border-radius: 999px;
  color: #c25a08;
  background: rgba(255, 248, 231, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.badge-icon {
  width: 14px;
  height: 14px;
  line-height: 1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.18;
  letter-spacing: 0;
}

.hero p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.mode-tabs,
.format-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.78);
}

.mode-tabs {
  margin-top: 20px;
}

button,
input,
textarea,
select {
  font: inherit;
}

.mode-tab,
.format-tab {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #33435d;
  cursor: pointer;
  font-weight: 800;
}

.mode-tab.active,
.format-tab.active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(3, 8, 29, 0.12);
}

.card {
  margin-top: 20px;
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 26px;
}

.cube-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--teal);
}

.badge-icon svg,
.cube-icon svg,
.download-btn svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-title p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

label,
.label-row {
  color: #0a1733;
  font-size: 13px;
  font-weight: 600;
}

label {
  display: block;
  margin: 0 0 8px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.label-row label {
  margin: 0;
}

.label-row span {
  color: #456289;
  font-weight: 500;
  white-space: nowrap;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input {
  min-height: 36px;
  margin-bottom: 16px;
  padding: 0 12px;
}

textarea {
  min-height: 144px;
  margin-bottom: 16px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(47, 116, 202, 0.12);
}

.mode-panel[hidden],
.action-row[hidden],
.stats-row[hidden] {
  display: none;
}

.action-row {
  margin-top: 16px;
}

.batch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #0a1733;
  cursor: pointer;
  font-weight: 600;
}

.download-btn.primary {
  border-color: #858994;
  background: #858994;
  color: #ffffff;
}

.download-btn.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: #8a93a1;
}

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

.download-btn svg {
  width: 18px;
  height: 18px;
}

.select-wrap {
  margin: 0;
}

select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #0a1733;
  font-weight: 800;
  outline: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stat-tile {
  min-height: 72px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
}

.stat-tile span {
  font-size: 12px;
}

.stat-tile strong {
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

.stat-tile.neutral {
  background: #f4f7fb;
  color: #416081;
}

.stat-tile.warn {
  background: #fff9e9;
  color: #c15f00;
}

.stat-tile.ok {
  background: #e8f8ef;
  color: #078453;
}

.stat-tile.bad {
  background: #fff0f2;
  color: #d21650;
}

.message {
  min-height: 24px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success-text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .batch-actions,
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .select-wrap {
    grid-column: 1 / -1;
  }

  select {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 768px);
    padding: 24px 0 48px;
  }

  .hero,
  .card {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .mode-tabs,
  .format-tabs,
  .batch-actions,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
