:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1d2521;
  background: #f4f6f4;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6f4;
}

button,
input {
  font: inherit;
}

.site-header {
  border-bottom: 1px solid #d8ded9;
  background: #ffffff;
}

.header-inner {
  width: min(960px, calc(100% - 40px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: #24734b;
  font-weight: 700;
}

.brand-name {
  font-size: 15px;
  font-weight: 650;
}

.main-content {
  width: min(960px, calc(100% - 40px));
  margin: auto;
  padding: 56px 0;
}

.converter {
  width: 100%;
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #537064;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.limits {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #bfc9c1;
  border-bottom: 1px solid #bfc9c1;
}

.limits div {
  padding: 9px 14px;
  border-left: 1px solid #d8ded9;
}

.limits div:first-child {
  border-left: 0;
}

.limits dt,
.limits dd {
  margin: 0;
  white-space: nowrap;
}

.limits dt {
  color: #66726b;
  font-size: 11px;
}

.limits dd {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
}

#convert-form {
  width: 100%;
  min-width: 0;
  padding: 28px;
  border: 1px solid #ccd4ce;
  border-radius: 8px;
  background: #ffffff;
}

.drop-zone {
  width: 100%;
  min-width: 0;
  min-height: 220px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #93a69a;
  border-radius: 6px;
  background: #f8faf8;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: #24734b;
  background: #eef5f0;
}

.drop-zone:focus-within {
  outline: 3px solid rgba(36, 115, 75, 0.22);
  outline-offset: 2px;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-prompt {
  color: #1d2521;
  font-size: 18px;
  font-weight: 700;
}

.file-types {
  margin-top: 8px;
  color: #6a756e;
  font-size: 13px;
}

.file-summary {
  min-height: 62px;
  margin-top: 16px;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d8ded9;
  border-radius: 6px;
  background: #fafbfa;
}

.file-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.file-meta span {
  color: #6a756e;
  font-size: 12px;
}

.icon-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  color: #525e57;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  color: #a32d2d;
  background: #f8eaea;
}

.status {
  margin-top: 16px;
  padding: 11px 13px;
  border-left: 3px solid #24734b;
  color: #315444;
  background: #edf5f0;
  font-size: 14px;
}

.status.is-error {
  border-left-color: #b53b3b;
  color: #812828;
  background: #f9eded;
}

.convert-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #24734b;
  font-weight: 700;
  cursor: pointer;
}

.convert-button:hover:not(:disabled) {
  background: #185f3c;
}

.convert-button:disabled {
  color: #909994;
  background: #e1e5e2;
  cursor: not-allowed;
}

.spinner {
  width: 17px;
  height: 17px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.convert-button.is-loading .spinner {
  display: block;
}

footer {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid #d8ded9;
  color: #707a74;
  font-size: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .header-inner,
  .main-content,
  footer {
    width: min(100% - 28px, 960px);
  }

  .main-content {
    padding: 34px 0;
  }

  .title-row {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  h1 {
    font-size: 29px;
  }

  .limits {
    width: 100%;
  }

  .limits div {
    padding: 9px 10px;
  }

  #convert-form {
    padding: 16px;
  }

  .drop-zone {
    min-height: 180px;
    padding: 20px;
  }
}

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