.fcfc-widget {
  --fcfc-ink: #1f2540;
  --fcfc-muted: #667085;
  --fcfc-line: #d8deea;
  --fcfc-panel: #ffffff;
  --fcfc-soft: #f7f9fc;
  --fcfc-accent: #4b2c84;
  --fcfc-accent-2: #129982;
  color: var(--fcfc-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 24px 0;
}

.fcfc-widget * {
  box-sizing: border-box;
}

.fcfc-shell {
  max-width: 760px;
  border: 1px solid rgba(31, 37, 64, 0.12);
  border-radius: 8px;
  background: var(--fcfc-panel);
  box-shadow: 0 16px 38px rgba(31, 37, 64, 0.10);
  padding: 22px;
}

.fcfc-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.fcfc-form {
  display: grid;
  gap: 16px;
}

.fcfc-balance {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 153, 130, 0.22);
  border-radius: 8px;
  background: #f4fbfa;
}

.fcfc-balance span,
.fcfc-balance strong {
  display: block;
}

.fcfc-balance span {
  color: var(--fcfc-muted);
  font-size: 12px;
  font-weight: 700;
}

.fcfc-balance strong {
  color: var(--fcfc-ink);
  font-size: 16px;
}

.fcfc-balance a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--fcfc-accent-2);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.fcfc-balance a:hover,
.fcfc-balance a:focus-visible {
  background: #0e806e;
  color: #ffffff;
}

.fcfc-copy {
  display: grid;
  gap: 6px;
}

.fcfc-kicker {
  color: var(--fcfc-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fcfc-copy h2 {
  margin: 0;
  color: var(--fcfc-ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
}

.fcfc-copy p {
  margin: 0;
  color: var(--fcfc-muted);
  font-size: 15px;
  line-height: 1.5;
}

.fcfc-drop {
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1.5px dashed rgba(75, 44, 132, 0.35);
  border-radius: 8px;
  background: var(--fcfc-soft);
  cursor: pointer;
  padding: 22px;
  text-align: center;
}

.fcfc-drop:hover,
.fcfc-drop:focus-within {
  border-color: var(--fcfc-accent-2);
  background: #ffffff;
}

.fcfc-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.fcfc-drop-main {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--fcfc-accent);
  font-size: 18px;
  font-weight: 800;
}

.fcfc-drop-meta {
  display: block;
  margin-top: 5px;
  color: var(--fcfc-muted);
  font-size: 13px;
}

.fcfc-token-estimate {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(18, 153, 130, 0.22);
  border-radius: 8px;
  background: #f4fbfa;
}

.fcfc-token-estimate[hidden] {
  display: none;
}

.fcfc-token-estimate span {
  color: var(--fcfc-muted);
  font-size: 13px;
  font-weight: 700;
}

.fcfc-token-estimate strong {
  color: var(--fcfc-ink);
  font-size: 15px;
  white-space: nowrap;
}

.fcfc-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.fcfc-controls label {
  display: grid;
  gap: 6px;
  color: var(--fcfc-muted);
  font-size: 13px;
  font-weight: 700;
}

.fcfc-format,
.fcfc-submit,
.fcfc-download {
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}

.fcfc-format {
  width: 100%;
  border: 1px solid var(--fcfc-line);
  background: #ffffff;
  color: var(--fcfc-ink);
  padding: 0 12px;
}

.fcfc-format:disabled {
  color: #98a2b3;
  background: #f3f5f8;
}

.fcfc-submit {
  border: 0;
  background: var(--fcfc-accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 20px;
}

.fcfc-submit:hover,
.fcfc-submit:focus-visible {
  background: #3f246f;
}

.fcfc-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.fcfc-progress {
  display: grid;
  gap: 8px;
}

.fcfc-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.fcfc-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fcfc-accent), var(--fcfc-accent-2));
  transition: width 220ms ease;
}

.fcfc-status {
  color: var(--fcfc-ink);
  font-size: 13px;
}

.fcfc-download {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--fcfc-accent-2);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.fcfc-download:hover,
.fcfc-download:focus-visible {
  color: #ffffff;
  background: #0e806e;
}

.fcfc-message {
  min-height: 20px;
  margin: 0;
  color: var(--fcfc-muted);
  font-size: 14px;
  line-height: 1.4;
}

.fcfc-message[data-tone="success"] {
  color: #087461;
}

.fcfc-message[data-tone="error"] {
  color: #b42318;
}

.fcfc-history {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(31, 37, 64, 0.12);
  border-radius: 8px;
  background: var(--fcfc-panel);
  box-shadow: 0 16px 38px rgba(31, 37, 64, 0.08);
  padding: 18px;
}

.fcfc-history__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.fcfc-history h3 {
  margin: 3px 0 0;
  color: var(--fcfc-ink);
  font-size: 20px;
  line-height: 1.15;
}

.fcfc-history-clear {
  min-height: 32px;
  border: 1px solid var(--fcfc-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--fcfc-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 11px;
}

.fcfc-history-clear:hover,
.fcfc-history-clear:focus-visible {
  border-color: var(--fcfc-accent-2);
  color: var(--fcfc-ink);
}

.fcfc-history-clear:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.fcfc-history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fcfc-history-list li {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--fcfc-line);
  border-radius: 8px;
  background: var(--fcfc-soft);
}

.fcfc-history-list a {
  color: var(--fcfc-accent);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.fcfc-history-list a:hover,
.fcfc-history-list a:focus-visible {
  text-decoration: underline;
}

.fcfc-history-list span,
.fcfc-history-empty {
  color: var(--fcfc-muted);
  font-size: 12px;
  line-height: 1.4;
}

.fcfc-history-empty {
  margin: 0;
}

@media (max-width: 640px) {
  .fcfc-layout {
    grid-template-columns: 1fr;
  }

  .fcfc-shell,
  .fcfc-controls {
    grid-template-columns: 1fr;
  }

  .fcfc-balance {
    align-items: stretch;
    flex-direction: column;
  }

  .fcfc-token-estimate {
    align-items: flex-start;
    flex-direction: column;
  }

  .fcfc-shell {
    padding: 18px;
  }
}
