:root {
  --fc-border: #e5e7eb;
  --fc-muted: #6b7280;
  --fc-blue: #2563eb;
  --fc-soft-blue: #eff6ff;
  --fc-danger: #b91c1c;
}

.fc-page {
  max-width: 1280px;
}

.fc-breadcrumb {
  color: #4b5563;
  font-size: 14px;
  margin: 0 0 22px;
}

.fc-breadcrumb a {
  color: #111827;
}

.fc-heading {
  margin-bottom: 20px;
}

.fc-heading h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.12;
  margin: 0 0 10px;
}

.fc-heading p {
  color: #4b5563;
  line-height: 1.65;
  margin: 0;
  max-width: 800px;
}

.fc-shell {
  background: #fff;
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  overflow: hidden;
}

.fc-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  min-height: 500px;
}

.fc-source,
.fc-settings {
  padding: 22px;
}

.fc-source {
  border-right: 1px solid var(--fc-border);
}

.fc-section-title {
  font-size: 18px;
  margin: 0 0 16px;
}

.fc-dropzone {
  align-items: center;
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 304px;
  padding: 24px;
  position: relative;
  text-align: center;
}

.fc-dropzone:focus-within,
.fc-dropzone.is-dragging {
  border-color: var(--fc-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.fc-dropzone input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.fc-dropzone strong,
.fc-dropzone span {
  display: block;
}

.fc-dropzone strong {
  margin-bottom: 8px;
}

.fc-dropzone span {
  color: var(--fc-muted);
  font-size: 14px;
  line-height: 1.55;
}

.fc-preview {
  background: #f3f4f6;
  border-radius: 8px;
  display: none;
  min-height: 304px;
  overflow: hidden;
}

.fc-preview.is-visible {
  display: grid;
  place-items: center;
}

.fc-preview img {
  display: block;
  height: 304px;
  object-fit: contain;
  width: 100%;
}

.fc-file-meta {
  align-items: center;
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  display: none;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 14px;
}

.fc-file-meta.is-visible {
  display: flex;
}

.fc-file-meta strong,
.fc-file-meta span {
  display: block;
}

.fc-file-meta span {
  color: var(--fc-muted);
  font-size: 13px;
  margin-top: 3px;
}

.fc-file-meta button {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 10px;
}

.fc-text-input,
.fc-text-output {
  min-height: 340px;
  resize: vertical;
}

.fc-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fc-field {
  display: grid;
  gap: 7px;
}

.fc-field.fc-wide {
  grid-column: 1 / -1;
}

.fc-field label,
.fc-field > span {
  font-size: 14px;
  font-weight: 750;
}

.fc-control {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #111827;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.fc-range-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 76px;
}

.fc-range-row input[type="range"] {
  accent-color: var(--fc-blue);
  width: 100%;
}

.fc-help {
  color: var(--fc-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.fc-actions {
  align-items: center;
  border-top: 1px solid var(--fc-border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
}

.fc-button {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 16px;
}

.fc-button-primary {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.fc-button-secondary {
  background: #fff;
  color: #111827;
}

.fc-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.fc-progress {
  border-top: 1px solid var(--fc-border);
  display: none;
  padding: 20px 22px;
}

.fc-progress.is-visible {
  display: block;
}

.fc-progress-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.fc-progress-head strong {
  font-size: 16px;
}

.fc-progress-track {
  background: #e5e7eb;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.fc-progress-bar {
  background: var(--fc-blue);
  border-radius: inherit;
  height: 100%;
  transition: width .16s ease;
  width: 0;
}

.fc-progress p {
  color: var(--fc-muted);
  font-size: 14px;
  margin: 9px 0 0;
}

.fc-ad-wrap {
  display: none;
  padding: 20px 22px 0;
}

.fc-ad-wrap.is-visible {
  display: block;
}

.fc-ad-label {
  color: var(--fc-muted);
  display: block;
  font-size: 11px;
  letter-spacing: .04em;
  margin: 0 0 6px;
  text-align: center;
}

.fc-ad-slot {
  align-items: center;
  background: #fafafa;
  border: 1px dashed #d1d5db;
  color: #9ca3af;
  display: flex;
  font-size: 13px;
  height: 90px;
  justify-content: center;
  margin: 0 auto;
  max-width: 970px;
  overflow: hidden;
  width: 100%;
}

.fc-result {
  border-top: 1px solid var(--fc-border);
  display: none;
  margin-top: 20px;
  padding-top: 18px;
}

.fc-result.is-visible {
  display: block;
}

.fc-result-card {
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.fc-result-card strong,
.fc-result-card span {
  display: block;
}

.fc-result-card span {
  color: var(--fc-muted);
  font-size: 13px;
  margin-top: 4px;
}

.fc-status {
  border-radius: 8px;
  display: none;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 14px;
  padding: 11px 12px;
}

.fc-status.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--fc-danger);
  display: block;
}

.fc-privacy {
  align-items: center;
  color: #166534;
  display: flex;
  font-size: 13px;
  gap: 8px;
  margin: 16px 0 0;
}

.fc-related,
.fc-info {
  background: #fff;
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  margin-top: 22px;
  padding: 20px;
}

.fc-related h2,
.fc-info h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

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

.fc-related a {
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  font-weight: 750;
  padding: 12px;
  text-decoration: none;
}

.fc-info p,
.fc-info li {
  color: #4b5563;
  line-height: 1.65;
}

@media (max-width: 840px) {
  .fc-workbench {
    grid-template-columns: 1fr;
  }

  .fc-source {
    border-bottom: 1px solid var(--fc-border);
    border-right: 0;
  }

  .fc-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .fc-source,
  .fc-settings,
  .fc-progress {
    padding: 16px;
  }

  .fc-ad-wrap {
    padding: 16px 16px 0;
  }

  .fc-ad-slot {
    height: 100px;
    max-width: 320px;
  }

  .fc-form-grid,
  .fc-related-grid {
    grid-template-columns: 1fr;
  }

  .fc-field.fc-wide {
    grid-column: auto;
  }

  .fc-actions,
  .fc-result-card {
    align-items: stretch;
    flex-direction: column;
  }

  .fc-button {
    width: 100%;
  }

  .fc-dropzone,
  .fc-preview {
    min-height: 230px;
  }

  .fc-preview img {
    height: 230px;
  }
}

.fc-shell > .fc-result {
  margin: 20px 22px 22px;
}

.fc-page [hidden] {
  display: none !important;
}

/* converter-mobile-nav */
@media (max-width: 560px) {
  header .right {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  header .tb-nav-search {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }
  header .lang,
  header .tb-favorite-btn {
    min-width: 0;
    white-space: nowrap;
  }
  .fc-page,
  .fc-shell,
  .fc-workbench,
  .fc-source,
  .fc-settings {
    min-width: 0;
  }
}


/* extended-file-converters */
.fc-file-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.fc-file-list:empty { display: none; }
.fc-file-list span {
  overflow-wrap: anywhere;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 13px;
}
.fc-color { min-height: 44px; padding: 5px; }
.fc-extracted-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.fc-extracted-list:empty { display: none; }
.fc-extracted-file {
  width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
  overflow-wrap: anywhere;
}
