.mci-converter {
  --mci-blue: #3157e5;
  --mci-blue-dark: #2443ba;
  --mci-ink: #172033;
  --mci-muted: #667085;
  --mci-line: #dfe4ed;
  --mci-soft: #f5f7fb;
  color: var(--mci-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0 auto;
  max-width: 1120px;
}
.mci-converter *, .mci-converter *::before, .mci-converter *::after { box-sizing: border-box; }
.mci-card { background: #fff; border: 1px solid var(--mci-line); border-radius: 20px; box-shadow: 0 12px 35px rgba(20, 35, 70, .07); padding: clamp(20px, 3vw, 34px); }
.mci-privacy { align-items: center; background: #ecf9f1; border-radius: 10px; color: #176b3a; display: flex; font-size: 14px; gap: 9px; margin-bottom: 22px; padding: 10px 13px; }
.mci-privacy span { align-items: center; background: #1f9d55; border-radius: 50%; color: #fff; display: inline-flex; flex: 0 0 22px; height: 22px; justify-content: center; }
.mci-file-input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.mci-dropzone { align-items: center; background: var(--mci-soft); border: 2px dashed #b9c4d6; border-radius: 16px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-height: 300px; padding: 34px 20px; text-align: center; transition: background .15s ease, border-color .15s ease; }
.mci-dropzone:hover, .mci-dropzone.is-dragging, .mci-dropzone:focus-within { background: #edf1ff; border-color: var(--mci-blue); }
.mci-dropzone strong { font-size: clamp(20px, 2.5vw, 26px); margin: 12px 0 4px; }
.mci-dropzone span:not(.mci-upload-icon) { color: var(--mci-muted); }
.mci-dropzone small { color: var(--mci-muted); margin-top: 14px; }
.mci-upload-icon { align-items: center; background: var(--mci-blue); border-radius: 50%; color: #fff; display: flex; font-size: 30px; height: 58px; justify-content: center; width: 58px; }
.mci-workspace { display: grid; gap: clamp(22px, 4vw, 44px); grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
.mci-preview-wrap { align-items: center; background-color: #f1f2f5; background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; border: 1px solid var(--mci-line); border-radius: 14px; display: flex; justify-content: center; min-height: 320px; overflow: hidden; padding: 18px; }
.mci-preview { display: block; max-height: 460px; max-width: 100%; object-fit: contain; }
.mci-file-meta { display: flex; flex-direction: column; margin-top: 13px; overflow-wrap: anywhere; }
.mci-file-meta span { color: var(--mci-muted); font-size: 14px; margin-top: 3px; }
.mci-text-button { background: transparent; border: 0; color: var(--mci-blue); cursor: pointer; font: inherit; font-weight: 700; margin-top: 10px; padding: 0; text-align: left; }
.mci-settings { background: var(--mci-soft); border-radius: 14px; padding: 22px; }
.mci-field, .mci-resize { border: 0; margin: 0 0 20px; padding: 0; }
.mci-field > label, .mci-resize legend, .mci-dimensions label, .mci-label-row label { display: block; font-size: 14px; font-weight: 750; margin-bottom: 8px; }
.mci-settings select, .mci-dimensions input { background: #fff; border: 1px solid var(--mci-line); border-radius: 10px; color: var(--mci-ink); font: inherit; min-height: 48px; padding: 9px 11px; width: 100%; }
.mci-settings select:focus, .mci-dimensions input:focus { border-color: var(--mci-blue); box-shadow: 0 0 0 3px rgba(49, 87, 229, .13); outline: none; }
.mci-label-row { display: flex; justify-content: space-between; }
.mci-label-row output { color: var(--mci-blue); font-size: 14px; font-weight: 750; }
.mci-settings input[type="range"] { accent-color: var(--mci-blue); width: 100%; }
.mci-dimensions { align-items: end; display: grid; gap: 10px; grid-template-columns: 1fr auto 1fr; }
.mci-dimensions span { padding-bottom: 12px; }
.mci-check { align-items: center; color: var(--mci-muted); display: flex; font-size: 14px; gap: 7px; margin-top: 10px; }
.mci-check input { accent-color: var(--mci-blue); }
.mci-color-row { align-items: center; display: flex; gap: 10px; }
.mci-color-row input { background: #fff; border: 1px solid var(--mci-line); border-radius: 8px; cursor: pointer; height: 42px; padding: 4px; width: 58px; }
.mci-color-row span { color: var(--mci-muted); font-size: 14px; }
.mci-button { align-items: center; border: 0; border-radius: 10px; cursor: pointer; display: inline-flex; font: inherit; font-weight: 750; justify-content: center; min-height: 48px; padding: 11px 18px; text-decoration: none; }
.mci-button-primary { background: var(--mci-blue); color: #fff; width: 100%; }
.mci-button-primary:hover { background: var(--mci-blue-dark); }
.mci-button:disabled { cursor: wait; opacity: .65; }
.mci-result { align-items: center; background: #edf1ff; border: 1px solid #cbd4fa; border-radius: 14px; display: flex; gap: 20px; justify-content: space-between; margin-top: 24px; padding: 18px; }
.mci-result[hidden], .mci-workspace[hidden], [data-mci-quality-wrap][hidden], [data-mci-background-wrap][hidden], .mci-dropzone[hidden] { display: none !important; }
.mci-result > div { display: flex; flex-direction: column; }
.mci-result span { color: var(--mci-muted); font-size: 14px; margin-top: 3px; }
.mci-button-download { background: var(--mci-blue); color: #fff; flex: 0 0 auto; }
.mci-button-download:hover { background: var(--mci-blue-dark); color: #fff; }
.mci-message { color: #176b3a; font-size: 14px; font-weight: 650; margin: 12px 0 0; min-height: 22px; }
.mci-message.is-error { color: #b42318; }

.mci-guide {
  background: #fff;
  border: 1px solid var(--mci-line, #dfe4ed);
  border-radius: 20px;
  color: var(--mci-ink, #172033);
  margin: clamp(32px, 5vw, 58px) auto 0;
  max-width: 1120px;
  padding: clamp(22px, 4vw, 38px);
}
.mci-guide h2 { font-size: clamp(25px, 3vw, 34px); margin: 0 0 14px; }
.mci-guide h3 { font-size: clamp(18px, 2vw, 22px); margin: 26px 0 10px; }
.mci-guide p, .mci-guide li { color: #556176; line-height: 1.7; }
.mci-guide-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mci-guide ol { margin: 0; padding-left: 22px; }
.mci-faq { border-top: 1px solid #dfe4ed; }
.mci-faq details { border-bottom: 1px solid #dfe4ed; padding: 15px 0; }
.mci-faq summary { cursor: pointer; font-weight: 750; }
.mci-faq details p { margin: 10px 0 0; }
.mci-guide-privacy { background: #ecf9f1; border-radius: 10px; color: #176b3a !important; margin: 26px 0 0; padding: 12px 14px; }

@media (max-width: 780px) {
  .mci-workspace { grid-template-columns: 1fr; }
  .mci-preview-wrap { min-height: 230px; }
  .mci-result { align-items: stretch; flex-direction: column; }
  .mci-button-download { width: 100%; }
  .mci-guide-grid { grid-template-columns: 1fr; }
}
