:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2329;
  background: #ffffff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, select, input { font: inherit; }

.wrap {
  padding: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.title {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.sub {
  margin: 5px 0 0;
  color: #646a73;
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f3f5;
  color: #646a73;
  font-size: 12px;
}

.card {
  border: 1px solid #e5e6eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.meta {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px 10px;
  font-size: 13px;
}
.meta .k { color: #8f959e; }
.meta .v { color: #1f2329; overflow-wrap: anywhere; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2329;
  margin-bottom: 9px;
}
.section-title.gap-top { margin-top: 16px; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid.three { grid-template-columns: 1fr 1fr 1fr; }

.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}

select, input[type="text"] {
  width: 100%;
  height: 36px;
  border: 1px solid #d0d3d8;
  border-radius: 8px;
  padding: 0 10px;
  color: #1f2329;
  background: #fff;
  outline: none;
}
select:disabled { opacity: .55; cursor: not-allowed; }
select:focus, input[type="text"]:focus {
  border-color: #3370ff;
  box-shadow: 0 0 0 2px rgba(51, 112, 255, .12);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 2px;
}
.radio-row label,
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}

.folder-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
}
.folder-select { min-width: 0; }

.note {
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 8px;
  background: #f7f8fa;
  color: #646a73;
  font-size: 12px;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.btn {
  border: 0;
  border-radius: 8px;
  height: 38px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: #3370ff; color: #fff; }
.secondary { background: #f2f3f5; color: #1f2329; }
.danger { background: #fff0f0; color: #d83931; }

.progress-wrap { margin-top: 14px; display: none; }
.progress-wrap.show { display: block; }
.progress-line {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f3;
}
.progress-bar {
  width: 0%;
  height: 100%;
  background: #3370ff;
  transition: width .2s ease;
}
.progress-text {
  margin-top: 7px;
  color: #646a73;
  font-size: 12px;
  line-height: 1.45;
}

.preview {
  display: none;
  margin: 12px 0 0;
  max-height: 230px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fafafa;
  padding: 10px 11px;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #42464d;
}
.preview.show { display: block; }

.result {
  margin-top: 12px;
  border-radius: 8px;
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.55;
  display: none;
}
.result.show { display: block; }
.result.ok { background: #effaf3; color: #237b4b; }
.result.warn { background: #fff7e6; color: #ad6800; }
.result.err { background: #fff0f0; color: #d83931; }

.small { font-size: 12px; color: #8f959e; margin-top: 8px; }

@media (max-width: 700px) {
  .grid.three { grid-template-columns: 1fr; }
  .grid.three .field.full { grid-column: auto; }
  .folder-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}

@media (prefers-color-scheme: dark) {
  :root { color: #e5e6eb; background: #1f2329; }
  .card { background: #24272e; border-color: #3b3f46; }
  .section-title, .meta .v, select, input[type="text"] { color: #e5e6eb; }
  select, input[type="text"] { background: #24272e; border-color: #50545c; }
  .note, .secondary, .badge { background: #2b2f36; color: #c9cdd4; }
  .progress-line { background: #3b3f46; }
  .preview { background: #1f2329; border-color: #3b3f46; color: #c9cdd4; }
}

.hidden { display: none !important; }

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.mode-option input { margin-top: 2px; }
.mode-option strong { display: block; font-size: 13px; color: #1f2329; }
.mode-option span { display: block; margin-top: 3px; font-size: 12px; color: #8f959e; line-height: 1.45; }
.mode-option.active-recommended { border-color: #b7c8ff; background: #f7f9ff; }

.asset-banner {
  margin-top: 14px;
  border: 1px solid #b7c8ff;
  background: #f5f8ff;
  color: #3f4f75;
  border-radius: 9px;
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.6;
}
.asset-example {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 8px;
  background: #f7f8fa;
  color: #646a73;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 620px) {
  .mode-switch { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  .mode-option { background: #24272e; border-color: #3b3f46; }
  .mode-option strong { color: #e5e6eb; }
  .mode-option.active-recommended { background: #252b38; border-color: #536a9f; }
  .asset-banner { background: #252b38; border-color: #536a9f; color: #cbd8ff; }
  .asset-example { background: #2b2f36; color: #c9cdd4; }
}
