.fivemx-fxmanifest-tool {
  --fx-ink: #17212b;
  --fx-muted: #59636f;
  --fx-line: #d9dee5;
  --fx-surface: #f5f7fa;
  --fx-accent: #fd6b35;
  --fx-accent-dark: #c94214;
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 40px;
  padding: clamp(18px, 3vw, 32px);
  overflow: hidden;
  color: var(--fx-ink);
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(20, 30, 40, .08);
}

.fivemx-fxmanifest-tool *, .fivemx-fxmanifest-tool *::before, .fivemx-fxmanifest-tool *::after { box-sizing: border-box; }
.fivemx-fxmanifest-tool [hidden] { display: none !important; }
.fivemx-fxmanifest-tool__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.fivemx-fxmanifest-tool__header h2 { margin: 5px 0 8px; font-size: clamp(25px, 4vw, 40px); line-height: 1.08; letter-spacing: -.025em; }
.fivemx-fxmanifest-tool__header p { max-width: 740px; margin: 0; color: var(--fx-muted); }
.fivemx-fxmanifest-tool__eyebrow { color: var(--fx-accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fivemx-fxmanifest-tool__github { flex: 0 0 auto; padding: 10px 13px; color: var(--fx-ink); border: 1px solid var(--fx-line); border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; }
.fivemx-fxmanifest-tool__github:hover { border-color: var(--fx-ink); }

.fivemx-fxmanifest-tool__modes { display: inline-flex; gap: 5px; margin-bottom: 18px; padding: 5px; border-radius: 12px; background: var(--fx-surface); }
.fivemx-fxmanifest-tool button { appearance: none; min-height: 42px; padding: 9px 14px; color: var(--fx-ink); border: 1px solid transparent; border-radius: 9px; background: transparent; font: inherit; font-weight: 750; cursor: pointer; }
.fivemx-fxmanifest-tool button:hover { border-color: #c9d0d8; background: #fff; }
.fivemx-fxmanifest-tool button:focus-visible, .fivemx-fxmanifest-tool a:focus-visible, .fivemx-fxmanifest-tool input:focus-visible, .fivemx-fxmanifest-tool textarea:focus-visible { outline: 3px solid rgba(253, 107, 53, .35); outline-offset: 2px; }
.fivemx-fxmanifest-tool [role="tab"][aria-selected="true"] { color: #fff; border-color: var(--fx-ink); background: var(--fx-ink); }

.fivemx-fxmanifest-tool__workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.fivemx-fxmanifest-tool__form, .fivemx-fxmanifest-tool__output-card, .fivemx-fxmanifest-tool__validate { min-width: 0; padding: 18px; border: 1px solid var(--fx-line); border-radius: 14px; background: var(--fx-surface); }
.fivemx-fxmanifest-tool fieldset { min-width: 0; margin: 0 0 17px; padding: 0; border: 0; }
.fivemx-fxmanifest-tool legend, .fivemx-fxmanifest-tool label { color: #3f4954; font-size: 13px; font-weight: 750; }
.fivemx-fxmanifest-tool__presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fivemx-fxmanifest-tool__presets button { min-height: 38px; padding: 7px 11px; border-color: var(--fx-line); background: #fff; font-size: 13px; }
.fivemx-fxmanifest-tool__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.fivemx-fxmanifest-tool__fields label { display: grid; gap: 6px; min-width: 0; }
.fivemx-fxmanifest-tool__fields label > span { color: var(--fx-muted); font-size: 12px; font-weight: 500; }
.fivemx-fxmanifest-tool__wide { grid-column: 1 / -1; }
.fivemx-fxmanifest-tool input, .fivemx-fxmanifest-tool textarea { display: block; width: 100%; max-width: 100%; min-width: 0; padding: 10px 11px; color: var(--fx-ink); border: 1px solid #cbd2da; border-radius: 8px; background: #fff; font: 500 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; }
.fivemx-fxmanifest-tool input { font-family: inherit; }
.fivemx-fxmanifest-tool__primary { margin-top: 16px; color: #fff !important; border-color: var(--fx-accent-dark) !important; background: var(--fx-accent) !important; }
.fivemx-fxmanifest-tool__primary:hover { background: var(--fx-accent-dark) !important; }

.fivemx-fxmanifest-tool__output-card { display: flex; flex-direction: column; background: #111923; }
.fivemx-fxmanifest-tool__output-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #fff; }
.fivemx-fxmanifest-tool__output-head span { color: #9eadbd; font-size: 12px; }
.fivemx-fxmanifest-tool pre { flex: 1; min-height: 390px; max-width: 100%; margin: 0; padding: 16px; overflow: auto; color: #eaf2f8; border: 1px solid #2a3948; border-radius: 9px; background: #0c1219; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.fivemx-fxmanifest-tool__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fivemx-fxmanifest-tool__actions button { color: #fff; border-color: #425161; background: #1d2935; font-size: 13px; }
.fivemx-fxmanifest-tool__actions button:hover { border-color: #73869a; background: #273746; }

.fivemx-fxmanifest-tool__validate label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.fivemx-fxmanifest-tool__validate label span { color: var(--fx-muted); font-weight: 500; }
.fivemx-fxmanifest-tool__status:empty { display: none; }
.fivemx-fxmanifest-tool__status { margin-top: 18px; padding: 16px; border: 1px solid var(--fx-line); border-radius: 12px; background: #fff; }
.fivemx-fxmanifest-tool__summary { margin: 0; font-weight: 800; }
.fivemx-fxmanifest-tool__status ol { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }
.fivemx-fxmanifest-tool__status li { display: grid; gap: 2px; padding: 11px 12px; border-left: 4px solid #c08a00; border-radius: 7px; background: #fff7dd; }
.fivemx-fxmanifest-tool__status li.is-error { border-color: #c23030; background: #fff0f0; }
.fivemx-fxmanifest-tool__status li span, .fivemx-fxmanifest-tool__status li a { font-size: 13px; }
.fivemx-fxmanifest-tool__status li a { width: fit-content; }

.fivemx-fxmanifest-tool__bridge { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 17px 18px; color: #fff; border-radius: 13px; background: linear-gradient(120deg, #17212b, #273849); }
.fivemx-fxmanifest-tool__bridge div { display: grid; gap: 3px; }
.fivemx-fxmanifest-tool__bridge span { color: #ff9a74; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fivemx-fxmanifest-tool__bridge strong { font-size: 18px; }
.fivemx-fxmanifest-tool__bridge p { margin: 0; color: #c9d4df; font-size: 13px; }
.fivemx-fxmanifest-tool__bridge a { flex: 0 0 auto; padding: 10px 14px; color: #17212b; border-radius: 9px; background: #fff; font-weight: 800; text-decoration: none; }
.fivemx-fxmanifest-tool__privacy { margin: 16px 0 0; color: var(--fx-muted); font-size: 12px; }

@media (max-width: 820px) {
  .fivemx-fxmanifest-tool__header, .fivemx-fxmanifest-tool__bridge { align-items: stretch; flex-direction: column; }
  .fivemx-fxmanifest-tool__github, .fivemx-fxmanifest-tool__bridge a { width: fit-content; }
  .fivemx-fxmanifest-tool__workspace { grid-template-columns: 1fr; }
  .fivemx-fxmanifest-tool pre { min-height: 300px; }
}

@media (max-width: 520px) {
  .fivemx-fxmanifest-tool { margin-inline: -10px; padding: 16px; border-radius: 12px; }
  .fivemx-fxmanifest-tool__fields { grid-template-columns: 1fr; }
  .fivemx-fxmanifest-tool__wide { grid-column: auto; }
  .fivemx-fxmanifest-tool__modes { display: flex; width: 100%; }
  .fivemx-fxmanifest-tool__modes button { flex: 1; }
  .fivemx-fxmanifest-tool__validate label { flex-direction: column; gap: 2px; }
}

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