.wf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.wf-main,
.wf-settings {
  min-width: 0;
  background: white;
  border: 1px solid #dce1ed;
  border-radius: 14px;
  padding: 24px;
}
.wf-settings fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.wf-settings label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0;
}
.wf-settings input:not([type='checkbox']),
.wf-settings select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #cbd3e4;
  border-radius: 8px;
  background: white;
  font: inherit;
  color: inherit;
}
.wf-settings button {
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
}
.wf-settings p,
.wf-main p {
  font-size: 14px;
  line-height: 1.6;
  color: #606a7d;
}
.wf-settings .wf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}
.wf-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.wf-drop {
  padding: 24px;
  border: 1px dashed #afbddf;
  border-radius: 12px;
  text-align: center;
}
.wf-drop h2 {
  font-size: 20px;
  margin: 12px 0;
}
.wf-pages {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.wf-pages li {
  min-width: 0;
  border: 1px solid #dce1ed;
  border-radius: 10px;
  padding: 12px;
  overflow-wrap: anywhere;
}
.wf-thumb {
  height: 160px;
  display: grid;
  place-items: center;
  background: #f3f5fa;
  overflow: hidden;
}
.wf-thumb img {
  max-width: 130px;
  max-height: 130px;
  object-fit: contain;
}
.wf-pages strong {
  display: block;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}
.wf-pages button {
  min-height: 44px;
  font-size: 12px;
  padding: 6px 9px;
  margin: 2px;
}
.wf-scroll {
  max-width: 100%;
  overflow: auto;
  max-height: 650px;
  margin-top: 20px;
}
.wf-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.wf-scroll th,
.wf-scroll td {
  padding: 12px;
  border: 1px solid #dce1ed;
  overflow-wrap: anywhere;
  min-width: 120px;
  max-width: 240px;
}
.wf-scroll button {
  min-height: 44px;
  padding: 6px;
  font-size: 12px;
  margin: 2px;
}
.wf-invalid {
  color: #b32b38;
}
.wf-result-image {
  display: block;
  max-width: 100%;
  max-height: 700px;
  object-fit: contain;
  background: repeating-conic-gradient(#eee 0% 25%, white 0% 50%) 50%/16px 16px;
}
#results {
  margin-top: 24px;
  overflow-wrap: anywhere;
}
#preview iframe {
  width: 100%;
  height: 550px;
  border: 1px solid #dce1ed;
}
#preview audio {
  width: 100%;
}
#status {
  margin-top: 20px;
}
@media (max-width: 850px) {
  .wf-layout {
    grid-template-columns: 1fr;
  }
  .wf-main,
  .wf-settings {
    padding: 18px;
  }
}
@media (max-width: 480px) {
  .wf-pages {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .wf-pages li {
    padding: 8px;
  }
  .wf-thumb {
    height: 120px;
  }
  .wf-thumb img {
    max-width: 90px;
    max-height: 90px;
  }
  .wf-drop {
    padding: 18px 8px;
  }
  .wf-scroll th,
  .wf-scroll td {
    min-width: 100px;
  }
}

.wf-advanced {
  margin: 16px 0;
  border: 1px solid #dce1ed;
  border-radius: 8px;
  padding: 12px;
}
.wf-advanced summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 24px;
}
.wf-settings input:disabled,
.wf-settings select:disabled {
  background: #f3f5fa;
}

.wf-result-video {
  display: block;
  width: 100%;
  max-height: 600px;
  background: #131722;
  border-radius: 8px;
}
#conversion-progress {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid #dce1ed;
  border-radius: 10px;
}
#video-progress {
  display: block;
  width: 100%;
  height: 16px;
  margin: 10px 0;
  accent-color: #5068cb;
}
#progress-value {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
  color: #606a7d;
}
