:root {
  color-scheme: light;
  --mp-accent: #d52f50;
  --mp-accent-dark: #b82040;
  --mp-accent-soft: #fff0f3;
  --mp-ink: #211f2b;
  --mp-muted: #676272;
  --mp-border: #e5e1ea;
  --mp-surface: #ffffff;
  --mp-page: #faf9fc;
  --mp-success: #087a55;
  --mp-warning: #a95c00;
  --mp-danger: #b4233d;
  --mp-shadow: 0 16px 45px rgba(42, 32, 62, .09);
  --mp-radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ftw-mp {
  margin: 0;
  min-width: 320px;
  color: var(--mp-ink);
  background: var(--mp-page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.ftw-mp-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.ftw-mp-skip {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--mp-ink);
  border-radius: 8px;
  transform: translateY(-150%);
}
.ftw-mp-skip:focus { transform: none; }
.ftw-mp-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ftw-mp-header {
  min-height: 64px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--mp-border);
  backdrop-filter: blur(12px);
}
.ftw-mp-header .ftw-mp-shell,
.ftw-mp-header-actions,
.ftw-mp-brand,
.ftw-mp-footer-main { display: flex; align-items: center; }
.ftw-mp-header .ftw-mp-shell { min-height: 64px; justify-content: space-between; gap: 20px; }
.ftw-mp-brand { gap: 10px; color: var(--mp-ink); font-weight: 800; text-decoration: none; }
.ftw-mp-brand img { width: 38px; height: 38px; }
.ftw-mp-header-actions { gap: 18px; }
.ftw-mp-home-link { color: var(--mp-muted); font-size: .93rem; font-weight: 650; text-decoration: none; }
.ftw-mp-home-link:hover { color: var(--mp-accent); }
.ftw-mp-language {
  max-width: 170px;
  min-height: 40px;
  padding: 7px 34px 7px 11px;
  color: var(--mp-ink);
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 10px;
}
[dir="rtl"] .ftw-mp-language { padding: 7px 11px 7px 34px; }

.ftw-mp-ad-slot {
  width: min(970px, calc(100% - 40px));
  min-height: 90px;
  margin: 16px auto;
  overflow: hidden;
  text-align: center;
}

.ftw-mp-tool-section { padding: 44px 0 54px; }
.ftw-mp-breadcrumb { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; color: var(--mp-muted); font-size: .84rem; }
.ftw-mp-breadcrumb a { color: var(--mp-accent-dark); font-weight: 720; text-decoration: none; }
.ftw-mp-breadcrumb a:hover { text-decoration: underline; }
.ftw-mp-intro { max-width: 780px; margin: 0 auto 26px; text-align: center; }
.ftw-mp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 5px 10px;
  color: var(--mp-accent-dark);
  background: var(--mp-accent-soft);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.ftw-mp-kicker::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.ftw-mp-intro h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 3.55rem); line-height: 1.05; letter-spacing: -.045em; }
.ftw-mp-intro p { max-width: 690px; margin: 14px auto 0; color: var(--mp-muted); font-size: clamp(1rem, 2vw, 1.14rem); }

.ftw-mp-workspace {
  max-width: 920px;
  margin-inline: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 28px;
  box-shadow: var(--mp-shadow);
}
.ftw-mp-workspace-inner { padding: 24px; border: 1px solid #f0edf3; border-radius: 20px; }
.ftw-mp-drop {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 26px;
  text-align: center;
  background: linear-gradient(145deg, #fffafb, #fbf9ff);
  border: 2px dashed #d9d3df;
  border-radius: var(--mp-radius);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.ftw-mp-drop.is-dragging { background: var(--mp-accent-soft); border-color: var(--mp-accent); }
.ftw-mp-drop.is-dragging { transform: scale(1.01); }
.ftw-mp-drop-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  color: var(--mp-accent);
  background: #fff;
  border: 1px solid #f4c6d0;
  border-radius: 18px;
  place-items: center;
  box-shadow: 0 10px 24px rgba(228, 61, 91, .12);
}
.ftw-mp-drop-icon svg { width: 31px; }
.ftw-mp-drop strong { display: block; font-size: 1.18rem; }
.ftw-mp-drop p { margin: 4px 0 16px; color: var(--mp-muted); }
.ftw-mp-limits { display: block; margin-top: 10px; color: var(--mp-muted); font-size: .78rem; }

.ftw-mp-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  color: #fff;
  background: var(--mp-accent);
  border: 1px solid var(--mp-accent);
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(228, 61, 91, .18);
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.ftw-mp-button:hover { background: var(--mp-accent-dark); border-color: var(--mp-accent-dark); transform: translateY(-1px); }
.ftw-mp-button:disabled { opacity: .52; cursor: not-allowed; transform: none; }
.ftw-mp-button-secondary { color: var(--mp-ink); background: #fff; border-color: var(--mp-border); box-shadow: none; }
.ftw-mp-button-secondary:hover { color: var(--mp-accent-dark); background: var(--mp-accent-soft); border-color: #f0b9c5; }
.ftw-mp-button-danger { color: var(--mp-danger); background: #fff; border-color: #f0b9c5; box-shadow: none; }
.ftw-mp-button-danger:hover { color: #fff; background: var(--mp-danger); border-color: var(--mp-danger); }
.ftw-mp-button-link {
  min-height: 40px;
  padding: 6px 9px;
  color: var(--mp-muted);
  background: transparent;
  border: 0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ftw-mp-button-link:hover { color: var(--mp-accent-dark); }

.ftw-mp-queue { margin-top: 4px; }
.ftw-mp-queue-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.ftw-mp-selection strong { display: block; font-size: 1.08rem; }
.ftw-mp-selection small { color: var(--mp-muted); }
.ftw-mp-output-field { display: grid; gap: 5px; min-width: 220px; }
.ftw-mp-output-field label { color: var(--mp-muted); font-size: .78rem; font-weight: 750; }
.ftw-mp-output-field div { display: flex; align-items: center; background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; overflow: hidden; }
.ftw-mp-output-field input { width: 180px; min-height: 40px; padding: 8px 2px 8px 11px; color: var(--mp-ink); background: transparent; border: 0; outline: 0; }
.ftw-mp-output-field span { padding-inline-end: 10px; color: var(--mp-muted); font-size: .88rem; }
.ftw-mp-output-field div:focus-within { border-color: var(--mp-accent); box-shadow: 0 0 0 3px rgba(228, 61, 91, .12); }

.ftw-mp-file-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ftw-mp-file {
  display: grid;
  grid-template-columns: 28px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 14px;
}
.ftw-mp-file.is-dragging { opacity: .48; border-color: var(--mp-accent); }
.ftw-mp-file.is-drag-target { border-color: var(--mp-accent); box-shadow: 0 0 0 3px rgba(228, 61, 91, .1); }
.ftw-mp-drag-handle {
  display: grid;
  width: 28px;
  height: 40px;
  color: #aaa4b2;
  background: transparent;
  border: 0;
  place-items: center;
  cursor: grab;
}
.ftw-mp-drag-handle svg { width: 18px; }
.ftw-mp-thumb {
  position: relative;
  display: grid;
  width: 74px;
  height: 86px;
  overflow: hidden;
  background: #f1eef4;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  place-items: center;
}
.ftw-mp-thumb canvas, .ftw-mp-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ftw-mp-thumb-fallback { color: var(--mp-accent); font-size: .72rem; font-weight: 900; }
.ftw-mp-file-detail { min-width: 0; }
.ftw-mp-file-detail strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftw-mp-file-detail span { display: block; margin-top: 3px; color: var(--mp-muted); font-size: .84rem; }
.ftw-mp-order-actions { display: flex; align-items: center; gap: 3px; }
.ftw-mp-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--mp-muted);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 9px;
  place-items: center;
  cursor: pointer;
}
.ftw-mp-icon-button:hover { color: var(--mp-accent-dark); background: var(--mp-accent-soft); border-color: #f3c2cc; }
.ftw-mp-icon-button:disabled { opacity: .32; cursor: default; }
.ftw-mp-icon-button svg { width: 18px; height: 18px; }
.ftw-mp-icon-button-remove:hover { color: #fff; background: var(--mp-danger); border-color: var(--mp-danger); }

.ftw-mp-queue-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.ftw-mp-progress { margin-top: 18px; padding: 14px; background: #f8f5fa; border-radius: 12px; }
.ftw-mp-progress-label { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 8px; font-size: .84rem; font-weight: 740; }
.ftw-mp-progress-bar { height: 8px; overflow: hidden; background: #e7e2eb; border-radius: 999px; }
.ftw-mp-progress-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--mp-accent), #7b55d9); border-radius: inherit; transition: width .22s ease; }

.ftw-mp-error { margin: 14px 0 0; padding: 11px 13px; color: #8f1730; background: #fff0f3; border: 1px solid #fac1cc; border-radius: 10px; }
.ftw-mp-result { margin-top: 18px; padding: 22px; text-align: center; background: #f1fbf7; border: 1px solid #bce7d6; border-radius: 16px; }
.ftw-mp-result-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 10px; color: #fff; background: var(--mp-success); border-radius: 50%; place-items: center; }
.ftw-mp-result-icon svg { width: 27px; }
.ftw-mp-result h2 { margin: 0; font-size: 1.25rem; }
.ftw-mp-result p { margin: 5px 0 15px; color: #3f6859; }
.ftw-mp-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ftw-mp-result .ftw-mp-button { background: var(--mp-success); border-color: var(--mp-success); box-shadow: 0 7px 18px rgba(8, 122, 85, .18); }

.ftw-mp-notice { display: flex; max-width: 920px; align-items: flex-start; gap: 9px; margin: 17px auto 0; color: var(--mp-muted); font-size: .9rem; }
.ftw-mp-notice svg { flex: 0 0 auto; width: 20px; margin-top: 1px; color: var(--mp-success); }

.ftw-mp-content { padding: 60px 0; background: #fff; border-top: 1px solid var(--mp-border); }
.ftw-mp-content h2 { margin: 0 0 12px; font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -.025em; }
.ftw-mp-content h3 { margin: 26px 0 8px; font-size: 1.08rem; }
.ftw-mp-content p, .ftw-mp-content li { color: var(--mp-muted); }
.ftw-mp-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .7fr); gap: 55px; }
.ftw-mp-content ol { padding-inline-start: 22px; }
.ftw-mp-info-card { align-self: start; padding: 24px; background: var(--mp-page); border: 1px solid var(--mp-border); border-radius: var(--mp-radius); }
.ftw-mp-info-card h3 { margin-top: 0; }
.ftw-mp-feature-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.ftw-mp-feature-list li { position: relative; padding-inline-start: 25px; }
.ftw-mp-feature-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--mp-success); font-weight: 900; }
.ftw-mp-use-cases, .ftw-mp-guide { margin-top: 50px; padding-top: 44px; border-top: 1px solid var(--mp-border); }
.ftw-mp-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ftw-mp-use-case-grid { grid-template-columns: repeat(2, 1fr); }
.ftw-mp-guide-grid article { padding: 20px; background: var(--mp-page); border: 1px solid var(--mp-border); border-radius: 15px; }
.ftw-mp-guide-grid h3 { margin-top: 0; }
.ftw-mp-guide-grid p { margin-bottom: 0; }
.ftw-mp-guide-checklist { margin-top: 20px; padding: 20px 22px; background: #fff7eb; border: 1px solid #f5d8a7; border-radius: 15px; }
.ftw-mp-guide-checklist h3 { margin-top: 0; color: #744200; }
.ftw-mp-guide-checklist ul { margin-bottom: 0; padding-inline-start: 20px; }
.ftw-mp-faq { max-width: 850px; margin: 52px auto 0; }
.ftw-mp-faq details { border-top: 1px solid var(--mp-border); }
.ftw-mp-faq details:last-child { border-bottom: 1px solid var(--mp-border); }
.ftw-mp-faq summary { padding: 17px 34px 17px 0; font-weight: 760; cursor: pointer; }
[dir="rtl"] .ftw-mp-faq summary { padding: 17px 0 17px 34px; }
.ftw-mp-faq details p { margin: -5px 0 18px; }

.ftw-mp-recommendations { padding: 52px 0 60px; background: var(--mp-page); }
.ftw-mp-recommendations h2 { margin: 0; font-size: 1.65rem; }
.ftw-mp-recommendations-intro { margin: 6px 0 20px; color: var(--mp-muted); }
.ftw-mp-recommendation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ftw-mp-recommendation-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px; color: var(--mp-ink); background: #fff; border: 1px solid var(--mp-border); border-radius: 14px; text-decoration: none; }
.ftw-mp-recommendation-card:hover { border-color: #eda5b4; box-shadow: 0 8px 24px rgba(42, 32, 62, .07); }
.ftw-mp-recommendation-card img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; }
.ftw-mp-recommendation-card strong, .ftw-mp-recommendation-card small { display: block; }
.ftw-mp-recommendation-card small { margin-top: 2px; color: var(--mp-muted); }
.ftw-mp-recommendation-card b { color: var(--mp-accent); font-size: 1.25rem; }
.ftw-mp-recommendation-status { color: var(--mp-muted); }
.ftw-mp-more-tools { display: inline-flex; gap: 6px; margin-top: 18px; color: var(--mp-accent-dark); font-weight: 760; text-decoration: none; }

.ftw-mp-footer { padding: 32px 0; color: #d8d4e0; background: #211f2b; }
.ftw-mp-footer-main { justify-content: space-between; gap: 24px; }
.ftw-mp-footer-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; text-decoration: none; }
.ftw-mp-footer-brand img { width: 32px; height: 32px; }
.ftw-mp-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.ftw-mp-footer-links a { color: #d8d4e0; text-decoration: none; }
.ftw-mp-footer-links a:hover { color: #fff; }
.ftw-mp-footer-note { margin: 22px 0 0; padding-top: 18px; color: #9f99ac; border-top: 1px solid #3a3745; font-size: .85rem; }

:focus-visible { outline: 3px solid #7352d1; outline-offset: 3px; }

@media (max-width: 800px) {
  .ftw-mp-shell { width: min(100% - 30px, 1120px); }
  .ftw-mp-tool-section { padding: 34px 0 42px; }
  .ftw-mp-workspace-inner { padding: 17px; }
  .ftw-mp-content-grid { grid-template-columns: 1fr; gap: 28px; }
  .ftw-mp-guide-grid { grid-template-columns: 1fr; }
  .ftw-mp-recommendation-grid { grid-template-columns: 1fr; }
  .ftw-mp-footer-main { align-items: flex-start; flex-direction: column; }
  .ftw-mp-footer-links { justify-content: flex-start; }
}

@media (max-width: 540px) {
  .ftw-mp-shell { width: min(100% - 22px, 1120px); }
  .ftw-mp-header .ftw-mp-shell { min-height: 58px; gap: 10px; }
  .ftw-mp-brand img { width: 34px; height: 34px; }
  .ftw-mp-brand span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ftw-mp-home-link { display: none; }
  .ftw-mp-language { max-width: 130px; min-height: 38px; }
  .ftw-mp-tool-section { padding-top: 28px; }
  .ftw-mp-breadcrumb { margin-bottom: 16px; }
  .ftw-mp-intro { margin-bottom: 20px; }
  .ftw-mp-intro h1 { font-size: clamp(2rem, 12vw, 2.65rem); }
  .ftw-mp-workspace { padding: 6px; border-radius: 21px; }
  .ftw-mp-workspace-inner { padding: 12px; border-radius: 16px; }
  .ftw-mp-drop { min-height: 210px; padding: 20px 12px; }
  .ftw-mp-queue-header { align-items: stretch; flex-direction: column; }
  .ftw-mp-output-field { min-width: 0; }
  .ftw-mp-output-field input { width: 100%; }
  .ftw-mp-file { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; }
  .ftw-mp-drag-handle { display: none; }
  .ftw-mp-thumb { grid-row: span 2; width: 60px; height: 75px; }
  .ftw-mp-order-actions { grid-column: 2; justify-content: flex-start; }
  .ftw-mp-icon-button { width: 40px; height: 36px; }
  .ftw-mp-queue-actions { align-items: stretch; flex-direction: column; }
  .ftw-mp-queue-actions .ftw-mp-button { width: 100%; }
  .ftw-mp-button-link { align-self: center; }
  .ftw-mp-content { padding: 46px 0; }
  .ftw-mp-use-cases, .ftw-mp-guide { margin-top: 38px; padding-top: 34px; }
  .ftw-mp-faq { margin-top: 40px; }
  .ftw-mp-footer-links { gap: 12px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
