:root {
  --em-primary: #1677ff;
  --em-primary-dark: #0f63d8;
  --em-primary-soft: #edf5ff;
  --em-bg: #f5f7fb;
  --em-card: #ffffff;
  --em-text: #1f2329;
  --em-muted: #667085;
  --em-line: #e8edf4;
  --em-success: #118553;
  --em-danger: #d9363e;
  --em-warning-bg: #fff8e8;
  --em-warning-line: #ffe2a8;
  --em-radius-lg: 24px;
  --em-radius-md: 18px;
  --em-radius-sm: 12px;
  --em-shadow: 0 14px 38px rgba(24, 39, 75, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--em-bg);
  color: var(--em-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

.em-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(232, 237, 244, 0.94);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.em-site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.em-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.em-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2c8cff, #1666df);
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.22);
}

.em-brand__mark svg {
  width: 22px;
  height: 22px;
}

.em-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.em-nav a {
  padding: 9px 13px;
  border-radius: 10px;
  color: #475467;
  font-size: 14px;
  transition: 0.2s ease;
}

.em-nav a:hover,
.em-nav a[aria-current="page"] {
  color: var(--em-primary);
  background: var(--em-primary-soft);
}

.em-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.em-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #7a8494;
  font-size: 13px;
}

.em-breadcrumb a:hover {
  color: var(--em-primary);
}

.em-breadcrumb__sep {
  color: #b4bcc8;
}

.em-hero {
  position: relative;
  overflow: hidden;
  padding: 42px 36px;
  border: 1px solid var(--em-line);
  border-radius: var(--em-radius-lg);
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #eef6ff 100%);
  box-shadow: var(--em-shadow);
}

.em-hero::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -70px;
  top: -115px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.14), rgba(22, 119, 255, 0));
  pointer-events: none;
}

.em-hero--center {
  text-align: center;
}

.em-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--em-primary);
  font-size: 13px;
  font-weight: 700;
}

.em-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.em-hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 15px auto 0;
  color: var(--em-muted);
  font-size: 15px;
  line-height: 1.9;
}

.em-badges {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.em-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #d8e9ff;
  border-radius: 999px;
  color: var(--em-primary);
  background: rgba(237, 245, 255, 0.85);
  font-size: 13px;
}

.em-section {
  margin-top: 32px;
}

.em-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.em-section h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}

.em-section__desc {
  margin: 5px 0 0;
  color: var(--em-muted);
  font-size: 14px;
}

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

.em-tool-card {
  position: relative;
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--em-line);
  border-radius: var(--em-radius-md);
  background: var(--em-card);
  box-shadow: 0 10px 26px rgba(24, 39, 75, 0.045);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

a.em-tool-card:hover {
  transform: translateY(-4px);
  border-color: #cfe2ff;
  box-shadow: 0 18px 40px rgba(24, 39, 75, 0.09);
}

.em-tool-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 15px;
  color: var(--em-primary);
  background: var(--em-primary-soft);
}

.em-tool-card__icon svg {
  width: 26px;
  height: 26px;
}

.em-tool-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

.em-tool-card p {
  margin: 0;
  color: var(--em-muted);
  font-size: 14px;
  line-height: 1.8;
}

.em-tool-card__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  color: var(--em-primary);
  font-size: 14px;
  font-weight: 650;
}

.em-tool-card__state {
  position: absolute;
  right: 18px;
  top: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #7b8492;
  background: #f1f3f6;
  font-size: 12px;
}

.em-tool-card--disabled {
  min-height: 214px;
  box-shadow: none;
  background: #fbfcfe;
}

.em-tool-card--disabled .em-tool-card__icon {
  color: #788393;
  background: #f0f3f7;
}

.em-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.em-info-card {
  padding: 23px 24px;
  border: 1px solid var(--em-line);
  border-radius: var(--em-radius-md);
  background: #fff;
}

.em-info-card h2,
.em-info-card h3 {
  margin: 0 0 11px;
  font-size: 19px;
}

.em-info-card p,
.em-info-card li {
  color: var(--em-muted);
  font-size: 14px;
  line-height: 1.85;
}

.em-info-card p {
  margin: 0;
}

.em-info-card ul {
  margin: 0;
  padding-left: 20px;
}

.em-tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}

.em-panel,
.em-side-card {
  border: 1px solid var(--em-line);
  border-radius: var(--em-radius-md);
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 39, 75, 0.045);
}

.em-panel {
  padding: 24px;
}

.em-side-card {
  padding: 20px;
}

.em-side-card + .em-side-card {
  margin-top: 16px;
}

.em-side-card h2,
.em-side-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.em-side-card p,
.em-side-card li {
  color: var(--em-muted);
  font-size: 13px;
  line-height: 1.75;
}

.em-side-card p {
  margin: 0;
}

.em-side-card ul {
  margin: 0;
  padding-left: 18px;
}

.em-side-links {
  display: grid;
  gap: 8px;
}

.em-side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #475467;
  background: #f7f9fc;
  font-size: 13px;
  transition: 0.2s ease;
}

.em-side-links a:hover,
.em-side-links a[aria-current="page"] {
  color: var(--em-primary);
  background: var(--em-primary-soft);
}

.em-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.em-field {
  min-width: 0;
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 13px;
  background: #f8fafc;
}

.em-field label {
  display: block;
  margin-bottom: 7px;
  color: #667085;
  font-size: 12px;
}

.em-field input[type="number"] {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  outline: none;
  color: var(--em-text);
  background: #fff;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.em-field input[type="number"]:focus {
  border-color: #8fc0ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.em-check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 13px;
  border: 1px solid #edf1f5;
  border-radius: 13px;
  color: #4f5968;
  background: #f8fafc;
  font-size: 14px;
}

.em-check-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--em-primary);
}

.em-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 17px;
}

.em-quick__label {
  margin-right: 2px;
  color: #7a8494;
  font-size: 12px;
}

.em-btn,
.em-file-btn,
.em-quick button {
  border: 0;
  cursor: pointer;
  transition: 0.2s ease;
}

.em-btn,
.em-file-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border-radius: 10px;
  color: #fff;
  background: var(--em-primary);
  font-size: 14px;
  font-weight: 650;
}

.em-btn:hover,
.em-file-btn:hover {
  background: var(--em-primary-dark);
}

.em-btn--secondary {
  color: #475467;
  background: #eef2f7;
}

.em-btn--secondary:hover {
  background: #e2e8f0;
}

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

.em-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.em-quick button {
  padding: 7px 11px;
  border-radius: 8px;
  color: #475467;
  background: #eef2f7;
  font-size: 12px;
}

.em-quick button:hover,
.em-quick button.is-active {
  color: var(--em-primary);
  background: var(--em-primary-soft);
}

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

.em-selection-status {
  margin-left: auto;
  color: #7a8494;
  font-size: 13px;
}

.em-dropzone {
  margin: 18px 0;
  padding: 38px 24px;
  border: 2px dashed #cbd5e1;
  border-radius: 17px;
  outline: none;
  text-align: center;
  background: #fbfdff;
  cursor: pointer;
  transition: 0.2s ease;
}

.em-dropzone:hover,
.em-dropzone:focus-visible,
.em-dropzone.is-dragging {
  border-color: #69a8ff;
  background: #f2f8ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.08);
}

.em-dropzone__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 16px;
  color: var(--em-primary);
  background: var(--em-primary-soft);
}

.em-dropzone__icon svg {
  width: 27px;
  height: 27px;
}

.em-dropzone strong {
  display: block;
  margin-bottom: 7px;
  font-size: 19px;
}

.em-dropzone span {
  color: #7a8494;
  font-size: 13px;
  line-height: 1.7;
}

.em-progress-wrap {
  display: none;
  margin: 16px 0;
}

.em-progress-wrap.is-visible {
  display: block;
}

.em-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #667085;
  font-size: 12px;
}

.em-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.em-progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1677ff, #4da0ff);
  transition: width 0.22s ease;
}

.em-table-wrap {
  overflow-x: auto;
  border: 1px solid #edf1f5;
  border-radius: 13px;
}

.em-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 13px;
}

.em-table th,
.em-table td {
  padding: 12px 11px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}

.em-table tr:last-child td {
  border-bottom: 0;
}

.em-table th {
  color: #667085;
  background: #fafbfc;
  font-weight: 650;
}

.em-table td:first-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-download-link {
  color: var(--em-primary);
  font-weight: 650;
}

.em-ok {
  color: var(--em-success);
}

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

.em-saving {
  color: var(--em-success);
  font-weight: 650;
}

.em-note {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--em-warning-line);
  border-radius: 12px;
  color: #725100;
  background: var(--em-warning-bg);
  font-size: 13px;
  line-height: 1.75;
}

.em-tool-footer-link {
  margin-top: 17px;
  font-size: 13px;
}

.em-tool-footer-link a {
  color: var(--em-primary);
}

.em-footer {
  margin-top: 42px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--em-line);
  color: #7a8494;
  font-size: 13px;
  text-align: center;
  line-height: 1.8;
}

.em-footer a {
  color: #4f5968;
}

.em-footer a:hover {
  color: var(--em-primary);
}

@media (max-width: 980px) {
  .em-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-tool-layout {
    grid-template-columns: 1fr;
  }

  .em-tool-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .em-side-card + .em-side-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .em-site-header__inner,
  .em-page {
    width: min(100% - 24px, 1180px);
  }

  .em-site-header__inner {
    min-height: 60px;
  }

  .em-brand {
    font-size: 16px;
  }

  .em-brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .em-nav a:not([aria-current="page"]) {
    display: none;
  }

  .em-nav a {
    padding: 8px 10px;
  }

  .em-page {
    padding-top: 17px;
  }

  .em-hero {
    padding: 31px 20px;
    border-radius: 20px;
  }

  .em-hero h1 {
    font-size: 28px;
  }

  .em-hero p {
    font-size: 14px;
    line-height: 1.8;
  }

  .em-section {
    margin-top: 27px;
  }

  .em-section h2 {
    font-size: 21px;
  }

  .em-grid,
  .em-info-grid,
  .em-tool-sidebar {
    grid-template-columns: 1fr;
  }

  .em-tool-card {
    min-height: 0;
  }

  .em-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-panel {
    padding: 17px;
  }

  .em-selection-status {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 460px) {
  .em-controls {
    grid-template-columns: 1fr;
  }

  .em-check-field {
    min-height: 0;
  }

  .em-actions .em-btn,
  .em-actions .em-file-btn {
    flex: 1 1 calc(50% - 5px);
  }

  .em-dropzone {
    padding: 31px 16px;
  }
}
